View source: R/bootcoefs-methods.R
bootcoefs | R Documentation |
This function provides an easy interface and useful output to bootstrapping the regression coefficients of robust linear regression models
bootcoefs(
object,
R = 999,
method = c("frb", "residuals", "cases"),
ncpus = NULL,
cl = NULL,
...
)
## S3 method for class 'complmrob'
bootcoefs(
object,
R = 999,
method = c("frb", "residuals", "cases"),
ncpus = NULL,
cl = NULL,
...
)
## S3 method for class 'lmrob'
bootcoefs(
object,
R = 999,
method = c("frb", "residuals", "cases"),
ncpus = NULL,
cl = NULL,
...
)
object |
the model to bootstrap the coefficients from |
R |
the number of bootstrap replicates. |
method |
one of |
ncpus |
the number of CPUs to utilize for bootstrapping. |
cl |
a snow or parallel cluster to use for bootstrapping. |
... |
currently ignored. |
If 'object' is created by 'complmrob' the default method is to use fast and robust bootstrap (FRB) as described in the paper by M. Salibian-Barrera, et al (2008). The same default is used if 'object' is an MM-estimate created by ‘lmrob(..., method = ’SM')'. The other options are to bootstrap the residuals or to bootstrap cases (observations), but the sampling distribution of the estimates from these methods can be numerically unstable and take longer to compute. If the 'object' is a robust estimate created by 'lmrob', but not an MM-estimate, the default is to bootstrap the residuals.
A list of type bootcoefs
for which print
,
summary
and plot
methods are available
bootcoefs(complmrob)
: For robust linear regression models with compositional data
bootcoefs(lmrob)
: For standard robust linear regression models
M. Salibian-Barrera, S. Aelst, and G. Willems. Fast and robust bootstrap. Statistical Methods and Applications, 17(1):41-71, 2008.
data <- data.frame(lifeExp = state.x77[, "Life Exp"], USArrests[ , -3])
mUSArr <- complmrob(lifeExp ~ ., data = data)
bc <- bootcoefs(mUSArr, R = 200) # the number of bootstrap replicates should
# normally be higher!
summary(bc)
plot(bc) # for the model diagnostic plots
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.