mseFH.ns.mprop {sae.prop} | R Documentation |
Parametric Bootstrap Mean Squared Error of EBLUPs based on a Multivariate Fay Herriot model with Additive Logistic Transformation for Non-Sampled Data
Description
This function gives the MSE of transformed EBLUP based on a multivariate Fay-Herriot model. For sampled domains, MSE is estimated using modified parametric bootstrap approach proposed by Gonzalez-Manteiga. For non-sampled domains, MSE is estimated using modified approach by using average sampling variance of sampled domain in each cluster.
Usage
mseFH.ns.mprop(
formula,
vardir,
MAXITER = 100,
PRECISION = 1e-04,
cluster = "auto",
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: |
cluster |
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 data frame containing values of the estimators for each domains. |
-
PC
: transformed EBLUP estimators using inverse alr for each categoory. -
status
: status of corresponding domain, whether sampled or non-sampled.
fit |
a list containing the following objects (model is fitted using REML): |
-
convergence
: a logical value equal toTRUE
if Fisher-scoring algorithm converges in less thanMAXITER
iterations. -
iterations
: number of iterations performed by the Fisher-scoring algorithm. -
estcoef
: a 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. -
cluster
: cluster of each category. -
cluster.information
: a list containing data frames with average random effects of sampled domain in each cluster.
components |
a list containing the following objects: |
-
random.effects
: data frame containing estimated random effect values of the fitted model for each category and their status whether sampled or non-sampled. -
residuals
: data frame containing residuals of the fitted model for each category and their status whether sampled or non-sampled.
mse |
data frame containing estimated MSE of the estimators. |
-
PC
: estimated MSE of plugin (PC) estimators for each category. -
status
: status of domain, whether sampled or non-sampled.
Examples
## Not run:
## Load dataset
data(datasaem.ns)
## If data is defined
Fo = list(Y1 ~ X1,
Y2 ~ X2,
Y3 ~ X3)
vardir = c("v1", "v2", "v3", "v12", "v13", "v23")
MSE.ns <- mseFH.ns.mprop(Fo, vardir, data = datasaem.ns, B = 10)
## If data is undefined (and option for cluster arguments)
Fo = list(datasaem.ns$Y1 ~ datasaem.ns$X1,
datasaem.ns$Y2 ~ datasaem.ns$X2,
datasaem.ns$Y3 ~ datasaem.ns$X3)
vardir = datasaem.ns[, c("v1", "v2", "v3", "v12", "v13", "v23")]
### "auto"
MSE.ns1 <- mseFH.ns.mprop(Fo, vardir, cluster = "auto", B = 10)
### number of clusters
MSE.ns2 <- mseFH.ns.mprop(Fo, vardir, cluster = c(3, 2, 2), B = 10)
### data frame or matrix containing cluster for each domain
MSE.ns3 <- mseFH.ns.mprop(Fo, vardir, cluster = datasaem.ns[, c("c1", "c2", "c3")], B = 10)
## See the estimators
MSE.ns$mse
## NOTE:
## B = 10 is just for examples.
## Please choose a proper number for Bootstrap iterations in real calculation.
## End(Not run)