View source: R/model.comparison.R
xValidation | R Documentation |
xValidation
runs a BEDASSLE cross-validation analysis
xValidation( partsFile, nReplicates, nPartitions, genDist, geoDist = NULL, envDist = NULL, nLoci, prefix, nIter = 2000, parallel = FALSE, nNodes = 1, saveFiles = FALSE, ... )
partsFile |
A filename (in quotes,
with the full file path) to the data partitions object to be used
in the k-fold cross-validation procedure. This object can be created
using the |
nReplicates |
An |
nPartitions |
An |
genDist |
A |
geoDist |
A |
envDist |
A |
nLoci |
The total number of independent loci used to calculate
pairwise pi ( |
prefix |
A character vector giving the prefix to be attached to all output files. |
nIter |
An |
parallel |
A |
nNodes |
Number of nodes to run parallel analyses on. Default is
|
saveFiles |
A |
... |
Further options to be passed to rstan::sampling (e.g., adapt_delta). |
This function initiates a k-fold cross-validation analysis to determine the statistical support for the specified model.
This function returns a matrix with nReplicates
columns and
nPartitions
columns giving the likelihood of each data partition
(averaged over the posterior distribution of the MCMC) in each replicate
analysis. The mean of these values gives an estimate of the predictive
accuracy of the specified model given the data provided. The mean and
standard error of the data partition likelihoods across replicates can be
used for comparing models (e.g., with a t-test).
In addition, this function saves a text file ("..._xval_results.txt"), containing the returned likelihoods for each replicate and data partition.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.