fitsaemodel | R Documentation |
fitsaemodel
fits SAE models that have been specified by
saemodel()
(or synthetic data generated by
makedata()
) for various (robust) estimation
methods.
fitsaemodel(method, model, ...)
convergence(object)
## S3 method for class 'fit_model_b'
print(x, digits = max(3L, getOption("digits") - 3L),
...)
## S3 method for class 'summary_fit_model_b'
print(x, digits = max(3L, getOption("digits")
- 3L), ...)
## S3 method for class 'fit_model_b'
summary(object, ...)
## S3 method for class 'fit_model_b'
coef(object, type = "both", ...)
method |
|
model |
an object of class |
digits |
|
object |
an object of class |
x |
an object of class |
type |
|
... |
additional arguments passed on to
|
Function fitsaemodel()
computes the following estimators:
maximum likelihood (ML): method = "ml"
,
Huber-type M-estimation: method = "huberm"
; this
method is called RML II by Richardson and Welsh (1995); see
Schoch (2012)
The ML is not robust against outliers.
The call for the Huber-type M-estimator (with Huber psi-function) is:
fitsaemodel(method = "huberm", model, k)
, where k
is
the robustness tuning constant of the Huber psi-function,
k \in (0, \infty]
.
By default, the computation of the M-estimator is initialized by a robust estimate that derives from a fixed-effects model (centered by the median instead of the mean); see Schoch (2012) for the details.
If the data are supposed to be heavily contaminated (or if the
default algorithm did not converge), one may try to initialize
the algorithm underlying fitsaemodel()
by a high breakdown-point
estimate. The package offers two initialization methods:
NOTE: the robustbase package (Maechler et al., 2022)
must be installed to use this functionality.
init = "lts"
: least trimmed squares (LTS)
regression from robustbase; see
ltsReg() and Rousseeuw and Van
Driessen (2006),
init = "s"
: regression S-estimator from
robustbase; see lmrob() and
Maronna et al. (2019).
For small and medium size datasets, both methods are equivalent in terms of computation time. For large data, the S-estimator is considerably faster.
The methods are computed by (nested) iteratively re-weighted least
squares and a derivative of Richard Brent's zeroin
algorithm;
see Brent (2013, Chapter 4). The functions depend on the subroutines in
BLAS (Blackford et al., 2002) and LAPACK (Anderson et al., 2000); see
Schoch (2012).
An instance of the class "fitmodel"
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1145/567806.567807")}
Brent, R.P. (2013). Algorithms for minimization without derivatives. Mineola (NY): Dover Publications Inc. (This publication is an unabridged republication of the work originally published by Prentice-Hall Inc., Englewood Cliffs, NJ, in 1973).
Maechler, M., Rousseeuw, P., Croux, C., Todorov, V., Ruckstuhl, A., Salibian-Barrera, M., Verbeke, T., Koller, M., Conceicao, E.L.T. and M. Anna di Palma (2022). robustbase: Basic Robust Statistics R package version 0.95-0. https://CRAN.R-project.org/package=robustbase
Maronna, R.A., Martin, D., V.J. Yohai and M. Salibian-Barrera (2019): Robust statistics: Theory and methods. Chichester: John Wiley and Sons, 2nd ed.
Richardson, A.M. and A.H. Welsh (1995). Robust restricted maximum likelihood in mixed linear model. Biometrics 51, 1429–1439. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.2307/2533273")}
Rousseeuw, P. J. and K. Van Driessen (2006). Computing LTS regression for large data sets. Data Mining and Knowledge Discovery 12, 29–45. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1007/s10618-005-0024-4")}
Schoch, T. (2012). Robust Unit-Level Small Area Estimation: A Fast Algorithm for Large Datasets. Austrian Journal of Statistics 41, 243–265. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.17713/ajs.v41i4.1548")}
fitsaemodel.control()
# use the landsat data
head(landsat)
# define the saemodel using the landsat data
model <- saemodel(formula = HACorn ~ PixelsCorn + PixelsSoybeans,
area = ~CountyName,
data = subset(landsat, subset = (outlier == FALSE)))
# summary of the model
summary(model)
# maximum likelihood estimates
fitsaemodel("ml", model)
# Huber M-estimate with robustness tuning constant k = 2
m <- fitsaemodel("huberm", model, k = 2)
m
# summary of the fitted model/ estimates
summary(m)
# obtain more information about convergence
convergence(m)
# extract the fixed effects
coef(m, "fixef")
# extract the random effects
coef(m, "ranef")
# extract both
coef(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.