splitControl: Control object for random data splits
Description
Generate an object that controls how to split \(n\) observations or
groups of observations into training and test data to be used for (repeated)
random splitting (also known as random subsampling or Monte Carlo
cross-validation).
Usage
splitControl(m, R = 1, grouping = NULL)
Arguments
m
an integer giving the number of observations or groups of
observations to be used as test data.
R
an integer giving the number of random data splits.
grouping
a factor specifying groups of observations.
Value
An object of class "splitControl" with the following
components:
m
an integer giving the number of observations or groups of
observations to be used as test data.
R
an integer giving the number of random data splits.
grouping
if supplied, a factor specifying groups of
observations. The data will then be split according to the groups rather
than individual observations such that all observations within a group
belong either to the training or test data.