Description Usage Arguments Value Examples
This function gives EBLUPs ratio benchmarking for non sampled area based on multivariate Fay-Herriot (Model 1)
1 2 3 4 5 6 7 8 9 10 | est_msaeRBns(
formula,
vardir,
weight,
cluster,
samevar = FALSE,
MAXITER = 100,
PRECISION = 1e-04,
data
)
|
formula |
an object of class list of formula describe the fitted models |
vardir |
matrix containing sampling variances of direct estimators. The order is: |
weight |
matrix containing proportion of units in small areas. The order is: |
cluster |
matrix containing cluster of auxiliary variables. The order is: |
samevar |
logical. If |
MAXITER |
maximum number of iterations for Fisher-scoring. Default is 100 |
PRECISION |
coverage tolerance limit for the Fisher Scoring algorithm. Default value is |
data |
dataframe containing the variables named in formula, vardir, and weight |
This function returns a list with following objects:
eblup |
a list containing a value of estimators |
est.eblup : a dataframe containing EBLUP estimators
est.eblupRB : a dataframe containing ratio benchmark estimators
fit |
a list contining following objects: |
method : fitting method, named "REML"
convergence : logical value of convergence of Fisher Scoring
iterations : number of iterations of Fisher Scoring algorithm
estcoef : a data frame containing estimated model coefficients (beta, std. error, t value, p-value
)
refvar : estimated random effect variance
random.effect |
a data frame containing values of random effect estimators |
agregation |
a data frame containing agregation of direct, EBLUP, and ratio benchmark estimation |
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 26 27 | ## load dataset
data(datamsaeRBns)
# 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")
cluster = c("c1", "c2", "c3")
est_msae = est_msaeRBns(Fo, vardir, weight, cluster, data = datamsaeRBns)
## Without parameter 'data'
Fo = list(f1 = datamsaeRBns$Y1 ~ datamsaeRBns$X1 + datamsaeRBns$X2,
f2 = datamsaeRBns$Y2 ~ datamsaeRBns$X1 + datamsaeRBns$X2,
f3 = datamsaeRBns$Y3 ~ datamsaeRBns$X1 + datamsaeRBns$X2)
vardir = datamsaeRBns[, c("v1", "v12", "v13", "v2", "v23", "v3")]
weight = datamsaeRBns[, c("w1", "w2", "w3")]
cluster = datamsaeRBns[, c("c1", "c2", "c3")]
est_msae = est_msaeRBns(Fo, vardir, weight, cluster)
## Return
est_msae$eblup$est.eblupRB # to see the Ratio Benchmark estimators
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.