RaoYuAr1 {saeHB.panel} | R Documentation |
Small Area Estimation using Hierarchical Bayesian under Rao-Yu Model
Description
This function is implemented to variable of interest ydi
Usage
RaoYuAr1(
formula,
area,
period,
vardir,
iter.update = 3,
iter.mcmc = 2000,
thin = 2,
burn.in = 1000,
tau.e = 1,
tau.v = 1,
data
)
Arguments
formula |
Formula that describe the fitted model |
area |
Number of areas (domain) of the data |
period |
Number of periods (subdomains) for each area of the data |
vardir |
Sampling variances of direct estimations |
iter.update |
Number of updates with default |
iter.mcmc |
Number of total iterations per chain with default |
thin |
Thinning rate, must be a positive integer with default |
burn.in |
Number of iterations to discard at the beginning with default |
tau.e |
Variance of area-by-time effect of variable interest with default |
tau.v |
Variance of random area effect of variable interest with default |
data |
The data frame |
Value
This function returns a list of the following objects:
Est |
A vector with the values of Small Area mean Estimates using Hierarchical bayesian method |
refVar |
Estimated random effect variances |
coefficient |
A dataframe with the estimated model coefficient |
alpha |
Parameter dispersion of Generalized Poisson distribution |
plot |
Trace, Density, Autocorrelation Function Plot of MCMC samples |
Examples
##For data without any non-sampled area
data(dataAr1) # Load dataset
formula = ydi ~ xdi1 + xdi2
area = max(dataAr1[, "area"])
period = max(dataAr1[,"period"])
vardir = dataAr1[,"vardir"]
result <- RaoYuAr1(formula, area, period, vardir, data = dataAr1)
result$Est
result$refVar
result$coefficient
result$plot
## For data with non-sampled area use dataAr1Ns