robpredict: Robust prediction of random effects, fixed effects, and...

Description Usage Arguments Details Value Author(s) References Examples

Description

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).

Usage

1
2
3
4
5
6
7
8
robpredict(fit, areameans=NULL, k=NULL, reps=NULL)

## S3 method for class 'meanssaemodel'
print(x, digits=4, ...)
## S3 method for class 'meanssaemodel'
plot(x, y=NULL, type="e", sort=NULL, ...)
## S3 method for class 'meanssaemodel'
residuals(object, ...)

Arguments

fit

a fitted SAE model; object of class fitsaemodel

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: areadata=NULL, i.e., predictions are based on those data that have been used to estimate the model.

k

robustness tuning constant (of the Huber psi-function) for robust prediction. Notice that k does not necessarily be the same as the k that has been used in fitsaemodel. By default, k is equal to the tuning constant used in estimating the model parameters.

reps

number (integer) of bootstrap replicates for mean squared prediction error; default: reps=NULL

x

object of the class "meanssaemodel"; this argument is only used in the print method.

digits

integer, defining the number of decimal places to be shown in the print method (default: digits=4)

y

has no meaning, yet! (default: y=NULL; needs to included in the args list, because it is part of plot's generic arg definition)

type

character specifying the plot method; either "e" (error bars; default) or "l" (lines).

sort

only used in the plot method; if sort="means", the predicted means are ploted in ascending order (default: sort=NULL); similarly, with sort="fixef" and sort="ranef" the predicted means are sorted along the fixed effects or the random effects, respectively

object

object of the class fitsaemodel; a fitted model used in the residuals method.

...

not used

Details

The robpredict function enables the following modes of prediction:

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.

Value

Instance of the S3 class meanssaemodel

Author(s)

Tobias Schoch

References

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.

Examples

 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

Example output

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      

rsae documentation built on May 2, 2019, 5:50 p.m.