Skip to content
Celeus

ANCOVA (analysis of covariance)

Shown in the app as ancova. Part of the method reference, under Comparing groups.

When to use

Compare a continuous outcome across 2+ groups while adjusting for one or more covariates (e.g. a baseline/pre-treatment value, age, sex).

What you provide

  • Outcome: one numeric column.
  • Group: one categorical column.
  • Covariates (adjust for): one or more columns to adjust for (numeric or categorical).

Options

Missing data

  • Complete case (listwise deletion)
  • Mean imputation (single)
  • Median imputation (single)

Multiple comparisons

  • Not adjustable for this method. Where it makes post-hoc comparisons, the procedure applies its own correction.

Confidence level

Every interval in the result is reported at the level you choose:

  • 90%
  • 95%
  • 99%

Other methods under Comparing groups:

Guides that discuss this method

Worked examples

Celeus's result on a published or illustrative dataset, next to an independent computation and, where one exists, a published value. The data themselves are not reproduced here.

MASS::anorexia

  • Source: Published dataset distributed with an R package
  • Licence: MASS (GPL)
  • Reference: Venables & Ripley (2002), Modern Applied Statistics with S, 4th ed. (Springer) - the canonical worked ANCOVA dataset
QuantityCeleusIndependent computationPublished valueAgrees
Test statistic7.868087.86808-Yes
Degrees of freedom2,682,68-Yes
p-value0.000843840.00084384-Yes
Effect size0.1879250.187925-Yes
Effect size confidence interval0.0400448, 0.34030200.0400448, 0.3403020-Yes

MASS::cats (heart and body weight of 144 adult cats)

  • Source: Published dataset distributed with an R package
  • Licence: MASS (GPL)
  • Reference: Fisher (1947), Biometrics 3:65-68 (the data); analysed in Venables & Ripley (2002), Modern Applied Statistics with S, 4th ed.; independent computation
QuantityCeleusIndependent computationPublished valueAgrees
Test statistic0.07290720.0729072-Yes
p-value0.7875450.787545-Yes

carData::Baumann (reading comprehension, three teaching methods, two pretests)

  • Source: Published dataset distributed with an R package
  • Licence: carData (GPL)
  • Reference: Baumann, Seifert-Kessell & Jones (1992), Journal of Reading Behavior 24:143-172 (the data); independent computation
QuantityCeleusIndependent computationPublished valueAgrees
Test statistic12.657912.6579-Yes
Degrees of freedom2,612,61-Yes
p-value2.52235e-052.52235e-05-Yes
Effect size0.2932930.293293-Yes
Effect size confidence interval0.0629496, 0.49745400.0629496, 0.4974540-Yes
Confidence level of the effect size interval0.990.99-Yes

MASS::anorexia (the first six patients of each treatment arm)

  • Source: Published dataset distributed with an R package
  • Licence: MASS (GPL)
  • Reference: Hand et al. (1994), A Handbook of Small Data Sets (the data); analysed in Venables & Ripley (2002), Modern Applied Statistics with S, 4th ed.; independent computation
QuantityCeleusIndependent computationPublished valueAgrees
Test statistic3.355543.35554-Yes
Degrees of freedom2,142,14-Yes
p-value0.06448760.0644876-Yes
Effect size0.3240330.324033-Yes
Effect size confidence interval0.000000, 0.6012920.000000, 0.601292-Yes

MASS::anorexia with the baseline weight removed on rows 4, 30 and 60

  • Source: Published dataset distributed with an R package
  • Licence: MASS (GPL)
  • Reference: Hand et al. (1994), A Handbook of Small Data Sets (the data); analysed in Venables & Ripley (2002), Modern Applied Statistics with S, 4th ed.; independent computation
QuantityCeleusIndependent computationPublished valueAgrees
Test statistic7.414247.41424-Yes
Degrees of freedom2,652,65-Yes
p-value0.001257630.00125763-Yes
Effect size0.1857540.185754-Yes
Effect size confidence interval0.0360123, 0.34120900.0360123, 0.3412090-Yes
Number of observations6969-Yes

Validation report

References

  1. Fisher, R. A. (1925). Statistical Methods for Research Workers. Oliver and Boyd, Edinburgh.