Description Usage Arguments Details Value References See Also Examples
Generate sequential minimal training samples for Binomial and Multinomial models as described in \insertCiteberger2004training;textualpolya.
1 | generate_smts(x, n = 2 * length(x[!is.na(x)]))
|
x |
Atomic vector of an eligible data type ( |
n |
Numeric vector of |
Training samples play a central role in a variety of statistical methodologies and are particularly usefull to
Sequential minimal training samples (SMTS) are obtained by randomly drawing from x
(without replacement for a given SMTS), stopping when the subset is a proper traiing sample.
Returns a list
with length
n
. Each element of this list contains a minimal training sample with data of the same type as x
.
ibf
, aibf
and gibf
for the implementation of intrinsic Bayes factors that use sequential minimal training samples.
1 2 3 4 5 6 7 | set.seed(10)
data_1 <- sample(letters[1:3], size = 5, replace = TRUE)
generate_smts(data_1, 3)
data_2 <- sample(1:10, size = 3, replace = TRUE)
generate_smts(data_2, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.