Design, replicates and sample size · Choose a method

Change from baseline or ANCOVA? Analysing before-and-after data with a control group

With randomised groups measured before and after, analyse the final value with the baseline as a covariate (ANCOVA): it is unbiased and has the most power. Change scores are a weaker alternative; avoid percent change. Python and R code.

By Licklider · Published · Last reviewed · How this page was made · Markdown

On this page
  1. Which analysis for your design
  2. Why ANCOVA
  3. Worked example: blood pressure in 24 randomised mice
  4. Why not percent change
  5. Groups that already differed at baseline
  6. Check the details
  7. Check what an AI assistant ran
  8. Report it
  9. References

Quick answer. When animals were randomised to groups and measured before and after, analyse the final value with the baseline as a covariate (ANCOVA: final ~ group + baseline) and report the adjusted group difference with its 95% confidence interval. Vickers and Altman call ANCOVA “the preferred general approach”, and Van Breukelen found it unbiased in randomised studies, with more power than change scores. A t-test on change scores is a reasonable second choice when baseline and final values are closely related (Vickers and Altman suggest r above about 0.8). Avoid percent change from baseline. If animals were assigned to groups using their baseline value, use ANCOVA only. If the groups were not randomised and already differed at baseline (two genotypes, two cohorts), the two analyses can disagree; change scores are then usually the less biased choice, and you should state the question before you analyse.

Terms used below. Baseline: the measurement before treatment. Change score: final minus baseline for each animal. Percent change: change ÷ baseline × 100. ANCOVA (analysis of covariance): a regression of the final value on group and baseline; the group coefficient is the difference between groups for animals with the same baseline. Covariate: a measured variable the analysis adjusts for. Randomised: each animal’s group decided by chance, not by the experimenter or by its baseline. Power: the chance of detecting an effect that is really there. 95% confidence interval (CI): the range of effects compatible with the data. Welch’s t-test: compares two means without assuming equal spread. df (degrees of freedom): a number printed with the test that reflects the amount of independent data. Regression to the mean: animals selected for an extreme baseline tend to be less extreme next time, even without treatment. Unbiased: on average over many experiments, the estimate equals the true effect. Adjusted difference: the group difference for animals with the same baseline. Correlation (r): how closely baseline and final values move together, from −1 to 1. SD: standard deviation. Slope: how much the final value changes per unit of baseline. α: the false-positive threshold, here 0.05. Percentage points: the difference between two percentages. Back-transform: undo a log, for example exp(coefficient). Restricted randomisation: randomising within blocks so groups end up similar at baseline. Lord’s paradox: the name for the disagreement between the two analyses in non-randomised groups. Residual: an animal’s distance from the fitted line; a funnel in the residual plot means the spread grows with the fitted value. Sensitivity analysis: a second analysis reported to show the result does not hinge on one choice. Extrapolation: a comparison outside the range of the data. Two-way ANOVA: an analysis with two factors, here group and time. Reference group: the group the others are compared with, here vehicle.

Which analysis for your design

Your design Analysis Why
Randomised to groups; one measurement before and one after ANCOVA: final value ~ group + baseline Unbiased in randomised studies, with more power than change scores (Van Breukelen 2006); “the preferred general approach” (Vickers and Altman 2001)
Randomised, with a strong baseline–final correlation (r above about 0.8) ANCOVA, or Welch’s t-test on change scores as a simpler alternative Change scores lose little when the correlation is high (Vickers & Altman 2001)
Animals assigned to groups using their baseline value (for example, the highest values to treatment) ANCOVA only “If treatment assignment is based on the baseline, only ANCOVA is unbiased” (Van Breukelen 2006)
Pre-existing groups that differ at baseline (genotypes, cohorts, cell lines) Change scores, with the question stated first; see below The two analyses estimate different things and can disagree; change scores seem less biased here (Van Breukelen 2006)
One group measured before and after, no control group Paired t-test on the before and after values See paired vs unpaired t-test; it cannot separate the treatment from time
Several measurements after treatment A model for repeated measurements with baseline as a covariate See repeated measures ANOVA vs mixed model
An outcome that varies on a ratio scale (tumour volume, many concentrations) ANCOVA on logs: log(final) ~ group + log(baseline) The adjusted difference becomes a ratio, which is what percent change tries to express

Do not test whether baseline values differ between groups and then choose the analysis from that p-value. In a randomised experiment any baseline difference is chance by definition, so a balance test answers no useful question. The European Medicines Agency (EMA) guideline on baseline covariates advises that a continuous baseline value “should usually be included as a covariate” (EMA 2015, executive summary).

Why ANCOVA

Van Breukelen compared the two approaches: “In randomized studies both methods are unbiased, but ANCOVA has more power. If treatment assignment is based on the baseline, only ANCOVA is unbiased” (Van Breukelen 2006). Vickers and Altman reach the same conclusion and note when change scores are acceptable: “analysis of change scores can be a reasonable alternative, particularly if restricted randomisation is used to ensure baseline comparability between groups. Analysis of covariance is the preferred general approach, however” (Vickers & Altman 2001).

