G02BYF computes a partial correlation/variance-covariance matrix from a correlation or variance-covariance matrix computed by
G02BXF.
Partial correlation can be used to explore the association between pairs of random variables in the presence of other variables. For three variables,
${y}_{1}$,
${y}_{2}$ and
${x}_{3}$, the partial correlation coefficient between
${y}_{1}$ and
${y}_{2}$ given
${x}_{3}$ is computed as:
where
${r}_{ij}$ is the product-moment correlation coefficient between variables with subscripts
$i$ and
$j$. The partial correlation coefficient is a measure of the linear association between
${y}_{1}$ and
${y}_{2}$ having eliminated the effect due to both
${y}_{1}$ and
${y}_{2}$ being linearly associated with
${x}_{3}$. That is, it is a measure of association between
${y}_{1}$ and
${y}_{2}$ conditional upon fixed values of
${x}_{3}$. Like the full correlation coefficients the partial correlation coefficient takes a value in the range (
$-1,1$) with the value
$0$ indicating no association.
In general, let a set of variables be partitioned into two groups
$Y$ and
$X$ with
${n}_{y}$ variables in
$Y$ and
${n}_{x}$ variables in
$X$ and let the variance-covariance matrix of all
${n}_{y}+{n}_{x}$ variables be partitioned into,
The variance-covariance of
$Y$ conditional on fixed values of the
$X$ variables is given by:
The partial correlation matrix is then computed by standardizing
${\Sigma}_{y\mid x}$,
To test the hypothesis that a partial correlation is zero under the assumption that the data has an approximately Normal distribution a test similar to the test for the full correlation coefficient can be used. If
$r$ is the computed partial correlation coefficient then the appropriate
$t$ statistic is
which has approximately a Student's
$t$-distribution with
$n-{n}_{x}-2$ degrees of freedom, where
$n$ is the number of observations from which the full correlation coefficients were computed.
If on entry
${\mathbf{IFAIL}}={\mathbf{0}}$ or
${-{\mathbf{1}}}$, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
G02BYF computes the partial variance-covariance matrix,
${\Sigma}_{y\mid x}$, by computing the Cholesky factorization of
${\Sigma}_{xx}$. If
${\Sigma}_{xx}$ is not of full rank the computation will fail. For a statement on the accuracy of the Cholesky factorization see
F07GDF (DPPTRF).
Models that represent the linear associations given by partial correlations can be fitted using the multiple regression routine
G02DAF.
Data, given by
Osborn (1979), on the number of deaths, smoke (
$\mathrm{mg}/{\mathrm{m}}^{3}$) and sulphur dioxide (parts/million) during an intense period of fog is input. The correlations are computed using
G02BXF and the partial correlation between deaths and smoke given sulphur dioxide is computed using G02BYF. Both correlation matrices are printed using the routine
X04CAF.