ANOVA Family · General Linear Model
Mixed Factorial ANOVA
A mixed ANOVA tests whether separate groups change differently across repeated measurements.
A mixed factorial ANOVA takes one continuous outcome, measured repeatedly in two or more separate groups, and tests whether the groups differ, whether scores change, and whether the groups change differently.
Does eight weeks of online CBT reduce depression more than waiting does? Sixty adults with depression symptoms were randomly assigned, 30 each, to eight weeks of online CBT or a waitlist, and completed the PHQ-9 depression questionnaire before and after.
- Tests
- Differences among population means, between groups and across repeated measurements
- Observations
- Mixed
- Parametric
- Yes
- Headline Statistic
- F
- Effect Size
- Generalized Eta Squared
- Groups
- 2+
The Basics
When to Use It
Use it when you have two or more separate groups of people, a continuous outcome, and every person measured at two or more times or in two or more conditions: one between-subjects factor and one within-subjects factor. Most often it's a randomized trial with a before and an after measurement, where the question is whether the groups changed differently. For example:
- Does eight weeks of online CBT reduce depression (PHQ-9) more than waiting does?
- Do reaction times change differently in older and younger adults across three nights of sleep restriction?
- Does a mindfulness course lower students' GAD-7 anxiety scores more than a study-skills course, from before to after and at a three-month follow-up?
Vocabulary You Need
Definition Between-Subjects Factor
A factor whose levels are made up of different people, so each person is in one level only, such as treatment versus control, or three different instructions. Differences between its levels are differences between separate groups, so they are judged against how much people differ from one another. Random assignment to its levels is what lets a difference be read as an effect. Also called an independent-groups factor. Glossary →
Definition Within-Subjects Factor
A factor whose levels are all measured in the same people, such as before and after a program, or three task conditions each person completes. Differences between its levels are compared within each person, so stable differences between people cancel out, which usually makes these comparisons more precise than comparisons between groups. The price is that a person's scores are related, and the analysis has to allow for that. Also called a repeated-measures factor. Glossary →
Definition Main Effect
How much the outcome differs across the levels of one factor, averaging over the levels of the other factors. It is read from the marginal means: for each level, the average of its cell means, each cell counted equally. When the factors interact, a main effect is an average of effects that differ, so it can describe no actual condition well. Glossary →
Definition Interaction Effect
The part of a factorial design's result that neither factor explains on its own: the effect of one factor changes depending on the level of the other. In a 2 × 2 design it is a difference of differences, the effect of one factor at one level of the other minus its effect at the other level. On a plot of the cell means, clearly non-parallel lines suggest one; the interaction test says whether the departure is bigger than noise. An interaction is symmetric: if A's effect depends on B, B's effect depends on A. Glossary →
Assumptions and Inference
1. Independent Participants (for the p-Values and Intervals) Each person's before and after scores belong together, but different people are independent of one another. Random assignment doesn't remove dependence from shared clinics, therapy groups or other clusters.
- What It Means
- Each person's data comes from a separate, unconnected source, so knowing one person's scores tells you nothing about anyone else's. In designs that measure people more than once, their own scores are meant to be related; it's different people who must be independent. Methods built for clustered data, such as multilevel models and GEE, also allow members of the same group to be related, as long as the analysis names the grouping; then it's the groups that must be independent.
- Applies To
- Observations
- How to Check
- By design, not by a test. Did each person contribute their own data, with no clusters such as roommates, couples, therapy groups or classrooms whose members influence each other? If there are clusters, does the analysis model every one of them?
- How Much It Matters
- A lot. Each person's two scores are meant to be related, and the design handles that. But if people influence each other, as in group therapy or a shared online forum, their changes are more alike than the F-test expects, and p comes out too small.
What to Do
- Alternative Test Multilevel Regression (HLM). A multilevel model with a level for the therapy group or cluster as well as for the person.
- Design Change Deliver the treatment individually, or randomize and analyze whole clusters.
2. Normality of the Changes within Each Group (for the p-Values and Intervals) The classical tests assume normal errors. For the group × time interaction with two time points, that means each group's change scores are roughly normal; for the group test, each person's average of their two scores. Moderate departures are often tolerated, especially with more people, but no sample size makes them automatically irrelevant, and strong skew, heavy tails or extreme changes can still matter.
- What It Means
- The test's model assumes the scores it relies on are roughly normal: the scores within each group (or the scores themselves, for a one-sample test), the difference scores in a paired design, or the residuals (the errors left around a model's predictions) in a regression. For p-values and confidence intervals, what really matters is that the estimates (such as a mean, a difference between means or a model's coefficients) are roughly normal across repeated samples. A large enough sample usually provides that; how large depends on how skewed the scores are and how extreme their outliers.
- Applies To
- Residuals
- How to Check
- Compute each person's change (after − before) and look at a histogram or Q–Q plot of the changes in each group, for strong skew or extreme changes. Histograms of the raw before and after scores help less: they mostly show how differently people started. Don't rely on a normality test: with small samples it misses real problems, and with large ones it flags trivial ones.
- How Much It Matters
- Little, with equal groups of 30. The interaction test with two time points is a t-test on the change scores, so it's the change scores within each group that should be roughly normal; for the group test it's each person's average. With 30 per group, moderate skew barely matters. Here the CBT group's changes lean left (skewness −0.76, as a few people improved a lot) and the waitlist's are close to symmetric (0.14); no change is more than 2.4 SDs from its group's mean. In simulations of split-plot designs, the ordinary F held its false-positive rate for the group effect in balanced designs even with non-normal data, and the corrected F-tests for the time and interaction effects held up under moderate non-normality (Blanca et al., 2026). Extreme changes in a small sample matter more.
What to Do
- Robust Estimation Bootstrap a confidence interval for the difference in change, or use the bootstrap-F that Blanca et al. (2026) recommend, with more than 20 people for moderate violations and more than 80 for severe ones.
- Alternative Test Mann-Whitney U Test. Compare the two groups' change scores by ranks, when the question is whether one group tends to change more rather than whether the average changes differ. It isn't the interaction test with normality removed; if mean change is the target, consider a robust mean-comparison procedure or a bootstrap interval suited to the sample size and distribution.
- Transformation Log-transform right-skewed outcomes such as reaction times. Results are then on the log scale, where an interaction can appear or vanish.
3. Equal Variances and Covariances (for the Classic F-Tests) The groups share the same spread at each time point and the same correlation between times. Here the interaction is a pooled-variance t-test on the change scores, so it assumes the two groups' changes are equally variable. With more time points the covariance assumptions get more involved (see Sphericity).
- What It Means
- The outcome varies about as much within each group's population. Tests that pool the groups' variances into one estimate, like Student's t-test and the classic ANOVA, rely on it.
- Applies To
- Variances
- How to Check
- Compare the groups' standard deviations and look at side-by-side box plots. Don't use Levene's test as a gatekeeper: it misses real differences in small samples and flags trivial ones in large samples.
- How Much It Matters
- Less with equal group sizes, like our 30 and 30, whose change scores have SDs of 5.01 and 5.00. The groups should be about equally spread out at each time point, which also makes their change scores and their averages equally spread. With unequal group sizes and unequal spreads, the F-test's error rates drift: when the smaller group is the more variable one, the test for the group effect becomes too liberal (Blanca et al., 2026).
What to Do
- Correction Compare the two groups' change scores with Welch's t-test, which doesn't assume equal spreads. For our data it gives t(58.00) = −2.32, p = .024, the same as the interaction test.
- Design Change Keep the groups the same size, which makes the F-test much less sensitive to unequal spreads.
4. Sphericity The differences between every pair of time points have equal variance. With two time points it holds automatically; with three or more, the time and time × group tests may need a Greenhouse-Geisser or similar correction.
- What It Means
- Take each person's difference score between two conditions. Sphericity means those difference scores have the same variance for every pair of conditions. When it fails, the usual F test comes out too liberal, giving too many false positives. It only matters for an effect with more than one degree of freedom: a factor with three or more levels, or an interaction involving one. In a factorial design each effect is checked on its own; a factor with two levels has only one set of differences.
- Applies To
- Covariance structure
- How to Check
- Compute the variance of the difference scores for each pair of levels of a factor (in a factorial design, after averaging over the other factors) and compare them, and look at the Greenhouse-Geisser epsilon (ε), which software prints for each effect. Mauchly's test is common, but it misses real violations in small samples and flags trivial ones in large samples, so don't let it decide whether to correct.
- How Much It Matters
- None here. With two time points there is only one set of change scores, so sphericity holds automatically and ε = 1. It matters when the within-subjects factor has three or more levels; then it affects the time and interaction tests, not the group test. A mixed design also asks for multisample sphericity: the groups must share the same pattern of variances and correlations across time, as well as that pattern meeting sphericity (Blanca et al., 2026). ε corrections address ordinary sphericity, not differences between the groups, which matter most when group sizes are unequal.
What to Do
- Proceed with Caveat Greenhouse-Geisser and Huynh-Feldt corrections multiply the df by ε, which is 1 here, so they give the same F and p. Report ε = 1 so readers know it was considered.
- Correction With three or more time points, report the Greenhouse-Geisser (or Huynh-Feldt) corrected tests for time and time × group. If the groups' covariance patterns differ and group sizes are unequal, use a multilevel model with group-specific covariance structures or the bootstrap-F instead.
5. Complete Data (for Standard Mixed ANOVA) The standard analysis uses only people with a score at every time point. Missing scores don't break the test's logic, but anyone incomplete is dropped, which costs precision and can bias the result.
- What It Means
- The test compares conditions within each person, so it needs each person's full set of scores. Anyone missing a condition is dropped from the analysis entirely.
- Applies To
- Observations
- How to Check
- Count the people with a missing condition and ask why they're missing. If dropouts are more likely in one condition, dropping them can bias the result.
- How Much It Matters
- Depends on why data are missing. Anyone missing the after score is dropped entirely. If people on the waitlist who felt worse stopped responding, dropping them would make the waitlist look better than it was and hide part of CBT's advantage. A mixed model keeps their before scores, but it only fixes that bias if the missingness is explained by what the model includes, such as those before scores; it can't correct dropout driven by something unmeasured.
What to Do
- Alternative Test Multilevel Regression (HLM). A multilevel model uses everyone's available scores instead of dropping incomplete people.
- Proceed with Caveat Report how many people in each group were missing a time point, so readers can judge the risk.
Limitations
This Is Not Your Test If…
- Everyone got the same treatment, measured repeatedly One-Way Repeated-Measures ANOVA →
- Every factor is measured within the same people Factorial Repeated-Measures ANOVA →
- Each person was measured only once Factorial Between-Subjects ANOVA →
- Groups were randomized and you'd rather adjust the after scores for baseline ANCOVA →
- Some people are missing a time point Multilevel Regression (HLM) →
- Your outcome is yes/no or a count Generalized Estimating Equations (GEE) →
What It Doesn't Tell You
- Why. Random assignment lets us say CBT made the difference, but not which part of it helped: the techniques, the structure, or simply the attention.
- Whether it matters. CBT gave an extra 3-point average drop on the 27-point PHQ-9 compared with waiting. Whether that's clinically meaningful depends on the population, their starting severity, how individual responses varied, the uncertainty in the estimate (0.41 to 5.59 points) and the criterion for clinical importance chosen for the study. The PHQ-9's severity categories (Kroenke et al., 2001) classify scores; they aren't units of improvement, so they can't set that threshold. And significance doesn't make the result important for every patient.
- Who else. The result describes adults like these 60, who signed up for an online program, and only over eight weeks. It says nothing about whether the difference lasts.
- What the main effects mean here. The significant drop over time includes the waitlist's own improvement, from natural recovery, regression to the mean or retaking the questionnaire, so it isn't evidence for CBT. And the non-significant group effect doesn't mean CBT failed: it averages in the before scores, when neither group had been treated.
Common Mistakes
-
Don'tRead the main effect of group as the treatment effect in a before-and-after design.
InsteadTest the treatment with the time × group interaction. The group effect averages in the before scores, which treatment can't have changed.
-
Don'tConclude a treatment worked because the treated group improved significantly and the control group didn't.
InsteadCompare the two groups' changes directly. That comparison is the interaction.
-
Don'tReport the significant main effect of time as evidence the treatment works.
InsteadRemember the control group changed too. Time effects include regression to the mean, practice and natural recovery.
-
Don'tHold partial η² against Cohen's benchmarks or against η² from between-subjects studies.
InsteadLead with generalized η², which is comparable across designs, and label partial η² if you also give it.
-
Don'tQuietly drop people who missed the after measurement.
InsteadReport dropout by group, and consider a multilevel model, which keeps everyone's available scores. Keeping them doesn't by itself remove bias: that still depends on why people dropped out.
-
Don'tInterpret a main effect without first looking at the interaction.
InsteadCheck the interaction first. If it's there, describe the main effect as an average over the other factor, and let simple effects say where the effect holds.
-
Don'tConclude that two effects differ because one is significant and the other isn't.
InsteadTest the interaction, which compares the two effects directly. The difference between significant and not significant isn't itself significant.
-
Don'tAdd up the partial η² values as if they split the variation between them.
InsteadRemember each has its own denominator, so they can sum past 1. Report η² if you want shares of the total.
-
Don'tReport partial η² under the label η².
InsteadSay which one you report. SPSS prints partial η², which is never smaller than η² and is usually larger, especially with other effects or repeated measures.
-
Don'tRead a p-value as the chance that the null hypothesis is true.
InsteadRead it as: if the null were true, how often data at least this extreme would turn up.
Result Decoder
Significance and Effect Size Guidelines
Benchmarks Significance (p Value)
-
p < .001
Very strong evidence against the null hypothesis.
-
.001 ≤ p < .01
Strong evidence against the null hypothesis.
-
.01 ≤ p < .05
Statistically significant at α = .05. Moderate evidence against the null hypothesis.
-
.05 ≤ p < .10
Not significant. Weak evidence; sometimes called a “trend.” Treat it as inconclusive.
-
p ≥ .10
Not significant. Little evidence against the null, which is not the same as evidence of no effect.
These evidence labels are one common convention for describing p in graded language rather than as significant or not; the boundaries are rough guides, not rules, and other authors draw them differently. Muff et al. (2022) argue for this kind of language of evidence over a single cutoff. α is chosen before the analysis, and p never says how big or important an effect is.
Benchmarks Effect Size (Generalized Eta Squared)
-
η²G < .01
Below Small
Smaller than the conventional small benchmark. Whether an effect this size matters depends on the setting.
-
.01 ≤ η²G < .06
Small
A small effect next to the background variation: differences between people, measured factors and error. Hard to see without measuring it.
-
.06 ≤ η²G < .14
Medium
A noticeable effect next to the background variation.
-
η²G ≥ .14
Large
A large effect next to the background variation.
Cohen's (1988) η² benchmarks, which generalized η² can be held against because it keeps the differences between people in the denominator, as a between-subjects η² would. Lakens (2013) calls this a last resort: comparing with similar effects in the literature is better. Don't hold partial η² against them in a design with repeated measures.
How It's Reported
Equation Form
Mdiff = −3.00, 95% CI [−5.59, −0.41], η²G = .02 (η²p = .08), F(1, 58) = 5.39, p = .024
Table 1. Mixed ANOVA for PHQ-9 Depression Scores
| SS | df | MS | F | p | \eta^2_G | \eta^2_p | |
|---|---|---|---|---|---|---|---|
| Between subjects | |||||||
| Group | 67.5 | 1 | 67.50 | 1.79 | .186 | .02 | .03 |
| Error (people within groups) | 2187.0 | 58 | 37.71 | ||||
| Within subjects | |||||||
| Time | 367.5 | 1 | 367.50 | 29.32 | < .001 | .11 | .34 |
| Time × Group | 67.5 | 1 | 67.50 | 5.39 | .024 | .02 | .08 |
| Error (time × people within groups) | 727.0 | 58 | 12.53 |
Note. Group (online CBT or waitlist) is between subjects; time (before, after) is within subjects. Each effect is tested against the error term below it. η²G = generalized eta squared, with both error terms in the denominator; η²p = partial eta squared, what SPSS prints. The time × group interaction is the treatment effect. With two time points, ε = 1.
Full Text (APA Style)
Depression scores fell further with online CBT (from M = 15.00, SD = 4.93, to M = 10.00, SD = 4.95) than on the waitlist (from M = 15.00, SD = 4.89, to M = 13.00, SD = 5.27), a difference in change of −3.00 PHQ-9 points, 95% CI [−5.59, −0.41], η²G = .02 (partial η²p = .08). A 2 (group) × 2 (time) mixed ANOVA showed that this time × group interaction was statistically significant, F(1, 58) = 5.39, p = .024. Scores fell over time overall, F(1, 58) = 29.32, p < .001, η²G = .11, and the groups did not differ when averaged over time, F(1, 58) = 1.79, p = .186, η²G = .02. Paired t-tests with a Holm correction showed that the CBT group improved, t(29) = −5.47, p < .001, and so did the waitlist, by less, t(29) = −2.19, p = .037.
- Lead with the interaction, since in a before-and-after design it's the treatment effect, and give it in points (the difference in change) as well as generalized η².
- Give all four cell means and SDs, so readers can see who changed and by how much.
- Name the design (2 × 2 mixed, which factor is between and which is within) and say which effect size you report. Generalized η² (.02) is comparable across designs; the partial η² that SPSS prints (.08) isn't, so if you give it too, label it.
- With two time points, sphericity isn't an issue (ε = 1); with three or more, say which correction you used.
- Italicize Latin symbols (M, SD, F, t, p) but not Greek ones (η²), and report exact p to three decimals.
Reading Each Piece
The equation form above, piece by piece, in this order: how big, how certain, then how surprising.
| Mdiff = −3.00 | The CBT group's depression scores fell 3 points further than the waitlist's on the 27-point PHQ-9. That difference in change is the treatment effect. |
| η²G = .02 | Set against the differences between people and the noise in their changes, the extra change with CBT is about 2% of the variation, a small effect by the benchmarks above, which are a last resort here. SPSS's partial η² of .08 describes the same effect against only the within-person noise. In points, it's 3 on a 27-point scale. Benchmarks ↑ |
| 95% CI [−5.59, −0.41] | CBT plausibly lowers PHQ-9 scores anywhere from about half a point to five and a half points more than waiting. The whole range is below zero, but its near end is close to it. |
| F(1, 58) = 5.39 | The interaction's mean square is 5.39 times the mean square for noise in people's changes; if both groups changed by the same amount on average, this ratio would hover around 1. Its square root, 2.32, says the 3-point gap is 2.32 standard errors from zero (step 8). The 1 and 58 are the degrees of freedom: 1 for a two-group, two-time interaction, and 60 people minus 2 groups. |
| p = .024 | If online CBT helped no more than waiting, an interaction F of 5.39 or more would turn up about 2.4% of the time, under the test's assumptions. That's below .05, so the interaction is statistically significant. Benchmarks ↑ |
Calculations
The Running Example
The online-CBT study: 60 adults, 30 randomly assigned to online CBT and 30 to a waitlist, each completing the PHQ-9 (0 to 27) before and after eight weeks.
| Null Hypothesis | Alternative | |
|---|---|---|
| Group | \mu_{\text{CBT}} = \mu_{\text{WL}} | \mu_{\text{CBT}} \neq \mu_{\text{WL}} |
| Time | \mu_{\text{after}} = \mu_{\text{before}} | \mu_{\text{after}} \neq \mu_{\text{before}} |
| Group × Time | \mu_{\text{CBT, after}} - \mu_{\text{CBT, before}} = \mu_{\text{WL, after}} - \mu_{\text{WL, before}} | \mu_{\text{CBT, after}} - \mu_{\text{CBT, before}} \neq \mu_{\text{WL, after}} - \mu_{\text{WL, before}} |
Each \mu (“mu”) is a population mean PHQ-9 score; “WL” is the waitlist. With two subscripts it's one group at one time; with one, it's averaged over the other factor (\mu_{\text{CBT}} averages before and after). The null says both groups change by the same amount on average, so the treatment adds nothing beyond waiting. This is the time × group interaction, the test that answers the study's question. The same ANOVA also tests two main effects, whether the groups differ averaged over time and whether scores change averaged over groups, but neither of those is the treatment effect.
What Your Data Should Look Like
One row per person per time point (long format), with a column identifying the person, one for their group, one for the time point and one numeric column for the score. Each person appears once at every time point and in only one group. SPSS's repeated-measures menu wants the wide version instead: one row per person, with a column for each time point.
| participant | group | time | condition | phq9 |
|---|---|---|---|---|
| 1 | cbt | before | cbt_before | 18 |
| 1 | cbt | after | cbt_after | 7 |
| 2 | waitlist | before | waitlist_before | 17 |
| 2 | waitlist | after | waitlist_after | 11 |
| 3 | waitlist | before | waitlist_before | 25 |
| 3 | waitlist | after | waitlist_after | 17 |
| … 114 more rows | ||||
| Before | After | All | |
|---|---|---|---|
| Online CBT | 15.00 (4.93) | 10.00 (4.95) | 12.50 |
| Waitlist | 15.00 (4.89) | 13.00 (5.27) | 14.00 |
| All | 15.00 | 11.50 | 13.25 |
Cell M (SD), group by time. All gives the marginal means; the grand mean is 13.25.
Time is within subjects: each of the 60 participants has a score at every time. Group is between subjects: n = 30 per group.
Simulated data.
Napkin Math
The whole test, one idea at a time. Under each heading, a line says why the step matters, and the green note reads the equation in plain English with the online-CBT study's numbers. Collapse all to read just the headings: they tell the whole story on their own.
-
1. Find Each Group's Average Before and After, and Compare Their Changes
The whole study comes down to four averages. Each group's change is its after average minus its before average, and the treatment effect is how much more one group changed than the other, a difference of differences.
M_{\text{diff}} = (\bar{x}_{1,\text{after}} - \bar{x}_{1,\text{before}}) - (\bar{x}_{2,\text{after}} - \bar{x}_{2,\text{before}}) =(10.00 - 15.00) - (13.00 - 15.00)= −3.00 points
\bar{x}_{\text{CBT, before}} = 15.00
\bar{x}_{\text{CBT, after}} = 10.00
\bar{x}_{\text{WL, before}} = 15.00
\bar{x}_{\text{WL, after}} = 13.00
\bar{x}_{\text{grand}} = 13.25
Both groups started at 15.00. The CBT group ended at 10.00, a change of −5.00 points, and the waitlist at 13.00, a change of −2.00. So M_{\text{diff}} = −5.00 − (−2.00) = −3.00 points. Averaged over everything, the grand mean is 13.25.
-
2. Split the Variation into a Between-People Part and a Within-People Part
A mixed ANOVA runs two analyses at once. Between people, it compares each person's average score across the groups, against how much people's averages differ within a group. Within people, it looks at each person's two scores around their own average: the change everyone shares (time), the extra change in one group (time × group), and the leftover noise in people's changes (error).
SS_{\text{total}} = \underbrace{SS_{\text{group}} + SS_{\text{people}}}_{\text{between people}} + \underbrace{SS_{\text{time}} + SS_{\text{time} \times \text{group}} + SS_{\text{error}}}_{\text{within people}} =3416.5 = 67.5 + 2187 + 367.5 + 67.5 + 727SS_{\text{group}} = 67.5
SS_{\text{people}} = 2187.0
SS_{\text{time}} = 367.5
SS_{\text{time} \times \text{group}} = 67.5
SS_{\text{error}} = 727.0
SS_{\text{group}} is 60 scores per group times each group's squared distance from 13.25: 60 × (0.75² + 0.75²) = 67.5. SS_{\text{time}} is 60 scores per time point times each time's distance from 13.25 (15.00 before, 11.50 after): 60 × (1.75² + 1.75²) = 367.5. SS_{\text{time} \times \text{group}} is what's left in the four cell means, 30 × 4 × 0.75² = 67.5. SS_{\text{people}} is built from each person's average of their two scores: their squared distances from their group's average sum to 526 for CBT and 567.5 for the waitlist, and with 2 scores per person that's 2 × 1093.5 = 2187. SS_{\text{error}} is built from each person's change: their squared distances from their group's average change sum to 1454, and with two time points half of that, 727, is the noise in people's changes.
-
3. Account for How Much Information Each Part Had
Each sum becomes an average once we divide by the pieces of information behind it. Two groups, two times, and their interaction each get 1. Both noise terms get the number of people minus the number of groups: each group uses one piece to estimate its own average, and with two time points each person contributes one change. In general, with k groups and t time points, group has k − 1 df, time t − 1, the interaction (k − 1)(t − 1), people within groups N − k, and the within-person error (N − k)(t − 1).
df_{\text{effect}} = 1, \quad df_{\text{error}} = N - k =60 - 2= 58
N is our 60 people, not the 120 scores, and k is the 2 groups, so df_{\text{error}} = 60 − 2 = 58. With only two time points, sphericity can't fail, so the correction factor ε is exactly 1 and the df stay as they are.
-
4. Check the Two Main Effects, Each against Its Own Noise
The group effect compares people with other people, so it's judged against how much people's averages differ. The time effect compares people with themselves, so it's judged against the much smaller noise in people's changes. Neither is the question here.
F_{\text{group}} = \dfrac{SS_{\text{group}} / 1}{SS_{\text{people}} / 58}, \quad F_{\text{time}} = \dfrac{SS_{\text{time}} / 1}{SS_{\text{error}} / 58} =\dfrac{67.5}{37.71}, \quad \dfrac{367.5}{12.53}F_{\text{group}} = 1.79
p_{\text{group}} = .186
F_{\text{time}} = 29.32
2187 ÷ 58 = 37.71 is the variance between people, and 727 ÷ 58 = 12.53 the noise within them. 67.5 ÷ 37.71 = 1.79, so the groups barely differ overall (p = .186). 367.5 ÷ 12.53 = 29.32, so scores clearly fell on average across the two groups (p < .001). Whether each group fell is step 9's question.
-
5. Compare the Difference in Change with the Noise in People's Changes
This is the test that answers the question. If CBT did nothing beyond waiting, the extra change in one group would be no bigger than the noise in how much people change, and the ratio would hover around 1.
F_{\text{time} \times \text{group}} = \dfrac{SS_{\text{time} \times \text{group}} / df_{\text{time} \times \text{group}}}{SS_{\text{error}} / df_{\text{error}}} =\dfrac{67.5 / 1}{727 / 58} = \dfrac{67.5}{12.53}= 5.39
SS_{\text{time} \times \text{group}} is our 67.5 with 1 df, and SS_{\text{error}} / df_{\text{error}} is 727 ÷ 58 = 12.53. 67.5 ÷ 12.53 = 5.39, so the interaction's mean square is about five times the noise mean square.
-
6. Ask How Surprising a Difference in Change This Big Would Be If CBT Added Nothing
Finally, ask how often an interaction F at least this large would turn up if both groups really changed by the same amount.
p = P(F_{df_1,\,df_2} \ge F) =P(F_{1,\,58} \ge 5.39)= .024
F_{1,\,58} is an F distribution with 1 and 58 df. The chance it lands at or above 5.39 is .024, about 1 in 42. With 1 df in the numerator, that covers a difference in either direction.
-
7. Size the Treatment Effect against All the Differences between and within People
F grows with sample size; generalized η² doesn't. It sizes the interaction against all the variation a between-subjects study would also contain, the differences between people as well as the noise in their changes, so it can be compared with studies of other designs.
\eta^2_G = \dfrac{SS_{\text{effect}}}{SS_{\text{effect}} + SS_{\text{people}} + SS_{\text{error}}} =\dfrac{67.5}{67.5 + 2187 + 727}= .02
\eta^2_p = .08
SS_{\text{time} \times \text{group}} is the interaction's 67.5, SS_{\text{people}} the 2187 between people and SS_{\text{error}} the 727 of noise in their changes. 67.5 ÷ 2981.5 = .02, so the interaction is about 2% of itself plus all the person-to-person and change-to-change variation. It leaves out the group and time effects, so it isn't a share of the total. Partial η² leaves out the 2187, 67.5 ÷ (67.5 + 727) = .08, which is why it looks nearly four times bigger.
-
8. Give a Range of Plausible Values for the Treatment Effect
With two time points, the interaction is a comparison of two groups' change scores, so its interval comes from the same t-test: the difference in change plus or minus a cutoff times its standard error.
M_{\text{diff}} \pm t^{*}_{N-2} \times s_{\text{change}}\sqrt{\dfrac{1}{n_1} + \dfrac{1}{n_2}} =-3.00 \pm 2.002 \times 5.01\sqrt{\tfrac{1}{30} + \tfrac{1}{30}}= [−5.59, −0.41]
t = −2.32
s_{\text{change}} = 5.01 is the pooled SD of people's changes (the square root of 2 × 12.53), so the standard error is 1.29 points, and t^{*}_{58} = 2.002. 2.002 × 1.29 = 2.59, so the range is −3.00 ± 2.59, from −5.59 to −0.41 points. And t = −3.00 ÷ 1.29 = −2.32, whose square, 5.39, is our F.
-
9. Check How Much Each Group Changed on Its Own
A significant interaction says the changes differ, not what happened in each group. The simple effects of time answer that, one group at a time, as paired t-tests on each group's own change scores.
t_g = \dfrac{\bar{D}_g}{s_{D_g} / \sqrt{n_g}} =\dfrac{-5.00}{5.01 / \sqrt{30}}, \quad \dfrac{-2.00}{5.00 / \sqrt{30}}t_{\text{CBT}} = −5.47
t_{\text{WL}} = −2.19
p_{\text{WL}} = .037
\bar{D}_g is a group's average change and s_{D_g} its spread. CBT's −5.00 ÷ 0.915 = −5.47 (p < .001); the waitlist's −2.00 ÷ 0.914 = −2.19 (p = .037, unchanged by Holm's correction). Both groups improved; CBT improved more.
Run It in Software
The code below reads the running example's data from data.csv; save it in the same folder you run the code from.
SPSS (version 30, as documented by IBM)
- SPSS's repeated-measures ANOVA needs one row per person, so first restructure the file: Data → Restructure → Restructure selected cases into variables, with
participantas the Identifier andtimeas the Index, and dropcondition. You getphq9.afterandphq9.before. - Analyze → General Linear Model → Repeated Measures. Name the Within-Subject Factor
timewith 2 levels, click Add, then Define. - Move
phq9.beforeandphq9.afterinto the two time slots, in that order, andgroupinto Between-Subjects Factor(s). - EM Means: move
group*timeto Display Means for, check Compare simple main effects, and choose Bonferroni (SPSS doesn't offer Holm here). - Options: check Descriptive statistics, Estimates of effect size and Homogeneity tests, and click OK.
Or paste this syntax:
SORT CASES BY participant time. CASESTOVARS /ID=participant /INDEX=time /DROP=condition. GLM phq9.before phq9.after BY group /WSFACTOR=time 2 Polynomial /METHOD=SSTYPE(3) /EMMEANS=TABLES(group*time) COMPARE(time) ADJ(BONFERRONI) /PRINT=DESCRIPTIVE ETASQ HOMOGENEITY /CRITERIA=ALPHA(.05) /WSDESIGN=time /DESIGN=group.
Reading the Output
Read the tables in this order: the four cell Means in Descriptive Statistics, then the time * group row of Tests of Within-Subjects Effects (F and Sig.), then the simple effects in Pairwise Comparisons. The time main effect is the time row of Tests of Within-Subjects Effects; the group main effect is in Tests of Between-Subjects Effects.
SPSS doesn't print generalized η², so compute it from the two tables: the interaction's sum of squares over itself plus both Error rows, 67.500 ÷ (67.500 + 2187.000 + 727.000) = .023. The Partial Eta Squared column (.085 for the interaction) leaves out the between-subjects Error; if you report it, label it as partial.
Tests of Within-Subjects Effects (Measure: phq9)
| Source | Type III Sum of Squares | df | Mean Square | F | Sig. | Partial Eta Squared | |
|---|---|---|---|---|---|---|---|
| time | Sphericity Assumed | 367.500 | 1 | 367.500 | 29.319 | <.001 | .336 |
| Greenhouse-Geisser | 367.500 | 1.000 | 367.500 | 29.319 | <.001 | .336 | |
| time * group | Sphericity Assumed | 67.500 | 1 | 67.500 | 5.385 | .024 | .085 |
| Greenhouse-Geisser | 67.500 | 1.000 | 67.500 | 5.385 | .024 | .085 | |
| Error(time) | Sphericity Assumed | 727.000 | 58 | 12.534 | |||
| Greenhouse-Geisser | 727.000 | 58.000 | 12.534 |
SPSS also prints Huynh-Feldt and Lower-bound rows. With two time points all four rows are identical, because ε = 1; Mauchly's Test of Sphericity has 0 df for the same reason, so it prints W = 1.000 and no p-value.
Tests of Between-Subjects Effects (Measure: phq9)
| Source | Type III Sum of Squares | df | Mean Square | F | Sig. | Partial Eta Squared |
|---|---|---|---|---|---|---|
| Intercept | 21067.500 | 1 | 21067.500 | 558.717 | <.001 | .906 |
| group | 67.500 | 1 | 67.500 | 1.790 | .186 | .030 |
| Error | 2187.000 | 58 | 37.707 |
Pairwise Comparisons (time within each group; after − before)
| group | Mean Difference | Std. Error | Sig. | 95% CI Lower | Upper |
|---|---|---|---|---|---|
| cbt | −5.000* | .914 | <.001 | −6.830 | −3.170 |
| waitlist | −2.000* | .914 | .033 | −3.830 | −.170 |
These simple effects use the pooled error term, so their standard errors are the same and their df are 58; separate paired t-tests in each group (as on this page) give p = .037 for the waitlist. With only one comparison per group, Bonferroni changes nothing here, because SPSS adjusts within each group, not across the two; Post Hoc Tests adjusts across both groups. SPSS also prints Box's M and Levene's tests; read them as descriptions, not gatekeepers.
Output laid out from this page's computed results, not captured from a live run; labels and layout may differ slightly in your version.
R
library(afex)
cbt <- read.csv("data.csv")
cbt$group <- factor(cbt$group, levels = c("cbt", "waitlist"))
cbt$time <- factor(cbt$time, levels = c("before", "after"))
fit <- aov_ez(id = "participant", dv = "phq9", data = cbt,
between = "group", within = "time", anova_table = list(es = c("ges", "pes")))
fit
# The interaction as a t-test on change scores
wide <- reshape(cbt[, c("participant", "group", "time", "phq9")],
idvar = c("participant", "group"), timevar = "time", direction = "wide")
wide$change <- wide$phq9.after - wide$phq9.before
t.test(change ~ group, data = wide, var.equal = TRUE)
Anova Table (Type 3 tests)
Response: phq9
Effect df MSE F ges pes p.value
1 group 1, 58 37.71 1.79 .023 .030 .186
2 time 1, 58 12.53 29.32 *** .112 .336 <.001
3 group:time 1, 58 12.53 5.39 * .023 .085 .024
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Two Sample t-test
data: change by group
t = -2.3206, df = 58, p-value = 0.02385
alternative hypothesis: true difference in means between group cbt and group waitlist is not equal to 0
95 percent confidence interval:
-5.5877681 -0.4122319
sample estimates:
mean in group cbt mean in group waitlist
-5 -2
group:time is the interaction; ges is generalized η² and pes partial η². The t-test on change scores gives the same p, and −2.32² = 5.39. Base R's aov(phq9 ~ group * time + Error(factor(participant)/time), data = cbt) gives the same F tests, split into two strata.
Output from a real run: R 4.6.1 (afex 1.5.1), run 2026-10-03; package messages trimmed.
Python
import pandas as pd
import pingouin as pg
cbt = pd.read_csv("data.csv")
print(pg.mixed_anova(data=cbt, dv="phq9", within="time", between="group",
subject="participant", effsize="ng2").round(4))
# Simple effects: before vs after within each group, Holm-corrected
simple = pg.pairwise_tests(data=cbt, dv="phq9", within="time", between="group",
subject="participant", padjust="holm", within_first=False)
print(simple[["Contrast", "group", "A", "B", "T", "dof", "p-unc", "p-corr"]].round(4))
Source SS DF1 DF2 MS F p-unc ng2 eps
0 group 67.5 1 58 67.5 1.7901 0.1861 0.0226 NaN
1 time 367.5 1 58 367.5 29.3191 0.0000 0.1120 1.0
2 Interaction 67.5 1 58 67.5 5.3851 0.0238 0.0226 NaN
Contrast group A B T dof p-unc p-corr
0 group - cbt waitlist -1.3380 58.0 0.1861 NaN
1 time - after before -5.2241 59.0 0.0000 NaN
2 group * time cbt after before -5.4659 29.0 0.0000 0.0000
3 group * time waitlist after before -2.1894 29.0 0.0368 0.0368
Interaction is the time × group row. ng2 is generalized η² (effsize="np2" gives partial η², .0850 for the interaction), and eps = 1.0 confirms sphericity can't be violated with two time points. The time effect's p rounds to 0.0000; it's about .0000012. In the second table, the last two rows are the simple effects of time, paired t-tests within each group; ignore the first two, which are t-test versions of the main effects.
Output from a real run: Python 3.9.6 (pingouin 0.5.5, pandas 2.3.3), run 2026-10-03.
Impact
Effect Size
Generalized eta squared (η²G) expresses an effect as a share of all the variation a between-subjects study of the same effect would also contain: the effect's sum of squares out of itself plus every error term in the design. For the interaction, that means the stable differences between people as well as the noise in how their scores changed. Because it counts variation the same way whatever the design, it can be compared across between-subjects, within-subjects and mixed designs (Olejnik & Algina, 2003; Bakeman, 2005).
Set against the differences between people and the noise in their changes, the extra change with CBT is about 2% of the variation, a small effect by convention.
That formula assumes every factor was manipulated, as here: people were randomly assigned to a group, and the researchers chose the time points. If the between-subjects factor were measured instead, such as age group or diagnosis, its sum of squares would also go in the denominator (Olejnik & Algina, 2003).
SPSS prints partial eta squared instead, which leaves out the differences between people: 67.5 ÷ (67.5 + 727) = .08. It's the number power analyses ask for, but it runs much larger in designs with repeated measures than the same difference would give between separate groups, so it can't be held against Cohen's benchmarks or compared with between-subjects studies. If you report it too, label it. Even η²G should be compared with Cohen's benchmarks only as a last resort (Lakens, 2013); similar studies are the better yardstick.
The clearest size is in points. CBT lowered PHQ-9 scores 3.00 points more than waiting, 95% CI [0.41, 5.59] points. That's 0.60 of the pooled standard deviation of people's changes (5.01 points), or 0.61 of the standard deviation of the before scores (4.91 points); say which one you divide by. Whether 3 points matters is a clinical question, which the statistics can't settle (see Limitations).
Benchmarks Generalized Eta Squared at a Glance
Statistical Significance
A mixed ANOVA gives three p-values, one per effect, and each answers its own narrow question. For the interaction: if both groups really changed by the same amount on average, how often would an interaction F at least this large turn up? Below the conventional α = .05, the result is called statistically significant.
If online CBT helped no more than waiting, an interaction F of 5.39 or more would turn up about 2.4% of the time, roughly 1 in 42, under the test's assumptions. F measures the 3-point gap between the groups' changes relative to how much people's changes varied. That's below .05, so it's significant.
The other two p-values answer questions nobody asked here. Time's p < .001 says scores fell overall, waitlist included; the group effect's p = .186 says the groups' averages across both times weren't reliably different. With two time points, the interaction p is exactly the p from an independent-samples t-test on the change scores (Dimitrov & Rumrill, 2003). An ANCOVA on the after scores, adjusting for the before scores, is a separate analysis of the same treatment question. It estimates the groups' difference in after scores adjusted for baseline, not their difference in change, and is often more efficient when baseline predicts follow-up (Vickers & Altman, 2001). For our data it gives −3.00 points, 95% CI [−5.31, −0.69], p = .012; the estimate matches only because both groups started at 15, and with any baseline imbalance the two differ. Pick one in a prespecified plan. ANCOVA's advantage needs random assignment. With groups that already existed, such as age groups, the two analyses ask different questions and can disagree (Lord's paradox), so choose the one that matches your question, not the one with the smaller p.
p is not the probability that the null hypothesis is true, and it says nothing about how large the difference in change is. That's what the difference in points, its interval and generalized η² are for.
Benchmarks p at a Glance
Strength of evidence against the null hypothesis.
Power and Sample Size
Power is the chance that a study detects an effect that's really there. A real effect doesn't guarantee a significant result: with too few people, it can easily come out non-significant. For the interaction, power depends on how big the difference in change is, how many people are in each group, α, and how strongly people's before and after scores are correlated: the higher that correlation, the less people's changes vary, and the easier a difference in change is to detect.
With two groups and two time points, the interaction test is exactly an independent-samples t-test on the change scores (its F is that t squared), so the calculator below is the two-sample t calculation. The d it asks for is a d for change scores: the difference in average change between the groups divided by the standard deviation of people's changes, not by the SD of the scores themselves. The n is people per group.
Suppose, before collecting any data, we expected CBT to lower scores by 3 points more than waiting, and people's changes to vary with an SD of about 5 points, so d = 3 ÷ 5 = 0.6. With 45 people per group, 90 in all, the study would come out significant about 80% of the time. With our 30 per group, it's about 63%: a study this size would miss an effect this big more than a third of the time.
The calculator covers only this two-group, two-time case, where it's exact. With three or more time points or groups, power also depends on the correlations among all the measurements and on sphericity. G*Power's “repeated measures, within-between interaction” test plans for that from a guess at the average correlation and at ε, the sphericity correction (Faul et al., 2007); a simulation from the variances and correlations you expect is more exact.
Researchers usually aim for at least 80% power. Plan it before collecting data, using the smallest effect that would matter. Try it:
Other Info
Follow-Up and Post Hoc Tests
Planned Contrasts
- Planned Contrasts: With two groups and two times, the interaction is already a single planned contrast: the difference in change. With more groups or time points, plan the specific difference-in-change comparisons before collecting data, and test those instead of relying on the omnibus interaction.
Post Hoc Tests
- Simple Effects Analysis: Use after a significant interaction, to describe what happened in each group. In the online-CBT study, the CBT group improved by 5.00 points, t(29) = −5.47, p < .001, and the waitlist by 2.00, t(29) = −2.19, p = .037 (Holm-adjusted: p < .001 and p = .037). Both improved; the interaction says the CBT group improved more.
- Holm Correction: Use to correct a set of simple effects, here the two groups' changes. It never does worse than Bonferroni.
- Bonferroni Correction: Works too, but it's conservative: it would put the waitlist's change at p = .074, where Holm gives .037.
References
- Huck, S. W., & McLean, R. A. (1975). Using a repeated measures ANOVA to analyze the data from a pretest-posttest design: A potentially confusing task. Psychological Bulletin, 82(4), 511–518. https://doi.org/10.1037/h0076767
-
Dimitrov, D. M., & Rumrill, P. D., Jr. (2003). Pretest-posttest designs and measurement of change. Work, 20(2), 159–165.
https://doi.org/10.3233/WOR-2003-00285
“the F statistic for the interaction between the treatment factor and the pretest-posttest factor is identical to the F statistic for the treatment main effect with a one-way ANOVA on gain scores” (p. 162)
-
Vickers, A. J., & Altman, D. G. (2001). Analysing controlled trials with baseline and follow up measurements. BMJ, 323(7321), 1123–1124.
https://doi.org/10.1136/bmj.323.7321.1123
“An additional advantage of analysis of covariance is that it generally has greater statistical power to detect a treatment effect than the other methods.” (p. 1123–1124)
-
Blanca, M. J., Alarcón, R., Bono, R., Arnau, J., García-Castro, F. J., & Vallejo, G. (2026). Guidance for data analysis in split-plot designs when parametric assumptions are violated: F-statistic, adjusted F-tests, and bootstrap-F. Frontiers in Psychology, 17, 1787528.
https://doi.org/10.3389/fpsyg.2026.1787528
“With balanced designs, the results show that for the group effect the F-statistic and B-F are valid choices under assumption violations.” (Abstract)
-
Kroenke, K., Spitzer, R. L., & Williams, J. B. W. (2001). The PHQ-9: Validity of a brief depression severity measure. Journal of General Internal Medicine, 16(9), 606–613.
https://doi.org/10.1046/j.1525-1497.2001.016009606.x
“PHQ-9 scores of 5, 10, 15, and 20 represented mild, moderate, moderately severe, and severe depression, respectively.” (Abstract, Results)
-
Olejnik, S., & Algina, J. (2003). Generalized eta and omega squared statistics: Measures of effect size for some common research designs. Psychological Methods, 8(4), 434–447.
https://doi.org/10.1037/1082-989X.8.4.434
“Because research-design features can have a large effect on the estimated proportion of explained variance, the use of partial eta or omega squared can be misleading.” (Abstract)
“generalized eta and omega squared statistics, which provide estimates of effect size that are comparable across a variety of research designs” (Abstract)
-
Bakeman, R. (2005). Recommended effect size statistics for repeated measures designs. Behavior Research Methods, 37(3), 379–384.
https://doi.org/10.3758/BF03192707
“it provides comparability across between-subjects and within-subjects designs” (Abstract)
-
Lakens, D. (2013). Calculating and reporting effect sizes to facilitate cumulative science: A practical primer for t-tests and ANOVAs. Frontiers in Psychology, 4, 863.
https://doi.org/10.3389/fpsyg.2013.00863
“Although η2G can be compared against the benchmarks provided by Cohen (1988), this should only be done as a last resort” (Eta-squared in between and within-subjects comparisons)
“using these benchmarks when interpreting the η2p effect size in designs that include covariates or repeated measures is not consistent with the considerations upon which the benchmarks were based” (Eta-squared in between and within-subjects comparisons)
- Maxwell, S. E., Delaney, H. D., & Kelley, K. (2018). Designing experiments and analyzing data: A model comparison perspective (3rd ed.). Routledge. https://doi.org/10.4324/9781315642956
- Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6(2), 65–70. https://www.jstor.org/stable/4615733
- Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.
-
Faul, F., Erdfelder, E., Lang, A.-G., & Buchner, A. (2007). G*Power 3: A flexible statistical power analysis program for the social, behavioral, and biomedical sciences. Behavior Research Methods, 39(2), 175–191.
https://doi.org/10.3758/BF03193146
“the noncentrality parameter and the degrees of freedom of the F distribution can be multiplied by a correction factor ε” (p. 181)
- Rosnow, R. L., & Rosenthal, R. (1989). Definition and interpretation of interaction effects. Psychological Bulletin, 105(1), 143–146. https://doi.org/10.1037/0033-2909.105.1.143
-
Gelman, A., & Stern, H. (2006). The difference between “significant” and “not significant” is not itself statistically significant. The American Statistician, 60(4), 328–331.
https://doi.org/10.1198/000313006X152649
“In making a comparison between two treatments, one should look at the statistical significance of the difference rather than the difference between their significance levels.” (p. 329)
-
Nieuwenhuis, S., Forstmann, B. U., & Wagenmakers, E.-J. (2011). Erroneous analyses of interactions in neuroscience: A problem of significance. Nature Neuroscience, 14(9), 1105–1107.
https://doi.org/10.1038/nn.2886
“In theory, a comparison of two experimental effects requires a statistical test on their difference.” (Abstract, p. 1105)
- Cohen, J. (1973). Eta-squared and partial eta-squared in fixed factor ANOVA designs. Educational and Psychological Measurement, 33(1), 107–112. https://doi.org/10.1177/001316447303300111
- Pierce, C. A., Block, R. A., & Aguinis, H. (2004). Cautionary note on reporting eta-squared values from multifactor ANOVA designs. Educational and Psychological Measurement, 64(6), 916–924. https://doi.org/10.1177/0013164404264848
-
Muff, S., Nilsen, E. B., O'Hara, R. B., & Nater, C. R. (2022). Rewriting results sections in the language of evidence. Trends in Ecology & Evolution, 37(3), 203–210.
https://doi.org/10.1016/j.tree.2021.10.009
“we suggest language of evidence that allows for a more nuanced approach to communicate scientific findings as a simple and intuitive alternative to statistical significance testing” (Abstract)
-
Blanca, M. J., Arnau, J., García-Castro, F. J., Alarcón, R., & Bono, R. (2023). Repeated measures ANOVA and adjusted F-tests when sphericity is violated: Which procedure is best? Frontiers in Psychology, 14, 1192453.
https://doi.org/10.3389/fpsyg.2023.1192453
“the F-statistic becomes more liberal as sphericity violation increases, whereas both F-HF and F-GG control Type I error” (Abstract)
Spot an error? Something still confusing? Tell us at support@statsforpsychology.com.