cv.strat {cubt} | R Documentation |
Computes a random stratified sampling.
cv.strat(y,nvc=10)
y |
Observations to stratify. Should be discrete |
nvc |
Number of folds for cross validation |
Computes a random stratified sampling according to observations in y.
Returns a vector giving for each observation from y the strata for which it belongs. If nvc equals 2 this corresponds to random stratified splitting into two quasi equal strata.
Badih Ghattas