Tutorials › Multivariate Statistics (Graduate) › Comparing Partial Correlations with Shared Controls

Partial and Multiple Correlation · Tutorial 429 of 975

Comparing Partial Correlations with Shared Controls

Derive and estimate the covariance between partial correlations that share controls, then use it to test whether their population values are equal.

Intermediate 10 min read

What You'll Learn

  • Define partial correlations through population linear residuals after common controls
  • Derive the influence function for a sample partial correlation
  • Estimate the joint covariance of two partial correlations from the same sample
  • Use a Gaussian formula when the residual variables are jointly normal
  • Construct and interpret a Wald test of equality
  • Recognize why treating dependent estimates as independent gives the wrong standard error

Why Comparing Partial Correlations Requires Their Joint Covariance

Suppose a study asks whether \(X\) is more strongly associated with \(Y\) than with \(Z\), after adjusting both associations for the same covariates. The target is the difference between two population partial correlations, not the difference between two unrelated estimates. Because both estimates come from the same individuals and use the same controls, their sampling errors are generally dependent. A valid standard error for their difference must account for that dependence.

The method below treats the partial correlations as functions of a common sample covariance matrix. It derives their joint covariance using influence functions, then gives a simplified formula under joint normality when the two residual correlations share one variable. The same framework applies when the compared pairs do not share a variable.

Partial Correlations as Residual Correlations

Definition: Let \(C\) be a vector of controls with nonsingular covariance matrix. For a variable \(X_i\), its linear residual after adjustment for \(C\) is \(R_i=X_i-E[X_i]-\operatorname{Cov}(X_i,C)\operatorname{Var}(C)^{-1}(C-E[C])\). The population partial correlation of \(X_i\) and \(X_j\) given \(C\), denoted \(\rho_{ij\cdot C}\), is \(\operatorname{Corr}(R_i,R_j)\), provided both residual variances are positive.

This definition uses linear residuals; it does not require the conditional expectation of each variable given \(C\) to be linear. Under a multivariate normal model, linear residualization also gives the usual conditional correlation. For inference, assume independent and identically distributed observations, finite fourth moments, a nonsingular control covariance matrix, and positive residual variances for every variable used in the comparison.

Write \(r_i\) for the population residual and \(v_i=E[r_i^2]\) for its variance. The sample partial correlation is the ordinary sample correlation of the residuals from regressing the two sample variables on the same controls, including an intercept. Equivalently, it is a smooth function of the sample covariance matrix whenever the relevant control and residual covariance matrices are nonsingular.

Worked Example: Calculating a Partial Correlation

Suppose \(X,Y,C\) are standardized and their correlations are \(\rho_{XY}=0.60\), \(\rho_{XC}=0.50\), and \(\rho_{YC}=0.40\). With one control, the residual covariance is \(\rho_{XY}-\rho_{XC}\rho_{YC}\), and the residual variances are \(1-\rho_{XC}^2\) and \(1-\rho_{YC}^2\).

The residual covariance is \(0.60-(0.50)(0.40)=0.40\). The residual variances are \(1-0.50^2=0.75\) and \(1-0.40^2=0.84\). Therefore,

$$ \rho_{XY\cdot C} =\frac{0.40}{\sqrt{(0.75)(0.84)}} =\frac{0.40}{\sqrt{0.63}} \approx 0.504. $$

This calculation defines one adjusted association. To compare it with another partial correlation from the same sample, its own variance is not enough: the covariance between the two estimates also enters the uncertainty of their difference.

Influence Functions and the Joint Covariance

An influence function describes, to first order, how an estimate changes when one observation is added to the population. For a partial correlation, it can be written using the population residuals alone. Define standardized residuals \(e_i=r_i/\sqrt{v_i}\), so that \(E[e_i]=0\), \(E[e_i^2]=1\), and \(E[e_i e_j]=\rho_{ij\cdot C}\).

