Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/MMest_multireg.R
Computes MM-Estimates of multivariate regression, using initial S-estimates
1 2 3 4 5 6 |
formula |
an object of class |
data |
data frame from which variables specified in formula are to be taken. |
X |
a matrix or data frame containing the explanatory variables (possibly including intercept). |
Y |
a matrix or data frame containing the response variables. |
int |
logical: if |
control |
a list with control parameters for tuning the MM-estimate and its computing algorithm,
see |
na.action |
a function which indicates what should happen when the data contain NAs. Defaults to |
... |
allows for specifying control parameters directly instead of via |
This function is called by FRBmultiregMM
.
The MM-estimates are defined by first computing S-estimates of regression, then fixing the scale component of the error covariance
estimate, and finally re-estimating the regression coefficients and the shape part of the error covariance by more efficient
M-estimates (see Tatsuoka and Tyler (2000) for MM-estimates in the special case of location/scatter estimation, and Van Aelst and
Willems (2005) for S-estimates of multivariate regression). Tukey's biweight is used for
the loss functions. By default, the first loss function (in the S-estimates) is tuned in order to obtain 50% breakdown point.
The default tuning of the second loss function (M-estimates) ensures 95% efficiency at the normal model for the coefficient estimates.
The desired efficiency can be changed via argument control
.
The computation of the S-estimates is performed by a call to Sest_multireg
, which uses the fast-S algorithm.
See MMcontrol
() to see or change the tuning parameters for this algorithm. The M-estimate part is computed
through iteratively reweighted least squares (RWLS).
Apart from the MM-estimate of the regression coefficients, the function returns both the MM-estimate of the error
covariance Sigma
and the corresponding shape estimate Gamma
(which has determinant equal to 1).
Additionally, the initial S-estimates are returned as well (their Gaussian efficiency is usually lower than the MM-estimates but they may
have a lower bias).
The returned object inherits from class mlm
such that the standard coef
, residuals
, fitted
and predict
functions can be used.
An object of class FRBmultireg
which extends class mlm
and contains at least the following components:
coefficients |
MM-estimates of the regression coefficients |
residuals |
the residuals, that is response minus fitted values |
fitted.values |
the fitted values. |
Sigma |
MM-estimate of the error covariance matrix |
Gamma |
MM-estimate of the error shape matrix |
scale |
S-estimate of the size of the multivariate errors |
weights |
implicit weights corresponding to the MM-estimates (i.e. final weights in the RWLS procedure) |
outFlag |
outlier flags: 1 if the robust distance of the residual exceeds the .975 quantile of (the square root of) the chi-square distribution with degrees of freedom equal to the dimension of the responses; 0 otherwise |
c0,b,c1 |
tuning parameters of the loss functions (depend on control parameters |
method |
a list with following components: |
control |
a copy of the |
SBeta |
S-estimate of the regression coefficient matrix |
SSigma |
S-estimate of the error covariance matrix |
SGamma |
S-estimate of the error shape matrix |
Gert Willems, Stefan Van Aelst and Ella Roelant
K.S. Tatsuoka and D.E. Tyler (2000) The uniqueness of S and M-functionals under non-elliptical distributions. The Annals of Statistics, 28, 1219–1243.
S. Van Aelst and G. Willems (2005) Multivariate regression S-estimators for robust estimation and inference. Statistica Sinica, 15, 981–1001.
S. Van Aelst and G. Willems (2013). Fast and robust bootstrap for multivariate inference: The R package FRB. Journal of Statistical Software, 53(3), 1–32. URL: http://www.jstatsoft.org/v53/i03/.
FRBmultiregMM
, MMboot_multireg
, Sest_multireg
, MMcontrol
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | data(schooldata)
school.x <- data.matrix(schooldata[,1:5])
school.y <- data.matrix(schooldata[,6:8])
# compute 95% efficient MM-estimates
MMres <- MMest_multireg(school.x,school.y)
# or using the formula interface
MMres <- MMest_multireg(cbind(reading,mathematics,selfesteem)~., data=schooldata)
# the MM-estimate of the regression coefficient matrix:
MMres$coefficients
# or alternatively
coef(MMres)
n <- nrow(schooldata)
par(mfrow=c(2,1))
# the estimates can be considered as weighted least squares estimates with the
# following implicit weights
plot(1:n, MMres$weights)
# Sres$outFlag tells which points are outliers based on whether or not their
# robust distance exceeds the .975 chi-square cut-off:
plot(1:n, MMres$outFlag)
# (see also the diagnostic plot in plotDiag())
|
Loading required package: corpcor
Loading required package: rrcov
Loading required package: robustbase
Scalable Robust Estimators with High Breakdown Point (version 1.4-7)
reading mathematics selfesteem
(Intercept) 2.19568721 2.75459143 0.275344081
education 0.12587721 0.04901664 -0.011459842
occupation 5.04902062 5.68212541 1.637972538
visit -0.04408345 -0.01622289 0.243728461
counseling -0.72898666 -0.74220282 0.006462548
teacher -0.16767503 -0.23841060 0.034070556
reading mathematics selfesteem
(Intercept) 2.19568721 2.75459143 0.275344081
education 0.12587721 0.04901664 -0.011459842
occupation 5.04902062 5.68212541 1.637972538
visit -0.04408345 -0.01622289 0.243728461
counseling -0.72898666 -0.74220282 0.006462548
teacher -0.16767503 -0.23841060 0.034070556
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.