RaoYuAr1.beta {saeHB.panel.beta}R Documentation

Small Area Estimation using Hierarchical Bayesian for Rao-Yu Model under Beta Distribution

Description

This function is implemented to variable of interest ydi

Usage

RaoYuAr1.beta(
  formula,
  area,
  period,
  iter.update = 3,
  iter.mcmc = 2000,
  thin = 1,
  burn.in = 1000,
  tau.e = 1,
  tau.v = 1,
  data
)

Arguments

formula

Formula that describe the fitted model

area

Number of areas (domain) of the data

period

Number of periods (subdomains) for each area of the data

iter.update

Number of updates with default 3

iter.mcmc

Number of total iterations per chain with default 2000

thin

Thinning rate, must be a positive integer with default 1

burn.in

Number of iterations to discard at the beginning with default 1000

tau.e

Variance of area-by-time effect of variable interest with default 1

tau.v

Variance of random area effect of variable interest with default 1

data

The data frame

Value

This function returns a list of the following objects:

Est

A vector with the values of Small Area mean Estimates using Hierarchical bayesian method

refVar

Estimated random effect variances

coefficient

A dataframe with the estimated model coefficient

alpha

Parameter dispersion of Generalized Poisson distribution

plot

Trace, Density, Autocorrelation Function Plot of MCMC samples

convergence.test

Convergence diagnostic for Markov chains based on Geweke test

Examples

##For data without any non-sampled area
data(dataBetaAr1)     # Load dataset
dataBetaAr1 = dataBetaAr1[1:25,] #for the example only use part of the dataset
formula = ydi ~ xdi1 + xdi2
area = max(dataBetaAr1[, "area"])
period = max(dataBetaAr1[,"period"])

result <- RaoYuAr1.beta(formula, area, period, data = dataBetaAr1)


result$Est
result$refVar
result$coefficient
result$plot
result$convergence.test

## For data with non-sampled area use dataBetaAr1Ns


[Package saeHB.panel.beta version 0.1.3 Index]