RandomCanonicalCorrelation Method |
Method CanonicalCorrelation generates a canonical correlation matrix from an arbitrarily distributed multivariate deviate sequence with nvar deviate variables, nseq steps in the sequence, and a Gaussian Copula dependence structure.
Namespace: Imsl.Stat
[Missing <returns> documentation for "M:Imsl.Stat.Random.CanonicalCorrelation(System.Double[][])"]
Method CanonicalCorrelation first maps each of the j=1..nvar input deviate sequences deviate[k=1..nseq][j] into a corresponding sequence of variates, say variate[k][j] (where variates are values of the empirical cumulative probability function, , defined as the probability that random deviate variable ). The variate matrix variate[k][j] is then mapped into Normal(0,1) distributed deviates using the method InvCdf.Normal(variate[k][j]) and then the standard covariance estimator
is used to calculate the canonical correlation matrix correlation = CanonicalCorrelation(deviate), where = correlation[i][j] and = nseq.
If a multivariate distribution has Gaussian marginal distributions, then the standard "empirical" correlation matrix given above is "unbiased", i.e. an accurate measure of dependence among the variables. But when the marginal distributions depart significantly from Gaussian, i.e. are skewed or flattened, then the empirical correlation may become biased. One way to remove such bias from dependence measures is to map the non-Gaussian-distributed marginal deviates to Gaussian N(0,1) deviates (by mapping the non-Gaussian marginal deviates to empirically derived marginal CDF variate values, then inverting the variates to N(0,1) deviates as described above), and calculating the standard empirical correlation matrix from these N(0,1) deviates as in the equation above. The resulting "(Gaussian) canonical correlation" matrix thereby avoids the bias that would occur if the empirical correlation matrix were extracted from the non-Gaussian marginal distributions directly.
The canonical correlation matrix may be of value in such applications as Markowitz portfolio optimization, where an unbiased measure of dependence is required to evaluate portfolio risk, defined in terms of the portfolio variance which is in turn defined in terms of the correlation among the component portfolio instruments.
The utility of the canonical correlation derives from the observation that a "copula" multivariate distribution with uniformly-distributed deviates (corresponding to the CDF probabilities associated with the marginal deviates) may be mapped to arbitrarily distributed marginals, so that an unbiased dependence estimator derived from one set of marginals (N(0,1) distributed marginals) can be used to represent the dependence associated with arbitrarily-distributed marginals. The "Gaussian Copula" (whose variate arguments are derived from N(0,1) marginal deviates) is a particularly useful structure for representing multivariate dependence.
This is demonstrated in Example 2 where method Random.NextGaussianCopula(chol) (where chol is a Cholesky object derived from a user-specified covariance matrix) is used to imprint correlation information on otherwise arbitrarily distributed and independent random sequences. Method Random.CanonicalCorrelation is then used to extract an unbiased correlation matrix from these imprinted deviate sequences.