FRBmultiregMM {FRB} | R Documentation |
Computes MM-estimates for multivariate regression together with standard errors and confidence intervals based on the Fast and Robust Bootstrap.
## S3 method for class 'formula': FRBmultiregMM(formula, data, ...) ## Default S3 method: FRBmultiregMM(X, Y, int = TRUE, R = 999, conf = 0.95, control=MMcontrol(...), ...)
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. |
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 ) |
R |
number of bootstrap samples |
conf |
level of the bootstrap confidence intervals. Default is conf=0.95 |
control |
a list with control parameters for tuning the MM-estimate and its computing algorithm,
see MMcontrol (). |
... |
allows for specifying control parameters directly instead of via control |
Multivariate MM-estimates combine high breakdown point and high Gaussian efficiency. They are defined by first computing an S-estimate 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 a more efficient M-estimate (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-estimate) is tuned in order to obtain 50% breakdown point.
The default tuning of the second loss function (M-estimate) ensures 95% efficiency at the normal model for the coefficient estimates.
This tuning is recommended but can be changed through argument control
if desired.
The computation is carried out by a call to MMest_multireg
(), which first performs the fast-S algorithm
(see Sest_multireg
) and does the M-part by reweighted least squares iteration.
See MMcontrol
for some adjustable tuning parameters regarding the algorithm.
The result of this call is also returned as the value est
.
The Fast and Robust Bootstrap (Salibian-Barrera and Zamar 2002) is used to calculate
so-called basic bootstrap confidence intervals and bias corrected and accelerated
confidence intervals (Davison and Hinkley 1997, p.194 and p.204 respectively). This computation is carried out by a call to MMboot_multireg
(), the result
of which is returned as the value bootest
. Bootstrap standard errors are returned as well.
In the formula
-interface, a multivariate response is produced via cbind
. For example cbind(x4,x5) ~ x1+x2+x3
.
All arguments from the default method can also be passed to the formula
method except for int
(passing int
explicitely
will produce an error; the inclusion of an intercept term is determined by formula
).
An object of class FRBmultireg
, which is a list containing the following components:
Beta |
MM-estimate for the regression coefficients |
Sigma |
MM-estimate for the error covariance matrix |
SE |
bootstrap standard errors corresponding to the elements in Beta |
CI.bca.lower |
a matrix containing the lower bounds of the bias corrected and accelerated confidence intervals for each element in Beta . |
CI.bca.upper |
a matrix containing the upper bounds of the bias corrected and accelerated confidence intervals for each element in Beta . |
CI.basic.lower |
a matrix containing the lower bounds of basic bootstrap intervals for each element in Beta . |
CI.basic.upper |
a matrix containing the upper bounds of basic bootstrap intervals for each element in Beta . |
est |
MM-estimates as returned by the call to MMest_multireg () |
bootest |
bootstrap results for the MM-estimates as returned by the call to MMboot_multireg () |
conf |
a copy of the conf argument |
method |
a list with following components: est = character string indicating that MM-estimates were used,
bdp = a copy of bdp from the control argument, and eff = a copy of eff from the control argument |
control |
a copy of the control argument |
X, Y |
either copies of the respective arguments or the corresponding matrices produced from formula |
Gert Willems and Ella Roelant
summary.FRBmultireg
, print.FRBmultireg
, plot.FRBmultireg
, MMboot_multireg
,
MMest_multireg
, FRBmultiregS
, FRBmultiregGS
, MMcontrol
data(schooldata) school.x <- data.matrix(schooldata[,1:5]) school.y <- data.matrix(schooldata[,6:8]) #computes MM-estimate and 95% confidence intervals #based on 999 bootstrap samples: MMres <- FRBmultiregMM(school.x, school.y, R=999, conf = 0.95) #or, equivalently, MMres <- FRBmultiregMM(cbind(reading,mathematics,selfesteem)~., data=schooldata, R=999, conf = 0.95) #the print method displays the coefficients with their bootstrap standard errors MMres #the summary function additionally displays the confidence intervals #("BCA" method by default) summary(MMres) summary(MMres, confmethod="basic") #ask explicitely for the coefficient matrix: MMres$Beta #or for the error covariance matrix: MMres$Sigma #plot some bootstrap histograms for the coefficient estimates #(with "BCA" intervals by default) plot(MMres, which=2, expl=c("education", "occupation"), resp=c("selfesteem","reading")) #plot bootstrap histograms for all coefficient estimates plot(MMres, which=2) #probably the plot-function has made a selection of coefficients to plot here, #since 'all' was too many to fit on one page, see help(plot.FRBmultireg); #this is platform-dependent # diagnostic plot for outlier detection: plot(MMres, which=1) # this may take a while, since the function needs to compute MM-estimates # for the X matrix