Generate random samples from the multivariate t-distribution.
cov (x) = nu/(nu-2) * sigma ./ (sqrt (diag (sigma) * diag (sigma)))
.
In order to obtain samples distributed according to a standard multivariate
t-distribution, sigma must be equal to the identity matrix. To generate
multivariate t-distribution samples x with arbitrary covariance matrix
sigma, the following scaling might be used:
x = mvtrnd (sigma, nu, n) * diag (sqrt (diag (sigma)))
.
sigma = [1, 0.5; 0.5, 1]; nu = 3; n = 10; x = mvtrnd (sigma, nu, n);
sigma = [1, 0.5; 0.5, 1]; nu = [2; 3]; n = 2; x = mvtrnd (sigma, nu, 2);
Package: statistics