This function gives the EBLUP (or EB predictor under normality) based on a Fay-Herriot model. Fitting method can be chosen between ML, REML and FH methods.
formula: an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. The variables included in formula
must have a length equal to the number of domains D. Details of model specification are given under Details.
vardir: vector containing the D sampling variances of direct estimators for each domain. The values must be sorted as the variables in formula.
method: type of fitting method, to be chosen between "ML", "REML" or "FH" methods.
MAXITER: maximum number of iterations allowed in the Fisher-scoring algorithm. Default is 100 iterations.
PRECISION: convergence tolerance limit for the Fisher-scoring algorithm. Default value is 0.0001.
B: number of bootstrap replicates to calculate the goodness-of-fit measures proposed by Marhuenda et al. (2014). Default value is 0 indicating that these measures are not calculated.
data: optional data frame containing the variables named in formula and vardir. By default the variables are taken from the environment from which eblupFH is called.
Details
A typical model has the form response ~ terms where response is the (numeric) response vector and terms is a series of terms which specifies a linear predictor for response. A terms specification of the form first + second indicates all the terms in first together with all the terms in second with duplicates removed.
A formula has an implied intercept term. To remove this use either y ~ x - 1 or y ~ 0 + x. See formula for more details of allowed formulae.
Returns
The function returns a list with the following objects: - eblup: vector with the values of the estimators for the domains.
fit: a list containing the following objects:
method:type of fitting method applied ("REML", "ML"or "FH").
convergence:a logical value equal to TRUE if Fisher-scoring algorithm converges in less than MAXITER iterations.
iterations:number of iterations performed by the Fisher-scoring algorithm.
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:vector containing several goodness-of-fit measures: loglikehood, AIC, BIC, KIC and the measures proposed by Marhuenda et al. (2014): AICc, AICb1, AICb2, KICc, KICb1, KICb2. B must be must be greater than 0 to obtain these last measures.
In case that formula or vardir contain NA values a message is printed and no action is done.
References
Fay, R.E. and Herriot, R.A. (1979). Estimation of income from small places: An application of James-Stein procedures to census data. Journal of the American Statistical Association 74, 269-277.
Marhuenda, Y., Morales, D. and Pardo, M.C. (2014). Information criteria for Fay-Herriot model selection. Computational Statistics and Data Analysis 70, 268-280.
Rao, J.N.K. (2003). Small Area Estimation. Wiley, London.
See Also
mseFH
Examples
# Load data set data(milk)attach(milk)# Fit FH model using REML method with indicators of 4 Major Areas as # explanatory variables.resultREML <- eblupFH(yi ~ as.factor(MajorArea), SD^2)resultREML
#Fit FH model using FH methodresultFH <- eblupFH(yi ~ as.factor(MajorArea), SD^2, method="FH")resultFH
detach(milk)