dataZINB: Synthetics Data for Small Area Estimation using Hierarchical...

dataZINBR Documentation

Synthetics Data for Small Area Estimation using Hierarchical Bayesian Method under Zero Inflated Negative Binomial

Description

Datasets to simulate Small Area Estimation using Hierarchical Bayesian Method under Zero Inflated Negative Binomial.

This data is generated by these following steps:

  1. Generate sampling random area effect u and v with u ~ N(0,1) and v ~ N(0,1).

  2. The auxiliary variables are generated by uniform and bernoulli distribution with x1 ~ U(0,1) and x2 ~ B(1,0.6).

  3. The coefficient parameters β0, β1, β2, γ0, γ1, γ2 are set with a certain values. For the reference, see Desjardins, C.D. (2013).

  4. Calculate π = exp(γ0 + x1γ1 + x2γ2 + u) / 1 + exp(γ0 + x1γ1 + x2γ2 + u)

  5. Calculate μ = exp(β0 + x1β1 + x2β2 + v)

  6. Generate direct estimate with y ~ rzinegbin (μ, π, r), we set r = 2. Using library(VGAM)

  7. Calculate the variance of y with var(y) = μ * (1 - π) * (1 + (μ / r) + (μ * π))

  8. Auxiliary variables x1,x2, direct estimation y and vardir are combined in a dataframe called dataZINB

Usage

data(dataZINB)

Format

A data frame with 50 rows and 4 variables::

y

Direct Estimation of y

x1

Auxiliary variable of x1

x2

Auxiliary variable of x2

vardir

Sampling Variance of y


hayunbuto/saeHB.zinb documentation built on June 22, 2022, 12:02 p.m.