Description Usage Arguments Value Methods (by class) References See Also Examples
Generate bootstrap replicates. In addition to the ordinary bootstrap,
it supports weighted bootstrap (weights
),
Bayesian bootstrap (bayes
), cluster bootstrap (if data
is a
grouped data frame and groups = TRUE
), and stratified bootstrap
(if data
is grouped data frame and stratify = TRUE
).
1 2 3 4 5 6 7 8 9 10 |
data |
A data frame |
... |
Passed to methods |
R |
Number of replicates to sample |
weights |
Observation level weights. This must be the name of a column
in |
bayes |
If |
m |
Number of observations in the replicates. |
stratify |
Resample within groups (stratified bootstrap) |
groups |
Resample groups (clustered bootstrap) |
weight_groups |
If |
weight_within |
If |
A data frame with R
rows and the following columns:
A list of resample
objects. Training sets.
A list of resample
objects. Test sets.
An integer vector of identifiers
data.frame
: Bootstrap rows in a data frame.
grouped_df
: Bootstraps a grouped data data frame. Allows for
bootstrapping groups (clustered bootstrap) if groups = TRUE
, and
bootstrapping within groups (stratified bootstrap) if
stratify = TRUE
.
Angelo Canty and Brian Ripley (2016). boot: Bootstrap R (S-Plus) Functions. R package version 1.3-18.
Davison, A. C. & Hinkley, D. V. (1997) Bootstrap Methods and Their Applications. Cambridge University Press, Cambridge. ISBN 0-521-57391-2
The boot function boot
which is the
canonical R bootstrap implementation. This function produces slightly different
output and has more options than the modelr function
bootstrap
.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.