View source: R/model.comparison.R
makePartitions | R Documentation |
makePartitions
makes the partitions used to run a BEDASSLE cross-validation analysis
makePartitions(prefix, nReplicates = 10, nPartitions = 5, N)
prefix |
A |
nReplicates |
An |
nPartitions |
An |
N |
An |
This function initiates a k-fold cross-validation analysis to determine the statistical support for the specified model.
The number of samples N
must be divisible by the specified
number of partitions (nPartitions
).
This function generates and saves a nested list R object (".Robj" file)
that can be used to run a cross-validation analysis. This R object is a list
of length nReplicates
, each element of which is a list of length
nPartitions
. Each of those nPartitions
element
is a vector of indices (between 1 and N
) of the random subset
of individuals assigned to that cross-validation partition.
Each of the N
individuals appears in exactly one partition per replicate.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.