nag_partial_corr (g02byc) computes a partial correlation/variance-covariance matrix from a correlation or variance-covariance matrix computed by
nag_corr_cov (g02bxc).
Partial correlation can be used to explore the association between pairs of random variables in the presence of other variables. For three variables,
,
and
the partial correlation coefficient between
and
given
is computed as:
where
is the product-moment correlation coefficient between variables with subscripts
and
. The partial correlation coefficient is a measure of the linear association between
and
having eliminated the effect due to both
and
being linearly associated with
. That is, it is a measure of association between
and
conditional upon fixed values of
. Like the full correlation coefficients the partial correlation coefficient takes a value in the range
with the value 0 indicating no association.
In general, let a set of variables be partitioned into two groups
and
with
variables in
and
variables in
and let the variance-covariance matrix of all
variables be partitioned into,
The variance-covariance of
conditional on fixed values of the
variables is given by:
The partial correlation matrix is then computed by standardizing
,
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
is the computed partial correlation coefficient then the appropriate
statistic is
which has approximately a Student's
-distribution with
degrees of freedom, where
is the number of observations from which the full correlation coefficients were computed.
nag_partial_corr (g02byc) is not threaded in any implementation.
Models that represent the linear associations given by partial correlations can be fitted using the multiple regression function
nag_regsn_mult_linear (g02dac).
Data, given by
Osborn (1979), on the number of deaths, smoke
and sulphur dioxide (parts/million) during an intense period of fog is input. The correlations are computed using
nag_corr_cov (g02bxc) and the partial correlation between deaths and smoke given sulphur dioxide is computed using nag_partial_corr (g02byc).