Description Usage Arguments Details Value Author(s) References Examples
The function robpredict
robustly predicts the random effects, fixed effects, and area-specific means under the model. As concerned with robustly predicting the realizations of the random effects, we rely on the method of Copt and Victoria-Feser (cf. Heritier et al., 2009, 113–114); not the method of Sinha and Rao (2009).
1 2 3 4 5 6 7 8 |
fit |
a fitted SAE model; object of class |
areameans |
numeric matrix (typically, with area-level means); the no. of rows must be equal to the no. of areas; the no. of columns must be equal to the no. of fixed-effects coefficients (incl. intercept). By default: |
k |
robustness tuning constant (of the Huber psi-function) for robust prediction. Notice that |
reps |
number (integer) of bootstrap replicates for mean squared prediction error; default: |
x |
object of the class |
digits |
integer, defining the number of decimal places to be shown in the |
y |
has no meaning, yet! (default: |
type |
character specifying the |
sort |
only used in the |
object |
object of the class |
... |
not used |
The robpredict
function enables the following modes of prediction:
if areameans=NULL
, then the predictions are exclusively based on the sample values,
if robpredict
is called with areameans
(i.e., matrix with area-specific means of the auxiliary data of conformable size), then the fixed-effect predictions and thus also the predictions of the area-specific means are based on the auxiliary data,
if, in addition to specifying areameans
, one specifies also the number of bootstrap replications (i.e., reps
; some positive integer), the function computes area-specific mean square prediction error (MSPE) estimates for the area-level means. The MSPE is obtained, in line with Sinha and Rao (2009), from a (robust) parametric bootstrap; see Lahiri (2003) and Hall and Maiti (2006) for more details.
The tuning constant k
regulates the degree of robustness (i.e., degree of winsorization of the Huber psi-function) when predicting the random effects. If k
is sufficiently large (ideally, if k
is equal to infinity), the predictions correspond to the EBLUP.
Instance of the S3 class meanssaemodel
Tobias Schoch
Copt, S. and M.-P. Victoria-Feser (2009): Robust Predictions in Mixed Linear Models, Research Report, University of Geneva.
Lahiri, P. (2003): On the impact of bootstrap in survey sampling and small area estimation. Statistical Science 18, 199–210.
Hall, P. and T. Maiti (2006): On parametric bootstrap methods for small area prediction. Journal of the Royal Statistical Society. Series B, 68, 221–238.
Heritier, S., Cantoni, E., Copt, S., and M.-P. Victoria-Feser (2009): Robust methods in biostatistics. New York: John Wiley and Sons.
Sinha, S.K. and J.N.K. Rao (2009): Robust Small Area Estimation. The Canadian Journal of Statistics 37, 381–399.
1 2 3 4 5 6 7 8 9 10 11 12 | #generate the synthetic data/model
mymodel <- makedata()
#compute Huber M-estimation type estimates of the model "mymodel"
#robustness tuning constant k = 2
myfittedmodel <- fitsaemodel("huberm", mymodel, k=2)
myfittedmodel
#get a summary of the model
summary(myfittedmodel)
#robustly predict the random effects and the area-level means.
#Here, we choose the robustness tuning constant k equal to 1.8
mypredictions <- robpredict(myfittedmodel, k=1.8)
mypredictions
|
ESTIMATES OF SAE-MODEL (model type B)
Method: Huber-type M-estimation
Robustness tuning constant: k = 2
---
Fixed effects
Model: y ~ (Intercept) + x1
Coefficients:
(Intercept) x1
1.20267 1.10425
---
Random effects
Model: ~1| area-specific ranef
(Intercept) Residual
Std. Dev. 0.982857 0.963518
---
Number of Observations: 80
Number of Areas: 20
ESTIMATION SUMMARY
Method: Huber-type M-estimation
Robustness tuning constant: k = 2
---
Fixed effects
Value Std.Error t-value df p-value
(Intercept) 1.202669 0.244786 4.913135 59 7.4671e-06 ***
x1 1.104255 0.109765 10.060174 59 2.0529e-14 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
---
Degree of downweighting/winsorization:
sum(wgt)/n
fixeff 0.995019
residual var 0.991020
area raneff var 0.995019
Robustly Estimated/Predicted Area-Level Means:
raneff fixeff predicted mean
A1 1.14031 1.28275 2.42306
A2 -0.60180 2.24396 1.64216
A3 0.50223 1.16969 1.67192
A4 -0.07711 1.67481 1.59769
A5 -0.38272 0.78160 0.39888
A6 -0.71718 -0.07217 -0.78935
A7 0.75193 2.51788 3.26981
A8 1.12775 0.87120 1.99896
A9 -0.14995 1.17028 1.02032
A10 -0.07209 0.62513 0.55304
A11 1.17039 1.62795 2.79834
A12 -0.83182 0.61212 -0.21971
A13 2.16524 1.37594 3.54118
A14 -0.57533 1.25437 0.67904
A15 0.14202 0.75720 0.89922
A16 -1.48167 1.55013 0.06846
A17 -1.95064 0.45086 -1.49977
A18 -0.09289 0.97006 0.87717
A19 0.56085 1.80987 2.37072
A20 -0.44035 0.58980 0.14944
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.