Multivariate t random values simulation on the simplex | R Documentation |
Multivariate t random values simulation on the simplex.
rcompt(n, m, s, dof, type = "alr")
n |
The sample size, a numerical value. |
m |
The mean vector in |
s |
The covariance matrix in |
dof |
The degrees of freedom. |
type |
The alr (type = "alr") or the ilr (type = "ilr") is to be used for closing the Euclidean data onto the simplex. |
The algorithm is straightforward, generate random values from a multivariate t distribution in R^d
and brings the
values to the simplex S^d
using the inverse of a log-ratio transformation.
A matrix with the simulated data.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.
comp.den, rdiri, rcompnorm
x <- as.matrix(iris[, 1:2])
m <- Rfast::colmeans(x)
s <- var(x)
y <- rcompt(100, m, s, 10)
comp.den(y, dist = "t")
ternary(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.