dataPanelbeta {saeHB.panel.beta}R Documentation

Sample Data under Beta Distribution for Small Area Estimation using Hierarchical Bayesian Method for Rao Yu Model when rho = 0

Description

Dataset under Beta Distribution to simulate Small Area Estimation using Hierarchical Bayesian Method for Rao-Yu Model with rho = 0 This data is generated by these following steps:

  1. Generate random effect area v, random effect for area i at time point j u, epsilon \epsilon, variance of ydi vardir, sampling error e, auxiliary xdi1 and xdi2

    • Set coefficient \beta_{0}=\beta_{1}=\beta_{2}=2

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

    • Generate auxiliary variable xdi1_{ij}~U(0,1)

    • Generate auxiliary variable xdi2_{ij}~U(0,1)

    • Generate epsilon \epsilon_{ij}~N(0,1)

    • Generate \phi_{ij}~Gamma(1,0.5)

    • Calculate \mu_{ij}=\frac{\exp{\beta_{0}+\beta_{1}xdi1_{ij}+\beta_{2}xdi2_{ij}+v_{i}+\epsilon_{ij}}}{(1+\exp{\beta_{0}+\beta_{1}xdi1_{ij}+\beta_{2}xdi2_{ij}+v_{i}+\epsilon_{ij}})}

    • Calculate A_{ij}=\mu_{ij}*\phi_{ij}

    • Calculate B_{ij}=(1-\mu_{ij})*\phi_{ij}

    • Generate ydi y_{ij}~Beta(A_{ij},B_{ij})

    • Calculate variance of ydi with vardir_{ij}=\frac{(A_{ij})(B_{ij})}{(A_{ij}+B_{ij})^2(A_{ij}+B_{ij}+1)}

    • Set area=20 and period=5

  2. Auxiliary variables xdi1,xdi2, direct estimation y, area, period, and vardir are combined in a dataframe called dataPanel

Usage

dataPanelbeta

Format

A data frame with 100 rows and 6 variables:

ydi

Direct Estimation of y

area

Area (domain) of the data

period

Period (subdomain) of the data

vardir

Sampling Variance of y

xdi1

Auxiliary variable of xdi1

xdi2

Auxiliary variable of xdi2


[Package saeHB.panel.beta version 0.1.3 Index]