cv.separate: cross-validation index function, separate train and test sets
Description
a function to setup training and testing datasets, select data point in test every nfold time points
Usage
cv.separate(period, nfold = 5)
Value
a list object, includes
- train
training dataset
- test
test dataset
Arguments
- period
an input dataset with size of n by p
- nfold
an positive integer, indicates the number of folds in cv