Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rcompt

Multivariate t random values simulation on the simplex


Description

Multivariate t random values simulation on the simplex.

Usage

rcompt(n, m, s, dof, type = "alr")

Arguments

n

The sample size, a numerical value.

m

The mean vector in R^d.

s

The covariance matrix in R^d.

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.

Details

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.

Value

A matrix with the simulated data.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Giorgos Athineou <gioathineou@gmail.com>

References

Aitchison J. (1986). The statistical analysis of compositional data. Chapman \& Hall.

See Also

Examples

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)

Compositional

Compositional Data Analysis

v4.6
GPL (>= 2)
Authors
Michail Tsagris [aut, cre], Giorgos Athineou [aut], Abdulaziz Alenazi [ctb]
Initial release
2021-04-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.