Title: | Small Area Estimation Hierarchical Bayes For Spatial Model |
---|---|
Description: | Provides several functions and datasets for area level of Small Area Estimation under Spatial Model using Hierarchical Bayesian (HB) Method. Model-based estimators include the HB estimators based on a Spatial Fay-Herriot model with univariate normal distribution for variable of interest.The 'rjags' package is employed to obtain parameter estimates. For the reference, see Rao and Molina (2015) <doi:10.1002/9781118735855>. |
Authors: | Arina Mana Sikana [aut, cre], Azka Ubaidillah [aut] |
Maintainer: | Arina Mana Sikana <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1 |
Built: | 2024-11-25 16:30:51 UTC |
Source: | CRAN |
A data frame containing the proximity values for the 64 regions to simulate Small Area Estimation under Spatial SAR Model using Hierarchical Bayesian Method
data(prox.mat)
data(prox.mat)
The values are numbers in the interval [0,1] containing the proximity of the row and column domains. The sum of the values of each row is equal to 1.
Provides several functions and datasets for area level of Small Area Estimation under Spatial Model using Hierarchical Bayesian (HB) Method. Model-based estimators include the HB estimators based on a Spatial Fay-Herriot model with univariate normal distribution for variable of interest.The 'rjags' package is employed to obtain parameter estimates. For the reference, see Rao and Molina (2015) <doi:10.1002/9781118735855>.
Arina Mana Sikana, Azka Ubaidillah
Maintaner: Arina Mana Sikana [email protected]
sar.normal
This function gives small area estimator under Spatial SAR Model and is implemented to variable of interest (y) that assumed to be a Normal Distribution. The range of data is
.
Rao, J.N.K & Molina. (2015). Small Area Estimation 2nd Edition. New Jersey: John Wiley and Sons, Inc. <doi:10.1002/9781118735855>.
J. Kubacki and A. Jedrzejczak. (2016). Small Area Estimation of Income Under Spatial SAR Model. Statistics in Transition New Series, Vol. 17, No. 3, pp. 365–390. <doi: 10.21307/stattrans-2016-028>.
H. C. Chung and G. S. Datta. (2020). Bayesian Hierarchical Spatial Models for Small Area Estimation. Research Report Series. Washington, D.C.: U.S. Census Bureau.
This function gives small area estimator under Spatial SAR Model and is implemented to variable of interest (y) that assumed to be a Normal Distribution. The range of data is .
sar.normal( formula, vardir, proxmat, iter.update = 3, iter.mcmc = 2000, thin = 1, burn.in = 1000, coef, var.coef, data )
sar.normal( formula, vardir, proxmat, iter.update = 3, iter.mcmc = 2000, thin = 1, burn.in = 1000, coef, var.coef, data )
formula |
formula that describe the fitted model. |
vardir |
sampling variances of direct estimations. |
proxmat |
|
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 |
coef |
optional vector containing the mean of the prior distribution of the regression model coefficients. |
var.coef |
optional vector containing the variances of the prior distribution of the regression model coefficients. |
data |
the data frame. |
This function returns a list of the following objects:
Est |
A data frame of Small Area mean Estimates using Hierarchical Bayesian Method |
refVar |
Estimated random effect variances |
coefficient |
A data frame with estimated model coefficient |
plot |
Trace, Density, and Autocorrelation Function Plot of MCMC samples |
## For data without any non-sampled area data(sp.norm) # Load dataset data(prox.mat) # Load proximity Matrix result <- sar.normal(y ~ x1 + x2, "vardir", prox.mat, data = sp.norm) result$Est # Small Area mean Estimates result$refVar # Estimated random effect variances result$coefficient # Estimated model coefficient # Load library 'coda' to execute the plot # autocorr.plot(result$plot[[3]]) # Generate ACF Plot # plot(result$plot[[3]]) # Generate Density and Trace plot ## For data with non-sampled area use sp.normNs
## For data without any non-sampled area data(sp.norm) # Load dataset data(prox.mat) # Load proximity Matrix result <- sar.normal(y ~ x1 + x2, "vardir", prox.mat, data = sp.norm) result$Est # Small Area mean Estimates result$refVar # Estimated random effect variances result$coefficient # Estimated model coefficient # Load library 'coda' to execute the plot # autocorr.plot(result$plot[[3]]) # Generate ACF Plot # plot(result$plot[[3]]) # Generate Density and Trace plot ## For data with non-sampled area use sp.normNs
Synthetic data of 64 regions to simulate Small Area Estimation under Spatial SAR Model and Normal Distribution using Hierarchical Bayesian Method
This data is generated by these following steps:
Generate sampling random area effect with
,
is an identity matrix, and
is proximity matrix. The auxiliary variables are generated by
and
. The parameters
are set as 1 and
as 0.7
Generate variance of the direct estimators with
. Sampling error
is generated by
Calculate . Calculate the direct estimators of
, i.e
Direct estimators , auxiliary variables
, and variance of the direct estimators are combined in a data frame called
sp.norm
data(sp.norm)
data(sp.norm)
A data frame with 64 observations on the following 4 variables:
Direct estimators for each region
Auxiliary variable of x1
Auxiliary variable of x2
Sampling variance of the direct estimators for each region
Synthetic data of 64 regions to simulate Small Area Estimation under Spatial SAR Model and Normal Distribution with non-sampled area using Hierarchical Bayesian Method
This data contains NA
values that indicates no sampled at one or more regions. It uses the sp.norm
dataset with the direct estimators and the related variances of 5 regions are missing.
data(sp.normNs)
data(sp.normNs)
A data frame with 64 observations on the following 4 variables:
Direct estimators for each region
Auxiliary variable of x1
Auxiliary variable of x2
Sampling variance of the direct estimators for each region