View source: R/CVBFFunctions.R
CVBFtestrsplit | R Documentation |
Compute a CVBF, a Bayes factor that checks if two data sets share the same distribution.
CVBFtestrsplit(
dataset1,
dataset2,
trainsize1,
trainsize2,
seed = NULL,
train1_ids = NULL,
train2_ids = NULL
)
dataset1 |
One dataset that we want to check if it has the same distribution as another data set |
dataset2 |
Another dataset that we want to check if it has the same distribution as another data set |
trainsize1 |
The training set size of dataset 1 |
trainsize2 |
The training set size of dataset 2 |
seed |
The seed used to generate training set and validation sets for both of the data sets |
train1_ids |
Indices for the training set of dataset 1 |
train2_ids |
Indices for the training set of dataset 2 |
A list containing a log BF that tests whether two distributions are the same via CVBF, and the training sets used to generate the CVBF.
set.seed(100)
dataset1 = rnorm(200)
dataset2 = rnorm(200)
CVBF1 = CVBFtestrsplit(dataset1, dataset2, trainsize1 = 100, trainsize2 = 100)
CVBF1$logBF #Gives back the log Bayes factor
CVBF1$train1_ids #Gives back the training set of the first data set
CVBF1$train2_ids #Gives back the training set of the second data set
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.