Generates small area estimates by smoothing direct estimates using a unit level model
smoothUnit(
formula,
domain,
design,
family = c("gaussian", "binomial")[1],
Amat = NULL,
X.pop = NULL,
domain.size = NULL,
pc.u = 1,
pc.alpha = 0.01,
pc.u.phi = 0.5,
pc.alpha.phi = 2/3,
CI = 0.95,
n.sample = 250
)
A list with elements
direct estimates
fitted INLA object for iid domain effects model
smoothed estimates
an object of class "formula" describing the model to be fitted.
formula specifying variable containing domain labels
an object of class "svydesign" containing the data for the model
of the response variable, currently supports 'binomial' (default with logit link function) or 'gaussian'.
Adjacency matrix for the regions. If set to NULL, the IID spatial effect will be used.
unit-level covariates data frame. One of the column name needs to match the domain specified, in order to be linked to the data input. Currently only supporting time-invariant domain-level covariates.
Domain size data frame. One of the column name needs to match the domain specified, in order to be linked to the data input and there must be a size column containing domain sizes.
hyperparameter U for the PC prior on precisions.
hyperparameter alpha for the PC prior on precisions.
hyperparameter U for the PC prior on the mixture probability phi in BYM2 model.
hyperparameter alpha for the PC prior on the mixture probability phi in BYM2 model.
the desired posterior credible interval to calculate
number of draws from posterior used to compute summaries