Computes MM-Estimates of multivariate regression, using initial S-estimates
## 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.
Returns
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
References
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. tools:::Rd_expr_doi("10.18637/jss.v053.i03") .
data(schooldata)school.x <- data.matrix(schooldata[,1:5])school.y <- data.matrix(schooldata[,6:8])## compute 95% efficient MM-estimatesMMres <- 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)## Do plots n <- nrow(schooldata) oldpar <- 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()) par(oldpar)