est_msaeRB: EBLUPs Ratio Benchmarking based on a Multivariate Fay Herriot...

Description Usage Arguments Value Examples

Description

This function gives EBLUPs ratio benchmarking based on multivariate Fay-Herriot (Model 1)

Usage

1
2
3
4
5
6
7
8
9
est_msaeRB(
  formula,
  vardir,
  weight,
  samevar = FALSE,
  MAXITER = 100,
  PRECISION = 1e-04,
  data
)

Arguments

formula

an object of class list of formula describe the fitted models

vardir

matrix containing sampling variances of direct estimators. The order is: var1, cov12, ..., cov1r, var2, cov23, ..., cov2r, ..., cov(r-1)(r), var(r)

weight

matrix containing proportion of units in small areas. The order is: w1, w2, ..., w(r)

samevar

logical. If TRUE, the varians is same. Default is FALSE

MAXITER

maximum number of iterations for Fisher-scoring. Default is 100

PRECISION

coverage tolerance limit for the Fisher Scoring algorithm. Default value is 1e-4

data

dataframe containing the variables named in formula, vardir, and weight

Value

This function returns a list with following objects:

eblup

a list containing a value of estimators

fit

a list contining following objects:

random.effect

a data frame containing values of random effect estimators

agregation

a data frame containing agregation of direct, EBLUP, and ratio benchmark estimation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## load dataset
data(datamsaeRB)

# Compute EBLUP and Ratio Benchmark using auxiliary variables X1 and X2 for each dependent variable

## Using parameter 'data'
Fo = list(f1 = Y1 ~ X1 + X2,
          f2 = Y2 ~ X1 + X2,
          f3 = Y3 ~ X1 + X2)
vardir = c("v1", "v12", "v13", "v2", "v23", "v3")
weight = c("w1", "w2", "w3")

est_msae = est_msaeRB(Fo, vardir, weight, data = datamsaeRB)

## Without parameter 'data'
Fo = list(f1 = datamsaeRB$Y1 ~ datamsaeRB$X1 + datamsaeRB$X2,
          f2 = datamsaeRB$Y2 ~ datamsaeRB$X1 + datamsaeRB$X2,
          f3 = datamsaeRB$Y3 ~ datamsaeRB$X1 + datamsaeRB$X2)
vardir = datamsaeRB[, c("v1", "v12", "v13", "v2", "v23", "v3")]
weight = datamsaeRB[, c("w1", "w2", "w3")]

est_msae = est_msaeRB(Fo, vardir, weight)

## Return
est_msae$eblup$est.eblupRB # to see the Ratio Benchmark estimators

msaeRB documentation built on June 13, 2021, 1:06 a.m.