knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

saeHB.spatial

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) .

Author

Arina Mana Sikana, Azka Ubaidillah

Maintaner

Arina Mana Sikana sikanaradrianan@gmail.com

Function

Installation

You can install the development version of saeHB.spatial from GitHub with:

# install.packages("devtools")
devtools::install_github("arinams/saeHB.spatial")

Example

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

References



arinams/saeHB.spatial documentation built on Nov. 27, 2024, 12:30 a.m.