multisample {crtests}R Documentation

Make multiple samples of data

Description

Make multiple samples of data

cross_fold: Make 'folds' samples of the data, so all(rbind(folds)==row.names(data))=TRUE

random: Makes iterations random samples of size holdout * nrow(data)

Usage

multisample.cross_fold(data, folds = 10, dependent,
  preserve_distribution = FALSE)

multisample.random(data, holdout = 0.2, iterations = 10, dependent,
  preserve_distribution = FALSE)

Arguments

data

Data to sample

folds

Number of folds to create

dependent

The dependent variable in the data. Used only if preserve_distribution=TRUE

preserve_distribution

Logical, only applicable if the dependent variable is a factor

holdout

The fraction of data to be used as holdout set

iterations

Number of iterations to make

Value

A list of numeric vectors of length 'folds'


[Package crtests version 0.2.1 Index]