
Computes S-Estimates of multivariate regression based on Tukey's biweight function using the fast-S algorithm.
# S3 method for formula
Sest_multireg(formula, data=NULL, ...)# S3 method for default
Sest_multireg(X, Y, int = TRUE, bdp = 0.5, control=Scontrol(...),
na.action=na.omit, ...)
An object of class FRBmultireg
which extends class mlm
and contains at least the following components:
S-estimates of the regression coefficients
the residuals, that is response minus fitted values
the fitted values.
S-estimate of the error shape matrix
S-estimate of the error covariance matrix
S-estimate of the size of the multivariate errors
implicit weights corresponding to the S-estimates (i.e. final weights in the RWLS procedure at the end of the fast-S algorithm)
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
tuning parameters used in Tukey biweight loss function, as determined by bdp
a list with following components: est
= character string indicating that GS-estimates were used and bdp
= a copy of the bdp
argument
a copy of the control
argument
an object of class formula
; a symbolic description of the model to be fit.
data frame from which variables specified in formula are to be taken.
a matrix or data frame containing the explanatory variables (possibly including intercept).
a matrix or data frame containing the response variables.
logical: if TRUE
an intercept term is added to the model (unless it is already present in X
).
required breakdown point. Should have bdp
a list with control parameters for tuning the computing algorithm, see Scontrol
().
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
.
Gert Willems, Stefan Van Aelst and Ella Roelant
This function is called by FRBmultiregS
.
S-estimates for multivariate regression were discussed in Van Aelst and Willems (2005). The algorithm used here is a multivariate
version of the fast-S algorithm introduced by Salibian-Barrera and Yohai (2006).
See Scontrol
for the adjustable tuning parameters of this algorithm.
Apart from the regression coefficients, the function returns both the error covariance matrix estimate Sigma
and
the corresponding shape estimate Gamma
(which has determinant equal to 1).
The scale
is determined by
The returned object inherits from class mlm
such that the standard coef
, residuals
, fitted
and predict
functions can be used.
M. Salibian-Barrera and V. Yohai (2006) A fast algorithm for S-regression estimates. Journal of Computational and Graphical Statistics, 15, 414--427.
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").
FRBmultiregS
, Sboot_multireg
, MMest_multireg
, Scontrol
data(schooldata)
school.x <- data.matrix(schooldata[,1:5])
school.y <- data.matrix(schooldata[,6:8])
## compute 25% breakdown S-estimates
Sres <- Sest_multireg(school.x,school.y, bdp=0.25)
# \donttest{
## or using the formula interface
Sres <- Sest_multireg(cbind(reading,mathematics,selfesteem)~., data=schooldata, bdp=0.25)
## the regression coefficients:
Sres$coefficients
## or alternatively
coef(Sres)
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, Sres$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, Sres$outFlag)
## (see also the diagnostic plot in plotDiag())
par(oldpar)
# }
Run the code above in your browser using DataLab