eblupNSFH1 | R Documentation |
This function gives the EBLUP and the estimate of mean squared error (mse) based on a nonstationary Fay-Herriot model for sample area.
eblupNSFH1( formula, vardir, lat, long, method = "REML", MAXITER, PRECISION, data )
formula |
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 |
lat |
a vector of latitude for each small area |
long |
a vector of longitude for each small 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, vardir, lat and long |
The function returns a list with the following objects:
a vector with the values of the estimators for each small area
a vector of the mean squared error estimates for each small area
a matrix consist of area code, eblup, mse, SE and CV
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
spatialcorr : spatial correlation parameter
randomeffect : a data frame with the values of the random effect estimators
goodness : goodness of fit statistics
# Load data set data(paddysample) # Fit nonstationary Fay-Herriot model using sample part of paddy data result <- eblupNSFH1(y ~ x1+x2, var, latitude, longitude, "REML", 100, 1e-04,paddysample) result
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.