MMest_multireg: MM-Estimates for Multivariate Regression

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/MMest_multireg.R

Description

Computes MM-Estimates of multivariate regression, using initial S-estimates

Usage

1
2
3
4
5
6
## S3 method for class 'formula'
MMest_multireg(formula, data=NULL, ...)

## Default S3 method:
MMest_multireg(X, Y, int = TRUE, control=MMcontrol(...),
na.action=na.omit, ...)

Arguments

formula

an object of class formula; a symbolic description of the model to be fit.

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 TRUE an intercept term is added to the model (unless it is already present in X)

control

a list with control parameters for tuning the MM-estimate and its computing algorithm, see MMcontrol().

na.action

a function which indicates what should happen when the data contain NAs. Defaults to na.omit.

...

allows for specifying control parameters directly instead of via control

Details

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.

Value

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 bdp and eff)

method

a list with following components: est = character string indicating that GS-estimates were used,bdp = a copy of the bdp argument, eff a copy of the eff argument

control

a copy of the control argument

SBeta

S-estimate of the regression coefficient matrix

SSigma

S-estimate of the error covariance matrix

SGamma

S-estimate of the error shape matrix

Author(s)

Gert Willems, Stefan Van Aelst and Ella Roelant

References

See Also

FRBmultiregMM, MMboot_multireg, Sest_multireg, MMcontrol

Examples

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

Example output

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

FRB documentation built on May 29, 2017, 5:45 p.m.

Related to MMest_multireg in FRB...