Description Usage Arguments Details Value
View source: R/TeacupCerberus.R
Estimates Covariance betweeen and withing two datasets accounting for multinomial count uncertainty/error. Returns covariance with respect to CLR coordinates, this can easily be converted to alternative representations. See vignette for details.
1 2 | teacup_cerberus(Y1, Y2, alpha1 = NULL, alpha2 = NULL,
n_samples = 2000)
|
Y1 |
count data (D1 x N) (e.g., taxa x samples) |
Y2 |
count data (D2 x N) (e.g., food x samples) |
alpha1 |
D1-vector prior for Dirichlet for Y1 (think of it as a "pseudo-count" like thing, must be greater than zero) default: rep(1, D1) |
alpha2 |
D2-vector prior for Dirichlet for Y2 (think of it as a "pseudo-count" like thing, must be greater than zero) default: rep(1, D2) |
This fits the following model
Y_1 ~ Multinomial(π_1)
Y_2 ~ Multinomial(π_1)
π_1 ~ Dirichlet(α_1)
π_2 ~ Dirichlet(α_2)
and then transforming posterior samples of that model via
η_1 = CLR^{-1}(η_1)
η_2 = CLR^{-1}(η_2)
and then the s-th sample of Sigma (as a correlation matrix is given by)
Σ^s = cov(cbind(η_1^s, η_2^s))
Array Sigma of dimension (D1+D2) x (D1+D2) x n_samples (Sample of Covariance Matricies)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.