Learn R Programming

Compositional (version 2.0)

Multivariate t random values simulation: Multivariate t random values simulation

Description

Multivariate t random values simulation.

Usage

rmvt(n, mu, sigma, v)

Arguments

n
The sample size, a numerical value.
mu
The mean vector in $R^d$.
sigma
The covariance matrix in $R^d$.
v
The degrees of freedom.

Value

A matrix with the simulated data.

Details

The algorithm uses univariate normal and chi-square random values and then generates multivariate t values via a spectral decomposition.This function is used by rcompt.

References

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

See Also

rdiri, rmvnorm, multivt

Examples

Run this code
x <- as.matrix(iris[, 1:2])
m <- colMeans(x)
s <- var(x)
y <- rmvt(100, m, s, 10)
multivt(y)

Run the code above in your browser using DataLab