mse_msaeOBns | R Documentation |
Calculates the parametric bootstrap mean squared error estimates of optimum benchmarking for multivariate non sampled area in small area estimation
mse_msaeOBns( formula, vardir, weight, cluster, samevar = FALSE, B = 100, 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 |
B |
number of bootstrap. Default is 1000 |
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 |
mse.eblup |
estimated mean squared errors of the EBLUPs for the small domains based on Prasad Rao |
pbmse.eblupOB |
parametric bootstrap mean squared error estimates of the optimum benchmark |
running.time |
time for running function |
## load dataset data(datamsaeOBns) # Compute MSE EBLUP and Optimum Benchmark # This is the long running example ## 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") mse_msae = mse_msaeOBns(Fo, vardir, weight, cluster, data = datamsaeOBns) ## Without parameter 'data' Fo = list(f1 = datamsaeOBns$Y1 ~ datamsaeOBns$X1 + datamsaeOBns$X2, f2 = datamsaeOBns$Y2 ~ datamsaeOBns$X1 + datamsaeOBns$X2, f3 = datamsaeOBns$Y3 ~ datamsaeOBns$X1 + datamsaeOBns$X2) vardir = datamsaeOBns[, c("v1", "v12", "v13", "v2", "v23", "v3")] weight = datamsaeOBns[, c("w1", "w2", "w3")] cluster = datamsaeOBns[, c("c1", "c2", "c3")] mse_msae = mse_msaeOBns(Fo, vardir, weight, cluster) ## Return mse_msae$pbmse.eblupOB # to see the MSE of Optimum Benchmark
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.