Class PartialCovariances computes the partial covariances or partial correlations from an input covariance or correlation matrix.

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
[SerializableAttribute]
public class PartialCovariances
Visual Basic (Declaration)
<SerializableAttribute> _
Public Class PartialCovariances
Visual C++
[SerializableAttribute]
public ref class PartialCovariances

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.

Inheritance Hierarchy

System..::.Object
Imsl.Stat..::.PartialCovariances

See Also