Result: The influence function for estimating \(\rho_{ij\cdot C}\) is
$$ \psi_{ij} =e_i e_j-\frac{\rho_{ij\cdot C}}{2}(e_i^2+e_j^2). $$

It has mean zero because \(E[e_i e_j]=\rho_{ij\cdot C}\) and \(E[e_i^2]=E[e_j^2]=1\). The result accounts for estimating the regression coefficients for the controls as well as estimating the residual variances; it is not just the product of two fixed, known residuals.

Theorem: Consider two partial correlations, \(\rho_1=\rho_{ij\cdot C}\) and \(\rho_2=\rho_{kl\cdot C}\), estimated from the same independent and identically distributed sample of size \(n\). Under the regularity conditions above, their joint asymptotic covariance is
$$ \operatorname{Cov}(\hat\rho_1,\hat\rho_2) =\frac{\Gamma_{12}}{n}+o(n^{-1}), \qquad \Gamma_{12}=E[\psi_{ij}\psi_{kl}]. $$

The corresponding asymptotic variance of their difference is

$$ \operatorname{Var}(\hat\rho_1-\hat\rho_2) =\frac{\Gamma_{11}+\Gamma_{22}-2\Gamma_{12}}{n} +o(n^{-1}), \qquad \Gamma_{aa}=E[\psi_a^2]. $$

To see why the influence function has the stated form, first consider the residual covariance \(V_{ij}=\operatorname{Cov}(R_i,R_j)\). Its first-order change under a perturbation of the joint covariance matrix is the change in the covariance of the residuals \(r_i,r_j\), namely \(r_i r_j-V_{ij}\). This follows by differentiating the residual covariance \(\sigma_{ij}-\sigma_{iC}\Sigma_{CC}^{-1}\sigma_{Cj}\): the changes in the two regression terms and the control covariance combine with the change in \(\sigma_{ij}\) to give the residual product. The same argument applies to each residual variance \(v_i\).

Now differentiate the correlation \(V_{ij}/\sqrt{v_i v_j}\). Its first-order change is the change in \(V_{ij}\) divided by \(\sqrt{v_i v_j}\), minus \(\rho_{ij\cdot C}/2\) times the relative changes in \(v_i\) and \(v_j\). Substituting the residual covariance and variance changes gives

$$ \frac{r_i r_j-V_{ij}}{\sqrt{v_i v_j}} -\frac{\rho_{ij\cdot C}}{2} \left\{\frac{r_i^2-v_i}{v_i}+\frac{r_j^2-v_j}{v_j}\right\} = e_i e_j-\frac{\rho_{ij\cdot C}}{2}(e_i^2+e_j^2). $$

For a sample, the multivariate central limit theorem applied to the influence-function averages gives the joint asymptotic normal distribution of the two estimates. In particular, their first-order errors are \(n^{-1}\sum_{m=1}^n\psi_{ij,m}\) and \(n^{-1}\sum_{m=1}^n\psi_{kl,m}\). The covariance of these averages is \(E[\psi_{ij}\psi_{kl}]/n\), which proves the joint covariance result. Finite fourth moments ensure the influence functions have finite variances. \(\square\)

A Gaussian Formula for Two Correlations Sharing a Variable

When the residual variables are jointly normal and the two partial correlations share one variable, the covariance has a compact expression. Suppose the two correlations are between residuals \(X,Y\) and \(X,Z\), after adjustment for the same controls. Let \(a=\rho_{XY\cdot C}\), \(b=\rho_{XZ\cdot C}\), and \(c=\rho_{YZ\cdot C}\). Joint normality of the residuals gives

$$ \Gamma_{12} =c(1-a^2-b^2)+\frac{ab}{2}(a^2+b^2+c^2-1). $$

For a derivation, use the influence functions \(\psi_{XY}=e_Xe_Y-a(e_X^2+e_Y^2)/2\) and \(\psi_{XZ}=e_Xe_Z-b(e_X^2+e_Z^2)/2\). Isserlis' formula for fourth moments of centered jointly normal variables gives

