g02bw calculates a matrix of Pearson product-moment correlation coefficients from sums of squares and cross-products of deviations about the mean.
Syntax
C# |
---|
public static void g02bw( int m, double[] r, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g02bw ( _ m As Integer, _ r As Double(), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g02bw( int m, array<double>^ r, [OutAttribute] int% ifail ) |
F# |
---|
static member g02bw : m : int * r : float[] * ifail : int byref -> unit |
Parameters
- m
- Type: System..::..Int32On entry: , the number of variables.Constraint: .
- r
- 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.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
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
References
None.
Error Indicators and Warnings
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.
Accuracy
Parallelism and Performance
None.
Further Comments
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.