extract function

Extract Posterior Summaries of Target Parameters

Extract Posterior Summaries of Target Parameters

The extract() function provides the posterior summaries of target parameters, including model-based estimates, and possibly benchmarked estimates, related to a fitted small area model.

extract(x)

Arguments

  • x: An object of class summary_fitsae or benchmark_fitsae.

Returns

An object of class estimates_fitsae, being a list of two data frames, distinguishing between $in_sample and $out_of_sample areas, which gathers domains name, direct and HB estimates, as well as posterior summaries of target parameters. When the input is a benchmark_fitsae object, benchmarked estimates are also included.

Examples

library(tipsae) # loading toy dataset data("emilia_cs") # fitting a model fit_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 diagnostics summ_beta <- summary(fit_beta) # extract model estimates HB_estimates <- extract(summ_beta) head(HB_estimates)

See Also

summary.fitsae and benchmark to produce the input object.

  • Maintainer: Silvia De Nicolò
  • License: GPL-3
  • Last published: 2024-09-13

Useful links