Provides several functions for area and subarea level of small area estimation under Twofold Subarea Level Model using hierarchical Bayesian (HB) method with Univariate Normal distribution for variables of interest. Some dataset simulated by a data generation are also provided. The ‘rjags’ package is employed to obtain parameter estimates using Gibbs Sampling algorithm. Model-based estimators involves the HB estimators which include the mean, the variation of mean, and the quantile. For the reference, see Rao and Molina (2015), Torabi (2014), Leyla Mohadjer et.al. (2007), and Erciulescu et al. (2018).
Reyhan Saadi, Azka Ubaidillah
Reyhan Saadi 221810557@stis.ac.id or aansum99@gmail.com
NormalTF()
This function gives estimation of subarea
and area means simultaneously under Twofold Subarea Small Area
Estimation Model Using Hierarchical Bayesian Method with Normal
distribution based on model in Torabi (2014)You can install the development version of saeHB.twofold from GitHub with:
# install.packages("devtools")
::install_github("reymath99/saeHB.twofold") devtools
This is a basic example of using NormalTF function to make an estimate based on sample data in this package
library(saeHB.twofold)
data(dataTwofold)
#for dataset with nonsampled subarea use dataTwofoldNS
#fitting model
=NormalTF(y~x1+x2,vardir="vardir",area = "codearea",weight = "w",data=dataTwofold) model
Extract subarea mean estimation
$Est_sub model
Extract area mean estimation
$Est_area model
Extract coefficient estimation ()
$coefficient model
Extract estimation of subarea random effect variance (^2_u) and area random effect variance (^2_v)
$refVar model
Calculate relative standard error or CV
=(model$Est_sub$SD)/(model$Est_sub$Mean)*100
CV#cv summaries
summary(CV)