Click or drag to resize
PartialCovariances Class
Class PartialCovariances computes the partial covariances or partial correlations from an input covariance or correlation matrix.
Inheritance Hierarchy
SystemObject
  Imsl.StatPartialCovariances

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
[SerializableAttribute]
public class PartialCovariances

The PartialCovariances type exposes the following members.

Constructors
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetPartialCorrelationMatrix
Returns the partial correlation matrix.
Public methodGetPartialCovarianceMatrix
Returns the partial covariance matrix.
Public methodGetPValues
Calculates the p-values for testing the null hypothesis that the associated partial covariance/correlation is zero.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyNumberOfProcessors
Perform the parallel calculations with the maximum possible number of processors set to NumberOfProcessors.
Public propertyPartialDegreesOfFreedom
The degrees of freedom in the test that the partial correlation (covariance) is zero.
Top
Remarks

If the "independent" variables (the linear "effect" of the independent variables is removed in computing the partial covariances/correlations) are linearly related to one another, PartialCovariances detects the linearity and eliminates one or more of the independent variables from the list of independent variables. The number of variables eliminated, if any, can be determined from the property PartialDegreesOfFreedom.

Given a covariance or correlation matrix \Sigma partitioned as


            \left(
            \begin{array}{cc}
            \Sigma_{11}  & \Sigma_{12} \\
            \Sigma_{21}  & \Sigma_{22}
            \end{array}
            \right)
class PartialCovariances computes the partial covariances (of the standardized variables if \Sigma is a correlation matrix) as

            \Sigma_{22|1} = \Sigma_{22} - \Sigma_{21} \Sigma_{11}^{-1} \Sigma_{12}
A positive semidefinite solver is used to compute \Sigma_{11}^{-1}  \Sigma_{12}.

If partial correlations are desired, these are computed as


            P_{22|1} =
            \left[ \textrm{diag}(\Sigma_{22|1}) \right]^{-1/2}
            \Sigma_{22|1}
            \left[ \textrm{diag}(\Sigma_{22|1}) \right]^{-1/2}
where \textrm{diag}(\Sigma) denotes the matrix containing the diagonal of its argument along its diagonal with zeros off the diagonal. If \Sigma_{11} is singular, then as many variables as required are deleted from \Sigma_{11} (and \Sigma_{12}) in order to eliminate the linear dependencies. The computations then proceed as above.

The p-value for a partial covariance tests the null hypothesis H_0: \sigma_{ij|1} = 0, where \sigma_{ij|1} is the (i, j) element in matrix \Sigma_{22|1}. The p-value for a partial correlation tests the null hypothesis H_0: \rho_{ij|1} = 0, where \rho_{ij|1} is the (i, j) element in matrix P_{22|1}. The p-values are returned by GetPValues. If the degrees of freedom for sigma, df, is not known, the resulting p-values may be useful for comparison, but they should not by used as an approximation to the actual probabilities.

See Also