data(schooldata)
school.x <- data.matrix(schooldata[,1:5])
school.y <- data.matrix(schooldata[,6:8])
## computes 25% breakdown point S-estimate and 99% confidence intervals
## based on 999 bootstrap samples:
Sres <- FRBmultiregS(school.x, school.y, R=999, bdp = 0.25, conf = 0.99)
## or, equivalently using the formula interface
# \donttest{
Sres <- FRBmultiregS(cbind(reading,mathematics,selfesteem)~., data=schooldata,
R=999, bdp = 0.25, conf = 0.99)
# }
## the print method displays the coefficient estimates
Sres
## the summary function additionally displays the bootstrap standard errors and p-values
## ("BCA" method by default)
summary(Sres)
summary(Sres, confmethod="basic")
## ask explicitely for the coefficient matrix:
Sres$coefficients
## or equivalently,
coef(Sres)
## For the error covariance matrix:
Sres$Sigma
## plot some bootstrap histograms for the coefficient estimates
## (with "BCA" intervals by default)
plot(Sres, expl=c("education", "occupation"), resp=c("selfesteem","reading"))
## plot bootstrap histograms for all coefficient estimates
plot(Sres)
## 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
Run the code above in your browser using DataLab