Confounding
Partial Correlation
Statistics for clinical researchers and surgical trainees
Published
In short
A correlation between two clinical variables can be entirely, or mostly, an artefact of a third variable that independently drives both. Age and BMI are the two most common offenders. Partial correlation strips out the variance that the third variable explains in each of your two variables and correlates what is left over. When the coefficient shrinks toward zero after that adjustment, the original relationship was likely never really there.
When Two Variables Move Together for the Wrong Reason
Say a chart review turns up a correlation between preoperative grip strength and lumbar bone mineral density in older surgical candidates. It looks clean, and it is tempting to write that stronger patients have denser bone. But grip strength declines with age, and so does bone density, independently of each other. Age is doing double duty: it drives the exposure variable and the outcome variable on its own, and that alone is enough to generate a correlation between them even if strength has no direct biological relationship to bone at all.
This is confounding operating inside a simple bivariate correlation, not a regression model. Reviewers and methodologists have flagged exactly this failure mode: when an association between two variables is observed, the question is always whether it reflects a direct relationship or whether some alternate factor is generating both sides of it, and a paper that never checks is a paper that cannot rule the alternate explanation out.1 Age is the most familiar culprit in surgical and orthopaedic data. BMI runs a close second: it correlates with nearly every metabolic and mechanical outcome a surgical dataset contains, so two variables that both track BMI will look related to each other even when nothing connects them beyond that.
What Partial Correlation Actually Removes
Partial correlation answers a narrower question than the raw Pearson or Spearman coefficient: what is left of the relationship between X and Y once the part of each that is explained by Z has been taken out? Mechanically, it is the correlation between two sets of residuals: the leftover variation in X after regressing out Z, correlated against the leftover variation in Y after regressing out the same Z. With one control variable, the coefficient can be written directly from the three pairwise correlations:
rXY.Z = (rXY − rXZrYZ) / √[(1 − rXZ2)(1 − rYZ2)]
When you need to hold out more than one variable at once, age and BMI together, for instance, the same logic extends to a matrix formulation rather than adjusting for one variable and then the other in sequence, which is how dedicated partial-correlation routines compute it.2 That matters because sequential single-variable adjustment can leave shared variance between the control variables uncorrected, understating how much of the original correlation they jointly explain.
It is worth being explicit about what this buys you that a chatbot summarising your spreadsheet cannot. An LLM asked to comment on a correlation table has no way of knowing that age is quietly running both columns unless a human tells it to check, and even then it is producing a plausible-sounding sentence, not a number derived from your patients' residual variance. The partial correlation coefficient only means anything because it comes from actually regressing out the third variable from your actual data, not from a paragraph asserting that the relationship "may be confounded by age."
A Worked Illustration: Strength, Bone Density, and Age
This is exactly the check that strength-and-bone-density research has had to build in from the start, because both variables decline together across the lifespan regardless of any causal link. One frequently cited study of muscle strength and bone density in older adults adjusted its strength-density associations for age (and, in several models, body weight) before drawing conclusions, precisely so that a raw correlation between an ageing cohort's strength and their bone density would not be mistaken for evidence that strength itself protects bone.3 Adjusting first and asking what survives is the difference between a plausible mechanism and a shared-ageing artefact.
To see the mechanic on round numbers: suppose, hypothetically, a review of 80 patients finds a raw correlation of r = 0.42 between grip strength and lumbar bone density. Age correlates with grip strength at r = −0.55 and with bone density at r = −0.51 in the same sample. Run those three numbers through the partial-correlation formula above and the adjusted coefficient drops to roughly r = 0.19: most of the original 0.42 was age moving through both variables at once, not strength acting on bone.
Reporting the Adjusted Correlation in AMA Style
State which variable was held constant in the same sentence as the coefficient; a partial r with no named control variable tells the reader nothing about what was removed. A correctly formatted result, continuing the hypothetical above: "Grip strength remained associated with lumbar bone density after adjusting for age (partial r = 0.19, P = .04)." Degrees of freedom for the associated significance test are N minus the number of variables involved, including the control variable, so a three-variable partial correlation on 80 patients runs on 77 df, not 78.
In methods, one sentence closes the question before a reviewer raises it: "Partial correlation was used to examine the association between grip strength and bone mineral density while controlling for patient age, because age is known to influence both variables independently." If the raw and adjusted coefficients differ meaningfully, report both, so the reader can see how much of the original association the third variable was carrying.
You might also read
References
- Skelly AC, Dettori JR, Brodt ED. Assessing bias: the importance of considering confounding. Evid Based Spine Care J. 2012;3(1):9–12. https://doi.org/10.1055/s-0031-1298595
- Kim S. ppcor: An R Package for a Fast Calculation to Semi-partial Correlation Coefficients. Communications for Statistical Applications and Methods. 2015;22(6):665–674. https://doi.org/10.5351/CSAM.2015.22.6.665
- Hughes VA, Frontera WR, Dallal GE, Lutz KJ, Fisher EC, Evans WJ. Muscle strength and body composition: associations with bone density in older subjects. Med Sci Sports Exerc. 1995;27(7):967–974.
If you're seeing an association in your own data that a third variable like age or BMI could be driving, StatsPlease's Regression preset lets you add that variable as a covariate alongside your predictor, and reports the adjusted coefficient and its P value computed directly from your data, so you can see whether the relationship holds once it's accounted for.
Try StatsPlease free