$$ \begin{aligned} E[e_X^2e_Ye_Z]&=c+2ab,\\ E[e_Xe_Y(e_X^2+e_Z^2)]&=4a+2bc,\\ E[(e_X^2+e_Y^2)e_Xe_Z]&=4b+2ac,\\ E[(e_X^2+e_Y^2)(e_X^2+e_Z^2)] &=6+2(a^2+b^2+c^2). \end{aligned} $$

Expanding \(E[\psi_{XY}\psi_{XZ}]\) and substituting these moments gives the displayed covariance formula. In the same normal setting, the variance of an individual sample partial correlation has asymptotic coefficient \((1-a^2)^2\), so that \(\operatorname{Var}(\hat a)=(1-a^2)^2/n+o(n^{-1})\). For nonnormal residuals, use the influence-function expectation rather than the Gaussian formula.

Worked Example: Testing Two Partial Correlations with a Common Control

Suppose \(X,Y,Z\) are jointly normal after adjustment for a common control \(C\). Their standardized residuals have correlations \(a=0.50\), \(b=0.30\), and \(c=0.20\), where \(a\) and \(b\) are the two partial correlations to compare. This residual correlation matrix is valid: its determinant is \(1+2abc-a^2-b^2-c^2=1+0.06-0.25-0.09-0.04=0.68>0\), and its leading principal minors are positive.

For a sample of \(n=200\), suppose the estimated partial correlations are \(\hat a=0.50\), \(\hat b=0.30\), and the estimated residual correlation between \(Y\) and \(Z\) is \(\hat c=0.20\). The estimated covariance coefficient between the two correlations is

$$ \hat\Gamma_{12} =0.20(1-0.50^2-0.30^2) +\frac{(0.50)(0.30)}{2}(0.50^2+0.30^2+0.20^2-1) =0.132-0.0465=0.0855. $$

The estimated individual variance coefficients are \(\hat\Gamma_{11}=(1-0.50^2)^2=0.5625\) and \(\hat\Gamma_{22}=(1-0.30^2)^2=0.8281\). Thus the estimated variance and standard error of the difference are

$$ \widehat{\operatorname{Var}}(\hat a-\hat b) =\frac{0.5625+0.8281-2(0.0855)}{200} =\frac{1.2196}{200} =0.006098, \qquad \widehat{\operatorname{SE}}= \sqrt{0.006098}\approx 0.0781. $$

To test \(H_0:a=b\) against a two-sided alternative, the observed difference is \(0.50-0.30=0.20\), giving \(z=0.20/0.0781\approx2.56\). The standard normal approximation gives a two-sided \(p\)-value of about \(0.010\). This is evidence against equality at the 5% level, under the stated normal-model and large-sample approximations.

Estimating the Covariance and Conducting the Test

In applications, replace population quantities in the influence functions by sample estimates. For each observation, form its control-adjusted residuals, standardize them using the estimated residual standard deviations, and compute the estimated influence value for each partial correlation. The empirical covariance of the two influence-value columns estimates \(\Gamma_{12}\); their empirical variances estimate \(\Gamma_{11}\) and \(\Gamma_{22}\). Dividing these estimates by \(n\) gives the estimated covariance matrix of the two partial correlations.

Equivalently, write \(\hat\Gamma_{ab}=n^{-1}\sum_{m=1}^n(\hat\psi_{a,m}-\bar{\hat\psi}_a)(\hat\psi_{b,m}-\bar{\hat\psi}_b)\). Then the estimated standard error for the difference is

$$ \widehat{\operatorname{SE}}(\hat\rho_1-\hat\rho_2) = \sqrt{\frac{\hat\Gamma_{11}+\hat\Gamma_{22}-2\hat\Gamma_{12}}{n}}. $$

