Produces one or more samples from the multivariate (p variables) t 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 p numeric vector. The mean vector
Sigma: symmetric, positive-definite square matrix of order p. The correlation matrix.
tol: tolerance for numerical lack of positive-definiteness in Sigma (for mvrnorm, see Details).
Returns
A matrix with p columns and n rows.
Details
A sample from a MTD with parameters ν, μ and Σ
can be generated using:
X=μ+Yuν
where Y is a random vector distributed among a centered Gaussian density with covariance matrix Σ (generated using mvrnorm) and u is distributed among a Chi-squared distribution with ν degrees of freedom.