eblupMFH2 | R Documentation |
This function gives the EBLUP and MSE based on a autoregressive multivariate Fay-Herriot model (model 2).
eblupMFH2(formula, vardir, MAXITER = 100, PRECISION = 1e-04, data)
formula |
an object of class list of formula, describe the model to be fitted |
vardir |
if data is available, it is vector containing name of sampling variances of direct estimators. if not, it is 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: |
data |
dataframe containing the variables named in |
The function returns a list with the following objects:
a dataframe with the values of the EBLUP estimators
a dataframe with the estimated mean squared errors of the EBLUPs for the small domains
a dataframe with the values of the random effect estimators
a block diagonal matrix composed of sampling errors
a list containing the following objects:
method : type of fitting method, named "REML"
convergence : a logical value of convergence of Fisher Scoring algorithm
iterations : number of iterations performed by Fisher-Scoring algorithm
estcoef : a dataframe with the estimated model coefficient in the first column, their standard error in the second column, the t statistics in the third column, and the p-values of the significance of each coefficient in the last column
refvar : a dataframe with the estimated random effect variance
rho : a dataframe with the estimated rho of random effect variance and their rho parameter test based on Model 2
informationFisher : a matrix of information Fisher of Fisher-Scoring algorithm
## Load dataset data(datasae2) # Compute EBLUP and MSE of Y1 Y2 and Y3 based on Model 2 # using auxiliary variables X1 and X2 for each dependent variable ## Without parameter 'data' Fo <- list(f1=Y1~X1+X2, f2=Y2~X1+X2, f3=Y3~X1+X2) vardir <- c("v1", "v2", "v3", "v12", "v13", "v23") m2 <- eblupMFH2(Fo, vardir, data=datasae2) ## Without parameter 'data' Fo <- list(f1=datasae2$Y1~datasae2$X1+datasae2$X2, f2=datasae2$Y2~datasae2$X1+datasae2$X2, f3=datasae2$Y3~datasae2$X1+datasae2$X2) vardir <- datasae2[,c("v1", "v2", "v3", "v12", "v13", "v23")] m2 <- eblupMFH2(Fo, vardir) m2$eblup # see the EBLUP estimators m2$MSE # see MSE of EBLUP estimators
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.