pbmseBHF {sae} | R Documentation |
Parametric bootstrap mean squared error estimators of the EBLUPs of means obtained under a nested error linear regression model.
Description
Calculates, for selected domains, parametric bootstrap mean squared error estimators of the EBLUPs of means, when EBLUPs are obtained from a nested error linear regression model.
Usage
pbmseBHF(formula, dom, selectdom, meanxpop, popnsize, B = 200, method = "REML",
data)
Arguments
formula |
an object of class |
dom |
|
selectdom |
|
meanxpop |
|
popnsize |
|
B |
number of bootstrap replicates. Default is |
method |
a character string. If |
data |
optional data frame containing the variables named in |
Details
This function uses random number generation. To fix the seed, use set.seed
.
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.
Value
The function returns a list with the following objects:
est |
a list with the results of the estimation process: |
mse |
data frame with number of rows equal to number of selected domains, containing in its columns the domain codes ( |
Cases with NA values in formula
or dom
are ignored.
References
- Gonzalez-Manteiga, W., Lombardia, M., Molina, I., Morales, D. and Santamaria, L. (2008). Analytic and bootstrap approximations of prediction errors under a multivariate Fay-Herriot model. Computational Statistics and Data Analysis 52, 5242-5252.
- Molina, I. and Rao, J.N.K. (2010). Small Area Estimation of Poverty Indicators. The Canadian Journal of Statistics 38, 369-385.
See Also
Examples
# Load data set for segments (units within domains)
data(cornsoybean)
# Load data set for counties
data(cornsoybeanmeans)
attach(cornsoybeanmeans)
# Construct data frame with county means of auxiliary variables for
# domains. First column must include the county code
Xmean <- data.frame(CountyIndex, MeanCornPixPerSeg, MeanSoyBeansPixPerSeg)
Popn <- data.frame(CountyIndex, PopnSegments)
# Compute parametric bootstrap MSEs of the EBLUPs of means of crop areas
# for each county.
set.seed(123)
result <- pbmseBHF(CornHec ~ CornPix + SoyBeansPix, dom=County,
selectdom=c(10,1,5), meanxpop=Xmean, popnsize=Popn,
B=50, data=cornsoybean)
result
detach(cornsoybeanmeans)