Factorial ANOVA and ANCOVA (GLM Univariate)
Compares the mean of one numeric outcome across the levels of one or more factors, optionally adjusting for covariates. Handles two-way and higher designs with interactions, unequal group sizes (Type III sums of squares) and ANCOVA.
Menu: Analyze → General Linear Model → Univariate…
When should I use it?
- Does exam score depend on teaching method, gender, and their combination?
- Do groups still differ after adjusting for a pre-test score (ANCOVA)?
What are the assumptions?
- Independent observations.
- Residuals roughly normal within each cell (less important with 20+ per cell).
- Equal error variances across cells (Levene's test); if violated, use Games-Howell post hoc tests and interpret F with care.
- ANCOVA: the covariate relates linearly to the outcome with the same slope in every group (check the factor × covariate interaction with a custom model).
How do I run it in StatLab?
- Move the outcome to Dependent variable and the grouping variables to Fixed factor(s).
- Add any covariates (numeric control variables).
- Under Post Hoc, choose the factors and tests (Tukey for equal variances, Games-Howell otherwise).
- Under EM Means, choose a comparison adjustment (Bonferroni is a safe default).
- Under Options, keep descriptive statistics, homogeneity tests and effect sizes.
- Add random factors (e.g. clinics or classrooms sampled from a larger population) under Random factor(s); each effect is then tested against the error term implied by the expected mean squares.
- Under Contrasts, choose a contrast (simple, deviation, difference, Helmert, repeated, polynomial) to test planned comparisons of the factor levels.
- Under EM Means, tick Simple effects to test each factor within each level of the others — the usual follow-up to a significant interaction.
- Under Post Hoc, Dunnett compares every group with one control group; S-N-K and R-E-G-W-Q give homogeneous subsets; Tamhane's T2 does not assume equal variances.
- Use a WLS weight when the cases have known, unequal precision; choose Type II sums of squares for unbalanced designs without interactions, Type I for a planned order of entry.
How do I read the output?
| Output | Meaning |
|---|---|
| Levene's Test of Equality of Error Variances | Sig. < .05 means the cell variances differ. |
| Tests of Between-Subjects Effects | F and Sig. for each main effect and interaction; Partial Eta Squared is the effect size (.01 small, .06 medium, .14 large). |
| Estimated Marginal Means | Group means adjusted for the other factors and covariates, with confidence intervals and pairwise comparisons. |
| Multiple Comparisons | Post hoc tests on the observed means of each factor. |
| Profile plot | Non-parallel lines suggest an interaction. |
| Expected Mean Squares | With random factors: how each mean square is built from the variance components; the footnotes show which mean squares form each error term. |
| Contrast Results (K Matrix) / Test Results | Each planned contrast's estimate, standard error, significance and confidence interval, and the joint F test. |
| Univariate Tests (simple effects) | F test of one factor at each level of the other factor(s), followed by pairwise comparisons. |
| Homogeneous Subsets | Groups listed by mean; groups in the same column do not differ significantly. |
What are common mistakes?
- Interpreting main effects alone when the interaction is significant — describe simple effects instead.
- Running post hoc tests on a factor with two levels (the F test already answers the question).
- Using ANCOVA to 'equalise' groups that differ on the covariate because of the treatment itself.
- Treating a sampled grouping factor (schools, raters) as fixed — the F tests for the other effects are then too liberal.
- Expecting Type III sums of squares with empty cells; use Type I or II there.