Description Usage Arguments Value Note Author(s) References See Also Examples

Draw bootstrap samples of observations or groups of observations and specify which bootstrap estimator of prediction error to compute.

1 | ```
bootSamples(n, R = 1, type = c("0.632", "out-of-bag"), grouping = NULL)
``` |

`n` |
an integer giving the number of observations for which to draw
bootstrap samples. This is ignored if |

`R` |
an integer giving the number of bootstrap samples. |

`type` |
a character string specifying a bootstrap estimator. Possible
values are |

`grouping` |
a factor specifying groups of observations. If supplied, the groups are resampled rather than individual observations such that all observations within a group belong either to the bootstrap sample or the test data. |

An object of class `"bootSamples"`

with the following
components:

`n`

an integer giving the number of observations or groups.

`R`

an integer giving the number of bootstrap samples.

`subsets`

an integer matrix in which each column contains the indices of the observations or groups in the corresponding bootstrap sample.

`grouping`

a list giving the indices of the observations belonging to each group. This is only returned if a grouping factor has been supplied.

This is a simple wrapper function for `perrySplits`

with a
control object generated by `bootControl`

.

Andreas Alfons

Efron, B. (1983) Estimating the error rate of a prediction rule: improvement
on cross-validation. *Journal of the American Statistical
Association*, **78**(382), 316–331.

`perrySplits`

, `bootControl`

,
`cvFolds`

, `randomSplits`

1 2 3 | ```
set.seed(1234) # set seed for reproducibility
bootSamples(20)
bootSamples(20, R = 10)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.