Last chance! 50% off unlimited learning
Sale ends in
Multivariate t random values simulation on the simplex.
rcompt(n, m, s, dof, type = "alr")
The sample size, a numerical value.
The mean vector in
The covariance matrix in
The degrees of freedom.
The alr (type = "alr") or the ilr (type = "ilr") is to be used for closing the Euclidean data onto the simplex.
A matrix with the simulated data.
The algorithm is straightforward, generate random values from a multivariate t distribution in
Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab