Robust (or "resistant") methods for statistics modelling have been
available in S from the start, in R in package
stats
(e.g.,
median(),
mean(*, trim = . ),
mad(),
IQR(),
or also
fivenum()
(the statistic behind
boxplot()
in
package graphics) or
lowess(), which had been complemented
by
runmed()
in 2003.
Much further important functionality has been made available in package
MASS
(by Bill Venables and Brian
Ripley, see
the
book
Modern Applied Statistics with S
),
notably
rlm()
for robust regression and
cov.rob()
for
robust multivariate scatter and covariance.
This task view is about R add-on packages providing newer or faster,
more efficient algorithms and notably for (robustification of) new models.
Please send suggestions for additions and extensions to the
task view maintainer
.
An international group of scientists working in the field of robust
statistics has made efforts (since October 2005) to coordinate several of
the scattered developments and make the important ones available
through a set of R packages complementing each other.
These should build on a basic package with "Essentials",
coined
robustbase
with (potentially many) other packages
building on top and extending the essential functionality to particular
models and or applications.
Further, there is the quite comprehensive package
robust, a version of the robust library of S-PLUS,
as an R package now GPLicensed thanks to Insightful and Kjell Konis.
Whereas there is currently quite a bit of overlap (between 'robustbase'
and 'robust'), the intent (as of Nov.2007) is that
robust
will eventually
depend
on
robustbase, the former
providing convenient routines for the casual user where the latter
will contain the underlying functionality, and provide the more
advanced statistician with a considerable choice of methodology.
We structure the packages roughly into the following topics, and
typically will first mention functionality in packages
robustbase
and
robust.
-
Regression (Linear, Generalized Linear, Nonlinear Models)
:
lmrob()
(robustbase) and
lmRob()
(robust) where the former uses the latest of the
fast-S algorithms and heteroscedasticity and autocorrelation corrected
(HAC) standard errors, the latter makes use of the M-S algorithm of
Maronna and Yohai (2000), automatically when there are factors
among the predictors (where S-estimators (and hence MM-estimators)
based on resampling typically badly fail).
The
ltsReg()
and
lmrob.S()
functions
are available in
robustbase, but rather for comparison
purposes.
rlm()
from
MASS.
Note that Koenker's quantile regression package
quantreg
contains L1 (aka LAD, least absolute deviations)-regression as a
special case, doing so also for nonparametric regression via
splines.
Quantile regression (and hence L1 or LAD) for mixed effect models,
is available in package
lqmm, whereas an
MM-like
approach for robust linear mixed effects modeling
is available from package
robustlmm.
Generalized linear models (GLMs) are provided both via
glmrob()
(robustbase) and
glmRob()
(robust).
Robust Nonlinear model fitting is available through
robustbase
's
nlrob().
multinomRob
fits overdispersed multinomial regression
models for count data.
rgam
fits robust GAMs, i.e., robust Generalized Additive
Models.
-
Multivariate Analysis
:
Here, the
rrcov
package which builds ("
Depends
")
on
robustbase
provides nice S4 class based methods,
that are planned to be moved into
robustbase, and additionally
robust PCA methodology.
Here,
robustbase
contains a slightly more flexible
version,
covMcd()
than
robust
's
fastmcd(), and similarly for
covOGK().
OTOH,
robust
's
covRob()
has automatically chosen
methods, notably
pairwiseQC()
for large dimensionality p.
Package
robustX
for experimental, or other not yet
established procedures, contains
BACON()
and
covNCC(), the latter providing the
neighbor variance estimation (NNVE) method of Wang and Raftery(2002),
which used to be in a package
covRobust
no longer on CRAN.
mvoutlier
(building on
robustbase) provides
sign methods for outlier identification in high dimensions.
FRB
performs robust inference based on
F
ast
and
R
obust
B
ootstrap on robust estimators, including
multivarate regression, PCA and Hotelling tests.
Note that robust PCA can be performed by using standard
\R's
princomp(), e.g.,
X <- stackloss; pc.rob <- princomp(X, covmat= MASS::cov.rob(X))
See also the CRAN task views
Multivariate
and
Cluster
-
Large Data Sets
: ...
(See also the CRAN task view
MachineLearning.)
-
Descriptive Statistics / Exploratory Data Analysis
: ...
-
Time Series
:
-
Package
robfilter
contains robust regression and
filtering methods for univariate time series, typically based on
repeated (weighted) median regressions.
-
Peter Ruckdeschel has started to lead an effort for a robust
time-series package, see
robust-ts
on R-Forge.
-
Further, robKalman,
"Routines for Robust Kalman
Filtering --- the ACM- and rLS-filter"
, is being developed, see
robkalman
on R-Forge.
Note however that these (last two items) are not yet available from CRAN.
-
Econometric Models
:
Econometricians tend to like HAC (heteroscedasticity and
autocorrelation corrected) standard errors. For a broad class of
models, these are provided by package
sandwich.
Note that
vcov(lmrob())
also uses a version of HAC
standard errors for its robustly estimated linear models.
See also the CRAN task view
Econometrics
-
Robust Methods for Bioinformatics
:
There are several packages in the
Bioconductor project
providing specialized robust methods.
-
Other approaches to robust and resistant methodology
:
-
The package
distr
and its several child packages
also allow to explore robust estimation concepts, see e.g.,
distr
on R-Forge.
-
Notably, based on these,
the project
robast
aims for the implementation of R
packages for the computation of optimally robust estimators and
tests as well as the necessary infrastructure (mainly S4 classes
and methods) and diagnostics; cf. M. Kohl (2005).
It includes the R packages
RandVar,
RobAStBase,
RobLox,
RobLoxBioC,
RobRex.
Further,
ROptEst, and
ROptRegTS.
-
RobustAFT
computes Robust Accelerated Failure
Time Regression for Gaussian and logWeibull errors.