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 SAR Model using Hierarchical Bayesian (HB) Method. For the reference, see Rao and Molina (2015)
Arina Mana Sikana, Azka Ubaidillah
Arina Mana Sikana 221810195@stis.ac.id
spatial.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 spatial.normal()
function to make an estimate based on synthetic data in this package
library(saeHB.twofold) ## 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 <- spatial.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
Rao, J.N.K & Molina. (2015). Small Area Estimation 2nd Edition. New York: John Wiley and Sons, Inc.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.