association
Partial correlation
Measure association between two continuous variables after linear adjustment for covariates.
Requirements
- two continuous variables
- one or more numeric covariates
Avoid when
- nonlinear adjustment is required
- categorical covariates need dummy coding
Formula
r_xy·z = (r_xy−r_xz r_yz)/√[(1−r_xz²)(1−r_yz²)]
Interpretation
Reports correlation between residuals after removing linear covariate effects.
Worked example
Estimate the association between exercise and glucose after adjusting for age and BMI.
Open example datasets