nag_cov_to_corr (g02bwc) calculates a matrix of Pearson product-moment correlation coefficients from sums of squares and cross-products of deviations about the mean.
nag_cov_to_corr (g02bwc) calculates a matrix of Pearson product-moment correlation coefficients from sums of squares and cross-products about the mean for observations on
$m$ variables which can be computed by a single call to
nag_sum_sqs (g02buc) or a series of calls to
nag_sum_sqs_update (g02btc). The sums of squares and cross-products are stored in an array packed by column and are overwritten by the correlation coefficients.
Let
${c}_{jk}$ be the cross-product of deviations from the mean, for
$\mathit{j}=1,2,\dots ,m$ and
$\mathit{k}=j,\dots ,m$, then the product-moment correlation coefficient,
${r}_{jk}$ is given by
None.
The accuracy of nag_cov_to_corr (g02bwc) is entirely dependent upon the accuracy of the elements of array
r.
Not applicable.
nag_cov_to_corr (g02bwc) may also be used to calculate the correlations between parameter estimates from the variance-covariance matrix of the parameter estimates as is given by several functions in this chapter.
A program to calculate the correlation matrix from raw data. The sum of squares and cross-products about the mean are calculated from the raw data by a call to
nag_sum_sqs (g02buc). The correlation matrix is then calculated from these values.