CrossValFolds: Partitions data for K-fold cross validation. Returns a list...

Description Usage Arguments Value Author(s)

View source: R/CrossValFolds.R

Description

Writes a data file in the format required for Java MCMC program

Usage

1
CrossValFolds(n = NULL, balance.var = NULL, K = 10, folds.seed = 1)

Arguments

n

Number of subjects in complete dataset to partition - use if do not care about balanced folds (leave balance.var set to NULL)

balance.var

A vectory containing a binary 0/1 outcome variable, which you wish the folds to be balanced with respsect to (in which case leave n=NULL)

K

number of folds to partition subjects into. Default is 10.

folds.seed

Random number seed for shuffling up subjects between folds for alternative partitions (default seed is 1)

Value

A list with K elements. The kth element is a vector of rows to exclude from the kth fold analysis, and use as validation data

Author(s)

Paul Newcombe


pjnewcombe/Pmisc documentation built on March 26, 2020, 2:09 p.m.