Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/FRBmultiregGS.R
Computes GS-estimates for multivariate regression together with standard errors, confidence intervals and p-values based on the Fast and Robust Bootstrap.
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. |
Y |
a matrix or data frame containing the response variables. |
int |
logical: if |
R |
number of bootstrap samples. Default is |
bdp |
required breakdown point. Should have 0 < |
conf |
confidence level of the bootstrap confidence intervals. Default is |
control |
a list with control parameters for tuning the 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 |
Generalized S-estimators are defined by minimizing the determinant of a robust estimator of the scatter matrix of
the differences of the residuals (Roelant et al. 2009). Hence, this procedure is intercept free and only gives an estimate for the slope matrix. To estimate
the intercept, we use the M-type estimator of location of Lopuhaa (1992) on the residuals with the residual scatter matrix
estimate of the residuals as a preliminary estimate. This computation is carried out by a call to GSest_multireg
(),
which uses a fast-S-type algorithm (its tuning parameters can be changed via the control
argument).
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 (BCa)
confidence intervals (Davison and Hinkley 1997, p.194 and p.204 respectively).
Apart from the intervals with the requested confidence level, the function also returns p-values for each coefficient
corresponding to the hypothesis that the actual coefficient is zero. The p-values are computed as
1 minus the smallest level for which the confidence intervals would include zero. Both BCa and basic bootstrap p-values in this sense are given.
The bootstrap calculation is carried out by a call to GSboot_multireg
(), the result
of which is returned as the value bootest
. Bootstrap standard errors are returned as well.
Note: Bootstrap samples which contain too few distinct observations with positive weights are discarded
(a warning is given if this happens). The number of samples actually used is returned via ROK
.
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.
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 |
GS-estimates of the regression coefficients |
residuals |
the residuals, that is response minus fitted values |
fitted.values |
the fitted values. |
Sigma |
GS-estimate of the error covariance matrix |
scale |
GS-estimate of the size of the multivariate errors |
weights |
implicit weights corresponding to the GS-estimates (i.e. final weights in the RWLS procedure for the intercept estimate) |
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 |
SE |
bootstrap standard errors corresponding to the regression coefficients |
cov |
bootstrap covariance matrix corresponding to the regression coefficients (in vectorized form) |
CI.bca.lower |
a matrix containing the lower bound of the bias corrected and accelerated confidence intervals for the regression coefficients |
CI.bca.upper |
a matrix containing the upper bound of the bias corrected and accelerated confidence intervals for the regression coefficients |
CI.basic.lower |
a matrix containing the lower bound of basic bootstrap intervals for the regression coefficients |
CI.basic.upper |
a matrix containing the upper bound of basic bootstrap intervals for the regression coefficients |
p.bca |
a matrix containing the p-values based on the BCa confidence intervals for the regression coefficients |
p.basic |
a matrix containing the p-values based on the basic bootstrap intervals for the regression coefficients |
est |
GS-estimates as returned by the call to |
bootest |
bootstrap results for the GS-estimates as returned by the call to |
conf |
a copy of the |
method |
a list with following components: |
control |
a copy of the |
X, Y |
either copies of the respective arguments or the corresponding matrices produced from |
ROK |
number of bootstrap samples actually used (i.e. not discarded due to too few distinct observations with positive weight) |
Ella Roelant, Stefan Van Aelst and Gert Willems
A.C. Davison and D.V. Hinkley (1997) Bootstrap Methods and their Application. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge: Cambridge University Press.
H.P. Lopuhaa (1992) Highly efficient estimators of multivariate location with high breakdown point. The Annals of Statistics, 20, 398-413.
E. Roelant, S. Van Aelst and C. Croux (2009) Multivariate Generalized S-estimators. Journal of Multivariate Analysis, 100, 876–887.
M. Salibian-Barrera, S. Van Aelst and G. Willems (2008) Fast and robust bootstrap. Statistical Methods and Applications, 17, 41-71.
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/.
summary.FRBmultireg
, plot.FRBmultireg
, GSboot_multireg
, GSest_multireg
,
FRBmultiregMM
, FRBmultiregS
, GScontrol
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | data(schooldata)
school.x <- data.matrix(schooldata[,1:5])
school.y <- data.matrix(schooldata[,6:8])
#computes 25% breakdown point GS-estimate and 80% confidence intervals
#based on 99 bootstrap samples:
GSres <- FRBmultiregGS(school.x, school.y, R=99, bdp = 0.25, conf = 0.8,nsamp=50)
#or using the formula interface
## Not run: GSres <- FRBmultiregGS(cbind(reading,mathematics,selfesteem)~., data=schooldata,
bdp = 0.25, conf = 0.8,R=99)
## End(Not run)
#the print method just displays the coefficient estimates
GSres
#the summary function additionally displays the bootstrap standard errors and p-values
#("BCA" method by default)
summary(GSres)
summary(GSres, confmethod="basic")
#ask explicitely for the coefficient matrix:
GSres$coefficients
# or equivalently,
coef(GSres)
#For the error covariance matrix:
GSres$Sigma
#plot some bootstrap histograms for the coefficient estimates
#(with "BCA" intervals by default)
plot(GSres, expl=c("education", "occupation"), resp=c("selfesteem","reading"))
#plot bootstrap histograms for all coefficient estimates
plot(GSres)
#possibly the plot-function has made a selection of coefficients to plot here,
#since 'all' may have been too many to fit on one page, see help(plot.FRBmultireg);
#this is platform-dependent
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.