meHBbeta {saeHB.ME.beta}R Documentation

Small Area Estimation with Measurement Error using Hierarchical Bayesian Method under Beta Distribution

Description

This function is implemented to variable of interest (Y) that assumed to be a Beta Distribution when auxiliary variable is measured with error. The range of data must be 0<Y<1. The data proportion is supposed to be implemented with this function.

Usage

meHBbeta(
  formula,
  var.x,
  coef,
  var.coef,
  iter.update = 3,
  iter.mcmc = 10000,
  thin = 2,
  tau.u = 1,
  burn.in = 2000,
  data
)

Arguments

formula

an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. The variables included formula must have a length equal to the number of domains m. This formula can provide auxiliary variable either measured with error or combination between measured with error and without error. If the auxiliary variable are combination between error and without error, input the error variable first followed by without error variable.

var.x

vector containing mean squared error of X. The values must be sorted as the X.

coef

a vector contains prior initial value of Coefficient of Regression Model for fixed effect with default vector of 0 with the length of the number of regression coefficients.

var.coef

a vector contains prior initial value of variance of Coefficient of Regression Model with default vector of 1 with the length of the number of regression coefficients.

iter.update

number of updates with default 3.

iter.mcmc

number of total iterations per chain with default 10000.

thin

thinning rate, must be a positive integer with default 2.

tau.u

prior initial value of inverse of Variance of area random effect with default 1.

burn.in

burn.in number of iterations to discard at the beginning with default 2000.

data

the data frame.

Value

This function returns a list with 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 data frame with the estimated model coefficient

plot

Trace, Dencity, Autocorrelation Function Plot of MCMC samples

Examples

## it may take time
## Load dataset
data(dataHBMEbeta)

## Auxiliary variables only contains variable with error in aux variable
example <- meHBbeta(Y~x1+x2, var.x = c("v.x1","v.x2"),
                   iter.update = 3, iter.mcmc = 1010,
                   thin = 1, burn.in = 1000, data = dataHBMEbeta)

## you can use dataHBMEbetaNS for using dataset with non-sampled area
## and you can use this function for aux variables contains variable with error and without error


[Package saeHB.ME.beta version 1.1.0 Index]