eblupFH2: EBLUP under stationary Fay-Herriot model for sample and non-sample area
Description
This function gives the EBLUP and the estimate of mean squared error (mse)
based on a stationary Fay-Herriot model for both sample and non-sample area.
an object of class list of formula, describe the model to be fitted
vardir
a vector of sampling variances of direct estimators for each small area
indicator
a vector indicating the sample and non-sample area
method
type of fitting method, default is "REML" methods
MAXITER
number of iterations allowed in the algorithm. Default is 100 iterations
PRECISION
convergence tolerance limit for the Fisher-scoring algorithm. Default value is 1e-04
data
a data frame comprising the variables named in formula and vardir
Value
The function returns a list with the following objects:
eblup
a vector with the values of the estimators for each sample area
eblup.out
a vector with the values of the estimators for each non-sample area
mse
a vector of the mean squared error estimates for each sample area
mse.out
a vector of the mean squared error estimates for each non-sample area
sample
a matrix consist of area code, eblup, mse, SE and CV for sample area
nonsample
a matrix consist of area code, eblup, mse, SE and CV for non-sample area
fit
a list containing the following objects:
estcoef : a data frame with the estimated model coefficients in the first column (beta),their asymptotic standard errors in the second column (std.error), the t statistics in the third column (tvalue) and the p-values of the significance of each coefficient in last column (pvalue)
refvar : estimated random effects variance
goodness : goodness of fit statistics
randomeffect : a data frame with the values of the random effect estimators
# NOT RUN {# Load data setdata(paddy)
# Fit Fay-Herriot model using sample and non-sample part of paddy dataresult <- eblupFH2(y ~ x1+x2, var, indicator ,"REML", 100, 1e-04,paddy)
result
# }