g02bw calculates a matrix of Pearson product-moment correlation coefficients from sums of squares and cross-products of deviations about the mean.
Public Shared Sub g02bw ( _ m As Integer, _ r As Double(), _ <OutAttribute> ByRef ifail As Integer _ )
public: static void g02bw( int m, array<double>^ r, [OutAttribute] int% ifail )
- Type: System..::..Int32On entry: , the number of variables.Constraint: .
- Type: array<System..::..Double>()An array of size On entry: contains the upper triangular part of the sums of squares and cross-products matrix of deviations from the mean. These are stored packed by column, i.e., the cross-product between variable and , , is stored in .On exit: Pearson product-moment correlation coefficients.These are stored packed by column corresponding to the input cross-products.
g02bw calculates a matrix of Pearson product-moment correlation coefficients from sums of squares and cross-products about the mean for observations on variables which can be computed by a single call to g02bu or a series of calls to g02bt. The sums of squares and cross-products are stored in an array packed by column and are overwritten by the correlation coefficients.
Let be the cross-product of deviations from the mean, for and , then the product-moment correlation coefficient, is given by
Note: g02bw may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the method:
On entry, .
- A variable has a zero variance. All correlations involving the variable with zero variance will be returned as zero.
g02bw 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 methods in this chapter.