Description Usage Arguments Value Examples
View source: R/compute_BFCS_vectorized.R
Vectorized function for efficiently computing the Bayes Factors of many three-variable covariance structures at the same time.
1 | compute_BFCS_vectorized(c12, c13, c23, num_samples)
|
c12 |
Vector of correlations between X_1 and X_2. |
c13 |
Vector of correlations between X_1 and X_3. |
c23 |
Vector of correlations between X_2 and X_3. |
num_samples |
Integer number of samples. |
BFCS for all correlation combinations contained in the vectors
1 2 3 4 5 6 7 | cor_matrices <- apply(rWishart(100, 4, diag(3)), 3, cov2cor)
compute_BFCS_vectorized(
c12 = cor_matrices[2, ],
c13 = cor_matrices[3, ],
c23 = cor_matrices[6, ],
num_samples = 1000
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.