mHBT {msaeHB}R Documentation

Multivariate Small Area Estimation using Hierarchical Bayesian under T Distribution

Description

This function implements small area estimation using hierarchical bayesian to variable of interest that assumed to be a multivariate T distribution.

Usage

mHBT(
  formula,
  vardir,
  iter.update = 3,
  iter.mcmc = 10000,
  thin = 2,
  burn.in = 2000,
  data
)

Arguments

formula

an object of class list of formula, describe the model to be fitted

vardir

vector containing name of sampling variances of direct estimators in the following order : var1, var2, . , var(k) , cov12, . cov1k, cov23, . , cov(k-1)(k)

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

burn.in

number of iterations to discard at the beginning with default 2000

data

dataframe containing the variables named in formula and vardir

Value

The function returns a list with the following objects:

Est

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

coefficient

A dataframe with the estimated model coefficient

plot

Trace, Density, Autocorrelation Function Plot of MCMC samples

Examples

  ## Load dataset
  data(datasaeT)
  ## Using parameter 'data'
  Fo <- list(f1=Y1~X1+X2,
             f2=Y2~X1+X2)
  vardir <- c("v1", "v2", "v12")
  m1 <- mHBT(formula=Fo, vardir=vardir,
  iter.update = 1, iter.mcmc = 1000,
  thin = 2, burn.in = 200, data=datasaeT)


[Package msaeHB version 0.1.0 Index]