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
# \donttest{
GSres <- FRBmultiregGS(cbind(reading,mathematics,selfesteem)~., data=schooldata,
bdp = 0.25, conf = 0.8,R=99)
# }
#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
Run the code above in your browser using DataLab