rmtd function

Simulate from a Multivariate tt Distribution

Simulate from a Multivariate tt Distribution

Produces one or more samples from the multivariate (pp variables) tt distribution (MTD) with degrees of freedom nu, mean vector mu and correlation matrix Sigma.

rmtd(n, nu, mu, Sigma, tol = 1e-6)

Arguments

  • n: integer. Number of observations.
  • nu: numeric. The degrees of freedom.
  • mu: length pp numeric vector. The mean vector
  • Sigma: symmetric, positive-definite square matrix of order pp. The correlation matrix.
  • tol: tolerance for numerical lack of positive-definiteness in Sigma (for mvrnorm, see Details).

Returns

A matrix with pp columns and nn rows.

Details

A sample from a MTD with parameters ν\nu, μ\boldsymbol{\mu} and Σ\Sigma

can be generated using:

X=μ+Yνu \displaystyle{\mathbf{X} = \boldsymbol{\mu} + \mathbf{Y} \sqrt{\frac{\nu}{u}}}

where YY is a random vector distributed among a centered Gaussian density with covariance matrix Σ\Sigma (generated using mvrnorm) and uu is distributed among a Chi-squared distribution with ν\nu degrees of freedom.

Examples

nu <- 3 mu <- c(0, 1, 4) Sigma <- matrix(c(1, 0.6, 0.2, 0.6, 1, 0.3, 0.2, 0.3, 1), nrow = 3) x <- rmtd(10000, nu, mu, Sigma) head(x) dim(x) mu; colMeans(x) nu/(nu-2)*Sigma; var(x)

References

S. Kotz and Saralees Nadarajah (2004), Multivariate tt Distributions and Their Applications, Cambridge University Press.

See Also

dmtd: probability density of a MTD.

estparmtd: estimation of the parameters of a MTD.

Author(s)

Pierre Santagostini, Nizar Bouhlel

  • Maintainer: Pierre Santagostini
  • License: GPL (>= 3)
  • Last published: 2024-12-20