Computes the sample variance-covariance or correlation matrix.
For a list of all members of this type, see Covariances Members.
System.Object
Imsl.Stat.Covariances
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Class Covariances
computes estimates of correlations, covariances, or sums of squares and crossproducts for a data matrix x. Weights and frequencies are allowed but not required.
The means, (corrected) sums of squares, and (corrected) sums of crossproducts are computed using the method of provisional means. Let denote the mean based on i observations for the k-th variable, denote the frequency of the i-th observation, denote the weight of the i-th observations, and denote the sum of crossproducts (or sum of squares if j = k) based on i observations. Then the method of provisional means finds new means and sums of crossproducts as shown in the example below.
The means and crossproducts are initialized as follows:
where p denotes the number of variables. Letting denote the k-th variable of observation i + 1, each new observation leads to the following updates for and using the update constant :
The default value for weights and frequencies is 1. Means and variances are computed based on the valid data for each variable or, if required, based on all the valid data for each pair of variables.
Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll)
Covariances Members | Imsl.Stat Namespace | Example