Under \(H_0:\rho_1-\rho_2=0\), the Wald statistic \(Z=(\hat\rho_1-\hat\rho_2)/\widehat{\operatorname{SE}}(\hat\rho_1-\hat\rho_2)\) is asymptotically standard normal when the regularity conditions hold and the estimated variance is positive. For a two-sided test, compare \(|Z|\) with a standard normal critical value or calculate its two-sided tail probability. This is a large-sample test, not an exact finite-sample test.

Worked Example: Covariance When the Compared Pairs Are Disjoint

The same influence-function method applies even if the two partial correlations do not share a measured variable. Suppose the four standardized residuals \(e_A,e_B,e_D,e_E\) are jointly normal, with \(\rho_{AB\cdot C}=\rho_{DE\cdot C}=0\), \(\operatorname{Corr}(e_A,e_D)=0.30\), and \(\operatorname{Corr}(e_B,e_E)=0.20\). Let the other cross-pair correlations be zero. This is a valid positive-definite residual correlation matrix: after ordering variables as \((A,D,B,E)\), it consists of two independent \(2\times2\) correlation blocks with determinants \(1-0.30^2=0.91\) and \(1-0.20^2=0.96\).

Because both target correlations are zero, their influence functions are \(\psi_{AB}=e_Ae_B\) and \(\psi_{DE}=e_De_E\). Isserlis' formula gives

$$ \Gamma_{12} =E[e_Ae_Be_De_E] =\operatorname{Corr}(e_A,e_D)\operatorname{Corr}(e_B,e_E) +\operatorname{Corr}(e_A,e_B)\operatorname{Corr}(e_D,e_E) +\operatorname{Corr}(e_A,e_E)\operatorname{Corr}(e_B,e_D) =(0.30)(0.20)=0.06. $$

Thus their estimated covariance is approximately \(0.06/n\), even though they share no measured variable. Common controls and dependence among residual variables can make estimates dependent; the influence-function covariance captures that dependence without requiring a shared variable.

Common Pitfall and Practical Interpretation

A tempting but generally incorrect calculation is to treat the two sample partial correlations as independent and use \(\{\widehat{\operatorname{Var}}(\hat\rho_1)+\widehat{\operatorname{Var}}(\hat\rho_2)\}^{1/2}\) as the standard error of their difference. The correct variance subtracts twice their covariance. If that covariance is positive, ignoring it overstates the variance; if it is negative, ignoring it understates the variance. Neither direction can be assumed in advance.

The Gaussian shared-variable formula is convenient, but it should not be applied merely because the variables are measured on a large sample. Its moment calculations require joint normality of the residual variables. With nonnormal data and finite fourth moments, the empirical influence-function covariance provides a sandwich estimate instead. In either case, the comparison concerns equality of linear partial correlations, not equality of causal effects or conditional associations of every possible form.

Key takeaway: For a same-sample comparison, estimate the covariance of the two partial-correlation estimators and use \(\operatorname{Var}(\hat\rho_1-\hat\rho_2)=\operatorname{Var}(\hat\rho_1)+\operatorname{Var}(\hat\rho_2)-2\operatorname{Cov}(\hat\rho_1,\hat\rho_2)\). The joint covariance is essential to the standard error and Wald test.

Check Your Understanding

Use the definitions and results above to answer these questions.

  1. What regularity conditions ensure that the influence-function covariance gives a valid first-order approximation?
  2. Why does the variance of a difference involve subtracting twice the covariance between its two estimates?
  3. In the Gaussian shared-variable formula, what role does \(c=\rho_{YZ\cdot C}\) play?
  4. When is the Gaussian closed-form covariance formula inappropriate, and what estimate can be used instead?
  5. For two partial correlations with estimated variance coefficients \(0.49\) and \(0.64\), and estimated covariance coefficient \(0.10\), write the estimated variance of their difference for sample size \(n\).
Clinical Biostats