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%
Related methods
Other methods under Comparing groups:
- Welch's t-test
- Student's t-test
- Paired t-test
- Mann-Whitney U test
- Wilcoxon signed-rank test
- One-way ANOVA
- Welch's ANOVA
- Kruskal-Wallis test
- Repeated-measures ANOVA (Greenhouse-Geisser)
- Two-way ANOVA (factorial)
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
| Quantity | Celeus | Independent computation | Published value | Agrees |
|---|---|---|---|---|
| Test statistic | 7.86808 | 7.86808 | - | Yes |
| Degrees of freedom | 2,68 | 2,68 | - | Yes |
| p-value | 0.00084384 | 0.00084384 | - | Yes |
| Effect size | 0.187925 | 0.187925 | - | Yes |
| Effect size confidence interval | 0.0400448, 0.3403020 | 0.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
| Quantity | Celeus | Independent computation | Published value | Agrees |
|---|---|---|---|---|
| Test statistic | 0.0729072 | 0.0729072 | - | Yes |
| p-value | 0.787545 | 0.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
| Quantity | Celeus | Independent computation | Published value | Agrees |
|---|---|---|---|---|
| Test statistic | 12.6579 | 12.6579 | - | Yes |
| Degrees of freedom | 2,61 | 2,61 | - | Yes |
| p-value | 2.52235e-05 | 2.52235e-05 | - | Yes |
| Effect size | 0.293293 | 0.293293 | - | Yes |
| Effect size confidence interval | 0.0629496, 0.4974540 | 0.0629496, 0.4974540 | - | Yes |
| Confidence level of the effect size interval | 0.99 | 0.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
| Quantity | Celeus | Independent computation | Published value | Agrees |
|---|---|---|---|---|
| Test statistic | 3.35554 | 3.35554 | - | Yes |
| Degrees of freedom | 2,14 | 2,14 | - | Yes |
| p-value | 0.0644876 | 0.0644876 | - | Yes |
| Effect size | 0.324033 | 0.324033 | - | Yes |
| Effect size confidence interval | 0.000000, 0.601292 | 0.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
| Quantity | Celeus | Independent computation | Published value | Agrees |
|---|---|---|---|---|
| Test statistic | 7.41424 | 7.41424 | - | Yes |
| Degrees of freedom | 2,65 | 2,65 | - | Yes |
| p-value | 0.00125763 | 0.00125763 | - | Yes |
| Effect size | 0.185754 | 0.185754 | - | Yes |
| Effect size confidence interval | 0.0360123, 0.3412090 | 0.0360123, 0.3412090 | - | Yes |
| Number of observations | 69 | 69 | - | Yes |
References
- Fisher, R. A. (1925). Statistical Methods for Research Workers. Oliver and Boyd, Edinburgh.