← All topics

Step 4 · Complex designs · Topic 15 of 17 · 10 min

ANCOVA: comparing groups after covariate adjustment

Adjust group means for a continuous covariate, then assess the common-slope assumption.

In short#

  • ANCOVA compares group outcomes while accounting for a continuous covariate such as a baseline measurement.
  • The additive model estimates group effects at a shared covariate value, the mean among included observations.
  • A group by covariate interaction checks whether the fitted slopes differ. When it is meaningful, one common adjusted difference can mislead.
  • The model assumes independent observations, a linear covariate effect, adequate overlap, normal residuals and equal residual variance.

In plain words#

Suppose two processes start with different baseline measurements and you compare their final outcomes. ANCOVA asks how the groups differ at the same baseline value.

The model includes both group and covariate. It estimates a common covariate slope and group means at the pooled mean covariate value.

The group by covariate interaction tests the shared-slope assumption. A small p-value signals that the group difference changes across the covariate. A preselected value inside the covariate range shared by all groups can then define conditional comparisons.

A baseline should precede the intervention. Adjusting for a value affected by treatment can distort the effect you want to estimate.

Each adjusted mean has a pointwise 95% interval. Pairwise group contrasts use Bonferroni adjusted p values and simultaneous 95% intervals across the full family.

In Linza#

  1. Use an independent Grouped table and choose ANCOVA. Enter the outcome in Value and give the covariate a clear name.
  2. Enter one covariate value on the matching row for every observation. Missing values are not zeros.
  3. Read the group, covariate and slope-interaction tests before interpreting adjusted means.
  4. Check the warnings. A reference outside a group's observed covariate range means that group's adjusted mean is extrapolated.
  5. Review each adjusted mean's pointwise interval, then compare groups using the simultaneous intervals and adjusted p values. If slopes differ, choose a baseline value in the overlap shared by every group to estimate conditional contrasts.
Try it in Linza Opens in a new tab with synthetic data. Work in the original tab remains unchanged.

Common mistakes#

  • Use a post-treatment measurement as if it were a baseline covariate.
  • Treat a non-significant slope interaction as proof that slopes are identical.
  • Interpret an adjusted mean outside that group's observed covariate range as an observed comparison.

Check yourself#

The group by baseline interaction has p = 0.01 at α = 0.05. What follows?

Optional. Your answer is not saved.

Sources#

  • Maxwell S.E., Delaney H.D., Kelley K. (2018) Designing Experiments and Analyzing Data: A Model Comparison Perspective. 3rd ed. Routledge. Search for publication Opens in a new tab
  • Vickers A.J., Altman D.G. (2001) Analysing controlled trials with baseline and follow up measurements. BMJ, 323(7321). Open publication Opens in a new tab

References are for further reading. A method’s suitability depends on the study design and its assumptions.