Two-Way ANCOVA (factorial + covariate)
VerifiedANOVA
Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.
Loading teaching datasets…
Or use your own dataset
Loading your datasets…
Two-factor between-subjects ANOVA that statistically adjusts for one or more continuous covariates.
Reduces residual variance, increases power on the main effects and interaction, and removes confounding from baseline differences. Reports the same 3-F-test family as 2-way ANOVA (Factor A, Factor B, A×B) plus the covariate's regression slope. Critically requires the homogeneity-of-regression-slopes assumption — covariate × factor interactions must be NS for the adjusted comparisons to be interpretable.
Worked example
Do method and sex affect exam score after adjusting for prior ability?
A two-way ANCOVA on exam score with Method × Sex, adjusting for a prior-ability covariate.
The main effect of method remained significant after covariate adjustment, F(2, 83) = 6.2, p = .003.
A two-way ANCOVA showed a significant main effect of method on exam score after controlling for prior ability, F(2, 83) = 6.2, p = .003.
Try it yourself: Load this ready-made sample and follow the run above.
When to use it
- Factorial design with baseline-adjusted outcomeA 2 (Therapy: CBT vs Mindfulness) × 2 (Format: in-person vs online) RCT measures depression at baseline and 8 weeks.
- Factorial observational design with confounder adjustmentComparing job-satisfaction across 2 (Department: engineering vs sales) × 3 (Region: NA, EU, APAC) while controlling for tenure (years at company), which differs systematically by r
When NOT to — use instead
- No baseline / covariate availableWithout a covariate, ANCOVA reduces to plain 2-way ANOVA — use that explicitly. → Two-Way ANOVA (factorial A \u00d7 B)
- Heterogeneous regression slopes (covariate × factor interaction significant)The adjusted comparisons are not interpretable — fit a moderation model with explicit interaction terms. → Moderation (2-level Mod \u00d7 continuous IV) \u2014 interaction + simple slopes
- Within-subjects / repeated measuresANCOVA assumes independent observations. → Linear Mixed Effects (LMM) \u2014 clustered / repeated data (ICC, BLUPs)
- Non-normal residuals + small per-cell nANCOVA inherits normality assumptions of the linear model; small samples need a robust / rank-based alternative. → Robust ANOVA (Welch-Yuen trimmed means)
Hypotheses
Parameter tested: adjusted cell means {μ_adj[i,j]} of the DV at the grand covariate mean
Assumptions (and what to do if they fail)
Check: Inspect per-cell boxplots of the DV.
If violated: Outliers distort within-cell variance and the covariate-adjusted F-tests.
Check: Shapiro-Wilk on residuals.
If violated: Severely non-normal residuals threaten the F-test's Type I error rate.
Check: Levene's p > .05 → variances homogeneous across cells.
If violated: Unequal cell variances inflate F-test Type I error.
Check: Per-cell scatter with linear fit; verify no obvious curvature.
If violated: Non-linear DV-covariate relationships produce biased adjusted means.
Check: All covariate-interaction terms' p > .05 → slopes homogeneous.
If violated: If slopes differ across cells, a single 'adjusted' comparison is not meaningful; the IV effect depends on the covariate value.
Check: All F-tests in the covariate ANOVA p > .05 → groups equivalent on the covariate.
If violated: If the covariate differs across cells and is on the causal path of the IVs, ANCOVA may remove part of the treatment effect (Lord's paradox).
Ready to run a Two-Way ANCOVA (factorial + covariate) on your own data?
Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.
Run this test →