Returns a list containing two data.frames, called calibrate and validate. The first corresponds to the calibration sample, the second to the validation sample.
Arguments
data
A data.frame.
prop
A single value or vector of proportions of data in calibration sample. Defaults to .5, for an even split.
grouping
Name of the grouping variable. Providing a grouping variable ensures that the provided proportion is selected within each group.
Name of a variable indicating the pre-determined assignment to the calibration or the validation sample. This variable must be a factor containing only NA (no determined assingment), "calibrate", or "validate". If no variable is provided (the default) all cases are assigned randomly.