The intuition: the change score subtracts the whole baseline, as if the final value moved one-for-one with it. ANCOVA estimates from the data how strongly the final value depends on the baseline and adjusts by that amount. When the two are only moderately related, as is usual in animal experiments, ANCOVA removes more noise.

Worked example: blood pressure in 24 randomised mice

Constructed data: 12 mice per group, randomised to vehicle or drug, systolic blood pressure measured at baseline and after 4 weeks. By construction, the drug lowers week-4 pressure by 10 mmHg. In these data the baseline means are 116.1 mmHg (vehicle) and 114.0 mmHg (drug), and baseline and week-4 values correlate at r = 0.63. Stored code and data: pressure.csv, analysis.py, analysis.R and the analysis output; both languages print the same output.

Analysis Drug − vehicle (95% CI) Test
Week-4 value alone −14.6 mmHg (−25.0 to −4.2) Welch’s t = −2.90, df = 22.0, p = 0.008
Change from baseline −12.5 mmHg (−21.7 to −3.3) Welch’s t = −2.82, df = 20.9, p = 0.010
Percent change from baseline −11.1 percentage points (−19.8 to −2.4) Welch’s t = −2.65, df = 21.6, p = 0.015
ANCOVA: week-4 value adjusted for baseline −13.4 mmHg (−21.0 to −5.7) t = −3.63, df = 21, p = 0.002

All four analyses point the same way here, but the ANCOVA interval is the narrowest: 15.3 mmHg wide, against 17.4 percentage points for percent change, 18.4 mmHg for change scores and 20.8 mmHg for the week-4 value alone. That precision is the practical gain. The true effect is 10 mmHg; this dataset happened to give −13.4 by ANCOVA, and across repeated experiments the estimates scatter around −10. In 10,000 simulated experiments with this design (12 mice per group, SD 12 mmHg, r = 0.7, α = 0.05), all four analyses kept false positives near 5% when there was no effect (4.9% to 5.1%); with a true 10 mmHg effect, ANCOVA detected it in 76.1% of runs, change scores in 71.0%, percent change in 72.5% and the week-4 value alone in 49.9% (simulation.py, the simulation output).

import pandas as pd
import statsmodels.formula.api as smf

d = pd.read_csv("pressure.csv")               # columns: group, mouse, baseline, week4 (rename to yours)
d["group"] = pd.Categorical(d.group, ["vehicle", "drug"])   # reference group first; it sets the sign
m = smf.ols("week4 ~ group + baseline", d).fit()
k = "group[T.drug]"
print(f"drug - vehicle = {m.params[k]:.1f}, 95% CI {m.conf_int().loc[k, 0]:.1f} to {m.conf_int().loc[k, 1]:.1f}, "
      f"t = {m.tvalues[k]:.2f}, df = {m.df_resid:.0f}, p = {m.pvalues[k]:.3f}")
print(smf.ols("week4 ~ group * baseline", d).fit().pvalues["group[T.drug]:baseline"])  # do the slopes differ?
print(d[["baseline", "week4"]].corr().iloc[0, 1])   # r between baseline and final
d["change"] = d.week4 - d.baseline                 # change scores: sensitivity analysis, or pre-existing groups
from scipy import stats
print(stats.ttest_ind(d.change[d.group == "drug"], d.change[d.group == "vehicle"], equal_var=False))
import matplotlib.pyplot as plt
plt.scatter(m.fittedvalues, m.resid); plt.savefig("residuals.png")   # look for curves or a funnel
d <- read.csv("pressure.csv")                 # rename columns to match, or change the formula
d$group <- factor(d$group, levels = c("vehicle", "drug"))   # reference group first; it sets the sign
m <- lm(week4 ~ group + baseline, data = d)
cbind(estimate = coef(m), confint(m))["groupdrug", ]   # adjusted difference with 95% CI
summary(m)$coefficients["groupdrug", ]; m$df.residual    # t, p and df
cor(d$baseline, d$week4)                                # r between baseline and final
t.test(I(week4 - baseline) ~ group, data = d)           # change scores (vehicle - drug, as levels are ordered)
anova(m, lm(week4 ~ group * baseline, data = d))        # do the slopes differ?
plot(fitted(m), resid(m))                               # residuals: look for curves or a funnel

Why not percent change

Vickers compared the options and concluded that “percentage change from baseline is statistically inefficient. Perhaps counterintuitively, it does not correct for imbalance between groups at baseline. It may also create a non-normally distributed statistic from normally distributed data” (Vickers 2001). In the example above, baselines vary little relative to their size (mean about 115 mmHg, SD about 15), so percent change behaves almost like the change score; with outcomes whose baselines vary several-fold, such as tumour volumes, it becomes skewed and its interval misleading. If you want a relative effect, fit ANCOVA on logs (all values must be positive), lm(log(week4) ~ group + log(baseline)), and back-transform the group coefficient and both confidence limits with exp(); the result is the drug ÷ vehicle ratio at equal baseline.

Groups that already differed at baseline

