The method plot() provides the boxplots of original and benchmarked estimates in comparison with the benchmark value. Note that share weights are not considered.
## S3 method for class 'benchmark_fitsae'plot(x,...)
Arguments
x: A benchmark_fitsae object.
...: Currently unused.
Returns
A ggplot2 object.
Examples
library(tipsae)# loading toy datasetdata("emilia_cs")# fitting a modelfit_beta <- fit_sae(formula_fixed = hcr ~ x, data = emilia_cs, domains ="id", type_disp ="var", disp_direct ="vars", domain_size ="n",# MCMC setting to obtain a fast example. Remove next line for reliable results. chains =1, iter =150, seed =0)# check model diagnosticssumm_beta <- summary(fit_beta)# creating a subset of the areas whose estimates have to be benchmarkedsubset <- c("RIMINI","RICCIONE","RUBICONE","CESENA - VALLE DEL SAVIO")# creating population shares of the subset areaspop <- emilia_cs$pop[emilia_cs$id %in% subset]shares_subset <- pop / sum(pop)# perform benchmarking procedurebmk_subset <- benchmark(x = summ_beta, bench =0.13, share = shares_subset, method ="raking", areas = subset)plot(bmk_subset)