*! version 1.3 03 Jan 2019

Title

rmvnormal -- Multivariate t Random Deviates

Syntax

rmvt, [options]

Optional
n(#) Number of random deviates to generate.

delta(numlist) Vector of non-centrality parameters.

sigma(string) Scale matrix.

df(#) Degrees of freedom.

Description

rmvt generates random deviates from a specified multivariate t distribution.
Arbitrary non-centrality parameters, scale matrices, and degrees of freedom are supported.

Options

Optional

n(#) An integer giving the number of random deviates to generate from the specified multivariate t distribution.
It must be greater than or equal to one.
It defaults to 1.

delta(numlist) A numlist (vector) giving the non-centrality parameters of the multivariate t distribution under consideration.
If left unspecified, it will default internally to the zero vector of the correct length when sigma is specified, or the zero vector of length two when sigma is unspecified.

sigma(string) A string (matrix) giving the scale matrix of the multivariate t distribution under consideration.
If specified, it must be symmetric positive-definite, and if delta is also specified, its number of rows (equivalently columns) must be equal to the length of option delta.
If left unspecified, it will default internally to the identity matrix of the correct dimension when delta is specified, or the identity matrix of dimension two when delta is unspecified.

df(#) A real giving the number of degrees of freedom of the multivariate t distribution under consideration.
It must be either greater than or equal to zero, or missing.
Multivariate normal random deviates will be computed when it is equal to zero or is missing, using the method of rmvnormal.
It defaults to 1.

Examples

/// Example 1: Without specifying delta or sigma

rmvt, n(10)

/// Example 2: Specifying delta and sigma

mat Sigma = (1, 0.5, 0.5 \ 0.5, 1, 0.5 \ 0.5, 0.5, 1)

rmvt, n(25) delta(10, 20, 30) sigma(Sigma)

/// Example 4: Requesting multivariate normal random deviates

rmvt, n(20) delta(1, 1, 1) sigma(Sigma) df(0)

Stored results

rmvt stores the following in r():

matrices:

r(rmvt) Generated random deviates.

Authors

Dr Michael J Grayling
Population Health Sciences Institute, Newcastle University, UK
Email: michael.grayling@newcastle.ac.uk

Prof Adrian P Mander
Centre for Trials Research, Cardiff University, Cardiff, UK

See also

References:

Grayling MJ, Mander AP (2018) Calculations involving the multivariate normal and multivariate t distributions with and without truncation. Stata J 18(4):826-43.

Kotz S, Nadarajah S (2004) Multivariate t distributions and their applications. Cambridge University Press: Cambridge, UK.

Related commands:

mvtnorm (for an overview of the functionality provided by mvtnorm)

Multivariate normal distribution

drawnorm (an official Stata command for multivariate normal random deviates)
invmvnormal (mvtnorm command for multivariate normal quantiles)
lnmvnormalden (an official Stata command for multivariate normal densities)
mvnormalcv (an official Stata command for the multivariate normal distribution function)
mvnormalden (mvtnorm command for multivariate normal densities)
pmvnormal (mvtnorm command for the multivariate normal distribution function)
rmvnormal (mvtnorm command for multivariate normal random deviates)

Multivariate t distribution

invmvt (mvtnorm command for multivariate t quantiles)
mvtden (mvtnorm command for multivariate t densities)
mvt (mvtnorm command for the multivariate t distribution function)
rmvt (mvtnorm command for multivariate t random deviates)

Truncated multivariate normal distribution

invtmvnormal (mvtnorm command for truncated multivariate normal quantiles)
rtmvnormal (mvtnorm command for truncated multivariate normal random deviates)
tmvnormal (mvtnorm command for the truncated multivariate normal distribution function)
tmvnormalden (mvtnorm command for truncated multivariate normal densities)

Truncated multivariate t distribution

invtmvt (mvtnorm command for truncated multivariate t quantiles)
rtmvt (mvtnorm command for truncated multivariate t random deviates)
tmvt (mvtnorm command for the truncated multivariate t distribution function)
tmvtden (mvtnorm command for truncated multivariate t densities)