When groups were not randomised, such as wild-type and knockout mice that differ in weight before any treatment, the change-score analysis and ANCOVA ask different questions. If the baseline difference is part of what the group is (a knockout smaller from birth), “animals with the same baseline” may not exist in both groups, and ANCOVA’s comparison becomes an extrapolation. The change score asks “did the groups change by different amounts?”; ANCOVA asks “do animals with the same starting value end up different?”. Van Breukelen notes that in non-randomised studies with pre-existing groups differing at baseline, “the two methods cannot both be unbiased, and may contradict each other”; his conclusion for such studies reads:

In nonrandomized studies of preexisting groups, ANOVA of change seems less biased than ANCOVA, but two control groups and two baseline measurements are recommended.

With two baseline measurements, average them before computing the change score, or include both as covariates. So for pre-existing groups, the change score is the usual choice, with the caveat that neither analysis can fully separate the group effect from where each group started. State the question in your plan, report which analysis answers it, and show the baseline values by group. This disagreement is known as Lord’s paradox.

Check the details

  1. Animals selected by an extreme baseline. If you included only animals with high baseline values, both groups will drift back towards average (regression to the mean), so a before–after change without a control group is not evidence of an effect. Barnett and colleagues note the effect “becomes more noticeable with increasing measurement error and when follow-up measurements are only examined on a sub-sample selected using a baseline value” (Barnett et al. 2005). Keep a randomised control group and use ANCOVA.
  2. Similar slopes and a straight line. ANCOVA assumes the baseline–final relationship is roughly linear, with the same slope in both groups. Plot final against baseline by group and fit final ~ group * baseline (code above); a small sample gives that test little power, so judge from the plot as well. If the lines clearly diverge, report the group difference at named baseline values: centre the baseline on a value (for example baseline - 115 for the overall mean) and refit final ~ group * centred_baseline; the group coefficient is then the difference at that baseline. Check the residual plot for curves or a funnel.
  3. Missing final values. ANCOVA drops an animal with no final value. Report how many, and why; if several animals are missing at different times, use a model for repeated measurements.
  4. One value per animal. Average technical replicates within each animal at each time before the analysis (what counts as n).
  5. Small groups. With 6 to 8 animals per group, ANCOVA still works if the residuals look roughly symmetric; for skewed outcomes, use logs. Report the change-score result as a sensitivity analysis alongside the ANCOVA.

Check what an AI assistant ran

  1. A t-test on change scores when baseline and final values are only moderately related. Use ANCOVA; keep the change-score result as a sensitivity analysis.
  2. Two separate paired t-tests, one per group, and a claim that the groups differ because one is significant and the other is not. Compare the groups directly with ANCOVA.
  3. A t-test on percent change. Use ANCOVA, on logs if you want a ratio.
  4. A test of baseline balance used to pick the analysis. Decide on ANCOVA in advance.
  5. A two-way ANOVA with group and time as factors, treating before and after as independent samples. It ignores that the same animal was measured twice; use ANCOVA.

Report it

Methods:

Week-4 systolic blood pressure was compared between groups by analysis of covariance with baseline pressure as a covariate (lm(week4 ~ group + baseline), R [4.3.3]), the pre-specified primary analysis; mice were randomised to groups (n = [12] per group).

Results:

Adjusted for baseline, week-4 pressure was [13.4] mmHg lower with the drug than with vehicle (95% CI [5.7] to [21.0]; t = [−3.63], df = [21], p = [0.002]). As a sensitivity analysis, the difference in change scores was [−12.5] mmHg (95% CI [−21.7] to [−3.3]).

The table gives drug − vehicle (negative); the first Results sentence reverses the sign because it says “lower”, while the sensitivity sentence keeps the table’s sign. Replace the bracketed values in both blocks with your own.

References

  • Vickers AJ, Altman DG (2001). Analysing controlled trials with baseline and follow up measurements. BMJ 323:1123–1124. doi:10.1136/bmj.323.7321.1123
  • Van Breukelen GJP (2006). ANCOVA versus change from baseline: more power in randomized studies, more bias in nonrandomized studies. Journal of Clinical Epidemiology 59:920–925. doi:10.1016/j.jclinepi.2006.02.007
  • Vickers AJ (2001). The use of percentage change from baseline as an outcome in a controlled trial is statistically inefficient: a simulation study. BMC Medical Research Methodology 1:6. doi:10.1186/1471-2288-1-6
  • Barnett AG, van der Pols JC, Dobson AJ (2005). Regression to the mean: what it is and how to deal with it. International Journal of Epidemiology 34:215–220. doi:10.1093/ije/dyh299
  • European Medicines Agency (2015). Guideline on adjustment for baseline covariates in clinical trials. EMA/CHMP/295050/2013. ema.europa.eu (checked 11 November 2026)

How this page was made

  • Written and published by Licklider. Recommendations cite peer-reviewed methods papers and a regulatory guideline listed under References; cited passages were checked against the source text.
  • The worked example uses constructed data. Its numbers were produced by stored code (Python 3.13 with SciPy 1.18.1 and statsmodels 0.15.0; R 4.3.3), and the two languages print identical output; the simulation was run in Python.
  • Separate review passes checked the statistics, the citations and readability before publication.