nag_rand_matrix_multi_students_t (g05ryc)

+− Contents

1 Purpose

nag_rand_matrix_multi_students_t (g05ryc) sets up a reference vector and generates an array of pseudorandom numbers from a multivariate Student's t distribution with ν degrees of freedom, mean vector a and covariance matrix νν-2C.

4 References

5 Arguments

1:
order – Nag_OrderTypeInput

On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by order=Nag_RowMajor. See Section 3.2.1.3 in the Essential Introduction for a more detailed explanation of the use of this argument.

Constraint:
order=Nag_RowMajor or Nag_ColMajor.

2:
mode – Nag_ModeRNGInput

On entry: a code for selecting the operation to be performed by the function.

mode=Nag_InitializeReference

Set up reference vector only.

mode=Nag_GenerateFromReference

Generate variates using reference vector set up in a prior call to nag_rand_matrix_multi_students_t (g05ryc).

On entry: if mode=Nag_GenerateFromReference, the reference vector as set up by nag_rand_matrix_multi_students_t (g05ryc) in a previous call with mode=Nag_InitializeReference or Nag_InitializeAndGenerate.

On exit: if mode=Nag_InitializeReference or Nag_InitializeAndGenerate, the reference vector that can be used in subsequent calls to nag_rand_matrix_multi_students_t (g05ryc) with mode=Nag_GenerateFromReference.

10:
lr – IntegerInput

On entry: the dimension of the array r. If mode=Nag_GenerateFromReference, it must be the same as the value of lr specified in the prior call to nag_rand_matrix_multi_students_t (g05ryc) with mode=Nag_InitializeReference or Nag_InitializeAndGenerate.

On entry, the covariance matrix C is not positive semidefinite to machine precision.

NE_PREV_CALL

m is not the same as when r was set up in a previous call.
Previous value of m=value and m=value.

7 Accuracy

Not applicable.

8 Further Comments

The time taken by nag_rand_matrix_multi_students_t (g05ryc) is of order n⁢m3.

It is recommended that the diagonal elements of C should not differ too widely in order of magnitude. This may be achieved by scaling the variables if necessary. The actual matrix decomposed is C+E=LLT, where E is a diagonal matrix with small positive diagonal elements. This ensures that, even when C is singular, or nearly singular, the Cholesky factor L corresponds to a positive definite covariance matrix that agrees with C within machine precision.

generated by nag_rand_matrix_multi_students_t (g05ryc). All ten observations are generated by a single call to nag_rand_matrix_multi_students_t (g05ryc) with mode=Nag_InitializeAndGenerate. The random number generator is initialized by nag_rand_init_repeatable (g05kfc).