Description Usage Arguments Details Value Author(s) References See Also Examples
fitsaemodel
is the workhorse function. It estimates SAE models that have been set up by saemodel
(or synthetic data generated by makedata
) by various (robust) estimation methods.
1 2 3 4 5 6 7 8 9 10 | fitsaemodel(method, model, ...)
convergence(object)
## S3 method for class 'fitsaemodel'
print(x, digits=6, ...)
## S3 method for class 'fitsaemodel'
summary(object, digits=6, ...)
## S3 method for class 'fitsaemodel'
coef(object, type="both", ...)
|
method |
character string defining the method to be used; currently, either |
model |
a |
x |
used by the |
digits |
used by the |
object |
an object of the class |
type |
character string use in the |
... |
additional arguments delivered to either |
The function fitsaemodel
is a wrapper function that calls the algorithm associated with a particular method. Two methods are currently implemented
maximum likelihood (method="ml"
),
Huber-type M-estimation (method="huberm"
; cf. RML II of Richardson and Welsh, 1995).
The call for ML is straightforward: fitsaemodel(method="ml", model)
, where model
is a SAE model generated by saemodel
. Note that ML is not a robust fitting method.
The call for Huber-type M-estimaton (with Huber psi-function) is: fitsaemodel(method="huberm", model, k)
, where model
is a SAE model generated by saemodel
, and k
is the robustness tuning constant of the Huber psi-function.
By default, the "huberm"
method is initialized by means of pre-determined robust estimates of a fixed-effects model (centered by the median instead of the mean); see Schoch (2012) for the details.
If your data are supposed to be heavily contaminated (or if the default algorithm did not converge), you may initialize the fitsaemodel
alogrithm with a high-breakdown-point estimate. The rsae package offers two methods to initialize the algorithm, "lts"
and "s"
; see below. NOTE, you have to install the robustbase package in order to use these methods. The initialization methods are called in the fitsaemodel
device (as additional argument), using
init="lts"
, for fast-LTS regression form robustbase; see also Rousseeuw and Van Driessen (2006),
init="s"
, for a regression S-estimator from robustbase; see also Maronna et al. (2006).
For more details on the methods, you are refered to the documentation of robustbase. In general, for small to medium datasets, both methods are equivalent. For data with more than 50,000 observations, the S-estimator is considerably faster. (If the "ml"
does not converge, you may initialize it analogously–though, it may be rather inefficient.)
For both method="ml"
and method="huberm"
, the estimates are obtained by means of a nested loop of IRWLS approaches and Brent's zeroin
method (Brent, 1973). All the functions/subroutines are optimized to be rich in BLAS level-one operations (Blackford et al., 2002) and draw heavily on LAPACK (Anderson et al., 2000).
An instance of the class "fitmodel"
Tobias Schoch
Anderson, E., Bai, Z., Bischof, C., Blackford, L. S., Demmel, J., Dongarra, J., et al. (2000): LAPACK users' guide (3rd ed.). Philadelphia: Society for Industrial and Applied Mathematics (SIAM).
Blackford, L.S., Petitet, A., Pozo, R., Remington, K., Whaley, R.C., Demmel, J., et al. (2002): An updated set of basic linear algebra subprograms (BLAS). ACM Transactions on Mathematical Software, 28, 135–151.
Brent, R.P. (1973): Algorithms for minimization without derivatives. Englewood Cliffs, NJ: Prentice-Hall.
Maronna, R.A., Martin, D., and V.J. Yohai (2006): Robust statistics: Theory and methods. Chichester: John Wiley.
Richardson, A.M. and A.H. Welsh (1995): Robust restricted maximum likelihood in mixed linear model. Biometrics 51, 1429–1439.
Rousseeuw, P. J. and K. Van Driessen (2006): Computing LTS regression for large data sets. Data Mining and Knowledge Discovery 12, 29–45.
Schoch, T. (2012 under revision) Robust Unit-Level Small Area Estimation: A Fast Algorithm for Large Datasets, Austrian Journal of Statistics.
1 2 3 4 5 6 7 8 | #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)
|
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
0.933341 0.896392
---
Random effects
Model: ~1| area-specific ranef
(Intercept) Residual
Std. Dev. 0.931538 0.965090
---
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) 0.933341 0.234734 3.976169 59 0.00019367 ***
x1 0.896392 0.133173 6.731051 59 7.7054e-09 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
---
Degree of downweighting/winsorization:
sum(wgt)/n
fixeff 0.984917
residual var 0.974706
area raneff var 0.984917
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.