Partial correlation
Two variables can correlate partly because both are related to a third. A partial correlation removes the third variable’s influence from both, then correlates what’s left.
How it works
Regress X on the covariate(s) and keep the residuals. Do the same for Y. The partial correlation is the correlation between the two sets of residuals: the parts of X and Y that the covariates can’t explain.
A semi-partial (part) correlation removes the covariate from only one of the two variables. It’s used to show a predictor’s unique contribution in regression.
Worked example: horsepower and fuel economy, controlling for weight
In R’s mtcars data, horsepower and fuel economy correlate at r = −.78. But powerful cars also tend to be heavy, and weight strongly reduces fuel economy. Is horsepower still related to fuel economy among cars of the same weight?
Partial correlation (pearson): -0.5470 T-statistic: -3.5187 df: 29 P-value: 0.001451 N: 32 Covariates: 1 95% CI: [-0.7550, -0.2390] Zero-order correlation: -0.7762 Rows excluded for missing values: 0 of 32
The result matches R’s ppcor package.
Interpretation
- Zero-order correlation: r = −.78.
- Partial correlation controlling for weight: r = −.55, 95% CI [−.76, −.24], t(29) = −3.52, p = .001.
- The association weakens but remains substantial. Part of the horsepower–economy link runs through weight, but more powerful cars still use more fuel at the same weight.
Each covariate costs one degree of freedom: df = N − 2 − number of covariates.
APA write-up
Controlling for weight, horsepower remained negatively correlated with fuel economy, r(29) = −.55, p = .001, 95% CI [−.76, −.24], compared with a zero-order correlation of r = −.78.
Partial correlation and regression
A partial correlation and a multiple regression coefficient answer closely related questions, and their p-values for the same variable are identical. Regression gives the size of the effect in the outcome’s units. Partial correlation gives a standardised strength from −1 to 1. See multiple regression.
Cautions
- Adjustment only covers measured covariates. See correlation vs causation.
- Don’t control for a variable that lies on the causal path between X and Y. That removes part of the effect you’re studying.
- A Spearman version exists for ranked or skewed data, and Analytika offers both.
More in Correlation
Try it with the free tools
Run this on your own data
Upload a dataset and ask your question in plain English. Analytika checks the assumptions, picks the test, runs it, and writes the results up in APA format.