Learn R Programming

saeHB.TF.beta (version 0.2.0)

dataBeta: Simulated dataset Under Two Fold Subarea level model with Beta distribution.

Description

A dataset to simulate Small Area Estimation using Hierarchical Bayesian method under Two Fold Subarea level model with Beta distribution on variable interest.

This data is generated by these following steps:

  1. Generate auxiliary variable \(X_{ij1},X_{ij2}\), sampling error \(e_{ij}\),subarea random effect \(u_{ij}\), area random effect \(v_{i}\), and weight or proportions of unit \(w_{ij}\)

    • Generate auxiliary variable on subarea level \(X_{ij1}\)~ \(U(0,1)\)

    • Generate auxiliary variable on subarea level \(X_{ij2}\)~\(N(0,1)\)

    • Setting coefficient \(\beta_{0}=\beta_{1}=\beta_{2} =0.5\)

    • Generate area random effect \(v_{i}\) ~ \(N(0,1)\)

    • Generate subarea random effect \(u_{ij}\)~\(N(0,1)\)

    • Calculate target parameter \(\mu_{ij}=\beta_{0} +\beta_{1}x_{ij1} +\beta_{2}x_{ij2}+v_{i}+u_{ij}\)

    • Generate constant for Beta parameter \(\pi_{ij}\)~ \(Gamma(1,0.5)\)

    • Calculate Beta parameter \(A=\mu_{ij}\pi_{ij}\) and \(A=(1-\mu_{ij})\pi_{ij}\)

    • Generate direct estimator \(y_{ij}\)~ \(Beta(A,B)\)

    • Generate weight on each subarea \(w_{ij}\)~\(U(0.2,0.7)\)

  2. Direct estimation (\(y_{ij}\)), Auxiliary variables \(X_{ij1}\),\(X_{ij2}\), vardir, codearea, and weight \(w_{ij}\) are combined in a dataframe called dataBeta

Usage

dataBeta

Arguments

Format

A data frame with 90 rows and 6 columns:

y

Direct estimation of subarea mean \(y_{ij}\)

X1

Auxiliary variable of \(X_{ij1}\)

X2

Auxiliary variable of \(X_{ij2}\)

codearea

Index that describes the code relating to area for each subarea

w

Unit proportion on each subarea or weight \(w_{ij}\)

vardir

Sampling variance of direct estimator \(y_{ij}\)