generate.split: Generating random splittings into learning and test data sets
Description
The function generate.split generates niter random splittings into learning and test
data sets for use in Monte-Carlo cross-validation (MCCV).
Usage
generate.split(niter,n,ntest)
Arguments
niter
The number of iterations (number of splits into learning and split sets).
n
The total number of observations in the data set.
ntest
The number of observations in the test sets.
Value
A niter x ntest matrix giving the indices of the observations included in the
test sets. The i-th row gives the indices of the ntest observations included in the test
set for the i-th MCCV iteration.
Details
This function is meant for use in Monte-Carlo cross-validation (MCCV).
References
A. L. Boulesteix (2007). WilcoxCV: an R package for fast variable selection in cross-validation. Bioinformatics 23:1702-1704.
# load WilcoxCV librarylibrary(WilcoxCV)
# Generate 50 splits with ratio 2:1 for a data set including 90 observationsmy.split<-generate.split(niter=50,n=90,ntest=30)