Learn R Programming

saeHB.spatial (version 0.1.1)

sp.norm: Synthetic Data for Small Area Estimation under Spatial Simultaneous Autoregressive (SAR) Model and Normal Distribution

Description

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:

  1. Generate sampling random area effect \(v = (I - \rho W)^{-1}u\) with \(u ~ N(0, I)\), \(I\) is an identity matrix, and \(W\) is proximity matrix. The auxiliary variables are generated by \(x1 ~ U(0, 1)\) and \(x2 ~ N(10, 1)\). The parameters \(\beta_{0}, \beta_{1}, \beta_{2}\) are set as 1 and \(\rho\) as 0.7

  2. Generate variance of the direct estimators \(\sigma^{2}_{e}\) with \(\sigma^{2}_{e} ~ InvGamma(a, b)\). Sampling error \(e\) is generated by \(e ~ N(0, \sigma^{2}_{e})\)

  3. Calculate \(\mu = \beta_{0} + \beta_{1}x1 + \beta_{2}x2 + u\). Calculate the direct estimators of \(\mu\), i.e \(y = \mu + e\)

  4. Direct estimators \(y\), auxiliary variables \(x1, x2\), and variance of the direct estimators are combined in a data frame called sp.norm

Usage

data(sp.norm)

Arguments

Format

A data frame with 64 observations on the following 4 variables:

y

Direct estimators for each region

x1

Auxiliary variable of x1

x2

Auxiliary variable of x2

vardir

Sampling variance of the direct estimators for each region