g05rd sets up a reference vector and generates an array of pseudorandom numbers from a Normal (Gaussian) copula with covariance matrix .
public static void g05rd( mode, n, m, [,] c,  r, G05..::.G05State g05state, [,] x, out ifail )
|Visual Basic (Declaration)|
Public Shared Sub g05rd ( _ mode As , _ n As , _ m As , _ c As (,), _ r As (), _ g05state As G05..::.G05State, _ x As (,), _ < > ByRef ifail As _ )
public: static void g05rd( mode, n, m, array< ,2>^ c, array< >^ r, G05..::.G05State^ g05state, array< ,2>^ x, [ ] % ifail )
static member g05rd : mode: * n: * m: * c: [,] * r:  * g05state:G05..::.G05State * x: [,] * ifail: byref -> unit
On entry: a code for selecting the operation to be performed by the method.
Constraint: , or .
- Set up reference vector only.
- Generate variates using reference vector set up in a prior call to g05rd.
- Set up reference vector and generate two-way table.
On entry: , the number of random variates required.Constraint: .
On entry: , the number of dimensions of the distribution.Constraint: .
- Type: array<
,2>[,](,)[,]An array of size [ldc, m]Note: ldc must satisfy the constraint:On entry: the covariance matrix of the distribution. Only the upper triangle need be set.Constraint: must be positive semi-definite to machine precision
- Type: array<
>()An array of size [lr]Note: lr must satisfy the constraint:On entry: if , the reference vector as set up by g05rd in a previous call with or .On exit: if or , the reference vector that can be used in subsequent calls to g05rd with .
- Type: array<
,2>[,](,)[,]An array of size [ldx, m]Note: ldx must satisfy the constraint:On exit: the array of values from a multivariate Gaussian copula, with holding the th dimension for the th variate.
On exit: unless the method detects an error (see [Error Indicators and Warnings]).
The Gaussian copula, , is defined by
where is the number of dimensions, is the multivariate Normal density function with mean zero and covariance matrix and is the inverse of the univariate Normal density function with mean zero and variance .
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface (ldc, lr, ldx, lstate) In these cases, an error in another parameter has usually caused an incorrect value to be inferred.
The covariance matrix c is not positive semi-definite to machine precision.
On entry, g05state vector was not initialized or has been corrupted.
The time taken by g05rd is of order .
It is recommended that the diagonal elements of should not differ too widely in order of magnitude. This may be achieved by scaling the variables if necessary. The actual matrix decomposed is , where is a diagonal matrix with small positive diagonal elements. This ensures that, even when is singular, or nearly singular, the Cholesky factor corresponds to a positive-definite covariance matrix that agrees with within machine precision.
This example prints ten pseudorandom observations from a Normal copula with covariance matrix
generated by g05rd. All ten observations are generated by a single call to g05rd with . The random number generator is initialized by the state constructor (for a repeatable sequence).