mseFH.mprop {sae.prop} | R Documentation |
Parametric Bootstrap Mean Squared Error of EBLUPs based on a Multivariate Fay Herriot model with Additive Logistic Transformation
Description
This function gives the MSE of transformed EBLUP and Empirical Best Predictor (EBP) based on a multivariate Fay-Herriot model with modified parametric bootstrap approach proposed by Gonzalez-Manteiga.
Usage
mseFH.mprop(
formula,
vardir,
MAXITER = 100,
PRECISION = 1e-04,
L = 1000,
B = 400,
data
)
Arguments
formula |
an object of class |
vardir |
sampling variances of direct estimations. If data is defined, it is a vector containing names of sampling variance columns. If data is not defined, it should be a data frame of sampling variances of direct estimators. The order is |
MAXITER |
maximum number of iterations allowed in the Fisher-scoring algorithm, Default: |
PRECISION |
convergence tolerance limit for the Fisher-scoring algorithm, Default: |
L |
number of Monte Carlo iterations in calculating Empirical Best Predictor (EBP), Default: |
B |
number of Bootstrap iterations in calculating MSE, Default: |
data |
optional data frame containing the variables named in |
Value
The function returns a list with the following objects:
est |
a list containing the following objects: |
-
PC
: data frame containing transformed EBLUP estimators using inverse alr for each category. -
EBP
: data frame containing Empirical Best Predictor using Monte Carlo for each category.
fit |
a list containing the following objects (model is fitted using REML): |
-
convergence
: logical value equal toTRUE
if Fisher-scoring algorithm converges in less thanMAXITER
iterations. -
iterations
: number of iterations performed by the Fisher-scoring algorithm. -
estcoef
: data frame that contains the estimated model coefficients, standard errors, t-statistics, and p-values of each coefficient. -
refvar
: estimated covariance matrix of random effects.
components |
a list containing the following objects: |
-
random.effects
: data frame containing estimated random effect values of the fitted model for each category. -
residuals
: data frame containing residuals of the fitted model for each category.
mse |
a list containing estimated MSE of the estimators. |
-
PC
: estimated MSE of plugin (PC) estimators for each category. -
EBP
: estimated MSE of EBP estimators for each category.
Examples
## Not run:
## Load dataset
data(datasaem)
## If data is defined
Fo = list(Y1 ~ X1,
Y2 ~ X2,
Y3 ~ X3)
vardir = c("v1", "v2", "v3", "v12", "v13", "v23")
MSE.data <- mseFH.mprop(Fo, vardir, data = datasaem, B = 10)
## If data is undefined
Fo = list(datasaem$Y1 ~ datasaem$X1,
datasaem$Y2 ~ datasaem$X2,
datasaem$Y3 ~ datasaem$X3)
vardir = datasaem[, c("v1", "v2", "v3", "v12", "v13", "v23")]
MSE <- mseFH.mprop(Fo, vardir, B = 10)
## See the estimators
MSE$mse
## NOTE:
## B = 10 is just for examples.
## Please choose a proper number for Bootstrap iterations in real calculation.
## End(Not run)