knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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)
Arina Mana Sikana, Azka Ubaidillah
Arina Mana Sikana sikanaradrianan@gmail.com
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 (-∞ < y < ∞)You can install the development version of saeHB.spatial
from GitHub with:
# install.packages("devtools") devtools::install_github("arinams/saeHB.spatial")
This is a basic example of using sar.normal()
function to make an estimate based on synthetic data in this package
library(saeHB.spatial) ## For data without any non-sampled area data(sp.norm) # Load dataset data(prox.mat) # Load proximity Matrix ## For data with non-sampled area use sp.normNs ## Fitting model result <- sar.normal(y ~ x1 + x2, "vardir", prox.mat, data = sp.norm)
Small Area mean Estimates
result$Est
Estimated model coefficient
result$coefficient
Estimated random effect variances
result$refVar
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.