IMSLS_RETURN_USER, r[] (Output) User-supplied array of length n containing the pseudorandom numbers from a multivariate Student’s t Copula distribution.
Description
Function imsls_f_random_mvar_t_copula generates pseudorandom numbers from a multivariate Student’s t Copula distribution which are uniformly distributed on the interval (0,1) representing the probabilities associated with Student’s t deviates with df degrees of freedom imprinted with correlation information from input upper-triangular Cholesky matrix chol. Cholesky matrix chol is defined as the “square root” of a user-defined correlation matrix. That is, chol is an upper triangular matrix such that the transpose of chol times chol is the correlation matrix. First, a length n array of independent random normal deviates with mean 0 and variance 1 is generated, and then this deviate array is post-multiplied by Cholesky matrix chol. Each of the n elements of the resulting vector of Cholesky-imprinted random deviates is then divided by
where = df and s is a random deviate taken from a chi-squared distribution with df degrees of freedom. Each element of the Cholesky-imprinted standard normal N(0,1) array is a linear combination of normally distributed random numbers and is therefore itself normal, and the division of each element by
insures that each element of the resulting array is Student’s t distributed. Finally, each element of the Cholesky-imprinted Student’s t array is mapped to an output probability using the Student’s t cumulative distribution function (CDF) with df degrees of freedom.
Random deviates from arbitrary marginal distributions which are imprinted with the correlation information contained in Cholesky matrix chol can then be generated by inverting the output probabilities using user-specified inverse CDF functions.
Example: Using Student’s t Copulas to Imprint and Extract Correlation Information
This example uses function imsls_f_random_mvar_t_copula to generate a multivariate sequence tcdevt whose marginal distributions are user-defined and imprinted with a user-specified input correlation matrix corrin and then uses function imsls_f_canonical_correlation to extract an output canonical correlation matrix corrout from this multivariate random sequence.
This example illustrates two useful copula related procedures. The first procedure generates a random multivariate sequence with arbitrary user-defined marginal deviates whose dependence is specified by a user-defined correlation matrix. The second procedure is the inverse of the first: an arbitrary multivariate deviate input sequence is first mapped to a corresponding sequence of empirically derived variates, i.e. cumulative distribution function values representing the probability that each random variable has a value less than or equal to the input deviate. The variates are then inverted, using the inverse standard normal CDF function, to N(0,1) deviates; and finally, a canonical covariance matrix is extracted from the multivariate N(0,1) sequence using the standard sum of products.
This example demonstrates that function imsls_f_random_mvar_t_copula correctly imbeds the user-defined correlation information into an arbitrary marginal distribution sequence by extracting the canonical correlation from these sequences and showing that they differ from the original correlation matrix by a small relative error.
Recall that a Gaussian Copula array sequence, whose probabilities are mapped directly from Cholesky-imprinted N(0,1) deviates, has the property that the relative error between the input and output correlation matrices generally decreases as the number of multivariate sequence vectors increases. This is understandable because the correlation imprinting and extraction processes both act upon N(0,1) marginal distributions, and one would expect that a larger sample would therefore result in more accurate imprinting and extraction of correlation information.
In contrast, the imprinting of correlation information onto the Student’s t vector sequence is accomplished by imprinting onto an N(0,1) array and then dividing the array components by a scaled chi-squared random deviate, thereby introducing noise into the imprinting process. (An array of Student’s t deviates cannot be Cholesky-imprinted directly, because a linear combination of Student’s t deviates is not Student’s t distributed.) A larger sample would thus contain additional correlation information and additional noise, so the accuracy would be expected to plateau. This is illustrated in the example below, which should be compared with the Gaussian Copula example given for CNL function imsls_f_random_mvar_gaussian_copula.