- Learn
- Mathematics
- Statistics
- Intermediate Statistics – Regression and ANOVA
- Repeated-Measures ANOVA
Repeated-Measures ANOVA: Within-Subject and Mixed Designs
IntermediateLesson 6 of 10 in Intermediate Statistics – Regression and ANOVA Course
What you will learn
- Recognize when the same people provide every score, explain what repeated measurement gains and costs, and protect a design against order and carryover effects.
- Tell within-subject designs from between-subject designsIdentify repeated measures in a study, explain why each person acts as their own control, and lay out repeated-measures data for analysis.
- Control order and carryover effectsSpot practice, fatigue and carryover effects, and use counterbalancing, randomization or a control group so that they do not bias the condition means.
- Tell within-subject designs from between-subject designs
- Split the variability of repeated scores into its parts, test whether the condition means differ, read software output, and find out which conditions differ.
- Partition the variability in repeated scoresSeparate the variability between people from the variability within people, compute the sums of squares and degrees of freedom, and build the F ratio.
- Run the test, check its assumptions and read the outputSet up a repeated-measures ANOVA in software, check its assumptions, handle incomplete data, and connect the test with the paired t-test.
- Find out which conditions differFollow up a significant effect with planned contrasts, trend analysis or corrected pairwise comparisons, and choose the right error term.
- Partition the variability in repeated scores
- Explain the sphericity assumption, judge how far data depart from it, and report a corrected F test that keeps the Type I error rate near its nominal level.
- Explain the sphericity assumptionDefine sphericity through the variances of difference scores, compute those variances, and explain why a violation makes the F test too liberal.
- Test and estimate departures from sphericityRead Mauchly's test with its limits in mind, and use the Greenhouse-Geisser, Huynh-Feldt and lower-bound estimates of epsilon to judge how severe a violation is.
- Correct the F test and report itApply a sphericity correction to the degrees of freedom, choose between the corrections, and report the corrected result in APA style.
- Explain the sphericity assumption
- Extend repeated-measures ANOVA to two within-subject factors and to mixed designs that combine independent groups with repeated measurements, and interpret their interactions.
- Analyze two within-subject factorsSet up a fully within-subject factorial design, test its main effects and interaction against their own error terms, and follow up an interaction.
- Set up and test a mixed between-within designRecognize a mixed design, identify its effects and error terms, and compute its F tests from the partition of the sums of squares.
- Interpret and follow up a mixed-design interactionDescribe a group × time interaction from cell means and a plot, test simple effects with a suitable correction, and report the findings.
- Check the assumptions of a mixed designCheck sphericity, equal variances and equal covariance matrices in a mixed design, apply the right correction, and know which checks matter most.
- Analyze two within-subject factors
- Choose and compute effect sizes that suit repeated-measures and mixed designs, for whole effects and for pairs of conditions, and write a complete report.
- Choose an effect size for a repeated-measures effectCompute eta squared, partial eta squared and generalized eta squared from an ANOVA table, and explain why they differ in within-subject designs.
- Measure differences between two conditions and report the full analysisCompute standardized mean differences for paired conditions, give confidence intervals and suitable error bars, and write a complete APA-style report.
- Choose an effect size for a repeated-measures effect
Repeated-Measures ANOVA study guide
1Plan and recognize within-subject designs
Repeated scores carry information about both the conditions and the people who supplied them. A useful design keeps those two sources separate from the start. Learn to recognize the independent units, preserve their identities in the data, and decide whether every person can reasonably complete every condition. Then choose an order plan that keeps practice, fatigue, and carryover from being confused with the effect you want to study.
1.1 Recognize the repeated observations
Recognize the repeated observations
In a within-subject design (also called a repeated-measures design), every participant is measured under every level of a factor. Examples: the same 20 people tested in three noise conditions, or the same patients measured before treatment, after 6 weeks and after 12 weeks. A factor whose levels are all given to each participant is a within-subject factor; a factor whose levels split participants into separate groups is a between-subject factor.
Scores from the same person are related (dependent): someone who recalls many words in one condition tends to recall many in the others too. The same dependence arises when matched sets of people (for example, pairs matched on a pretest score) each receive all the conditions, and these matched sets are then analyzed like single participants.
Common repeated-measures situations are measurements over time (pretest, posttest, follow-up), experiments in which everyone completes all conditions, and studies in which the same raters judge several stimuli. The outcome is a quantitative score measured on the same scale at every level.
Compare the same people
The main gain is control of individual differences. In a between-subject design, stable differences between people (ability, motivation, baseline level) end up in the error term. In a within-subject design, each person serves as their own control, so the analysis can set aside the variability between people. The error term shrinks and the test gains power.
Worked example. Six participants each learn three lists of 20 words, one list in silence, one with instrumental music and one with background speech, and recall the words. Their recall scores (silence, music, speech) are: P1 14, 13, 10; P2 12, 12, 9; P3 16, 14, 12; P4 10, 9, 8; P5 15, 15, 11; P6 11, 9, 7. The condition means are 13.0, 12.0 and 9.5. The participants' own means range from 9.0 to 14.0, so people differ a lot in overall memory.
What the analysis gains
Analyzed correctly as repeated measures, the recall data give , . If the same 18 scores had come from 18 different people and were analyzed as three independent groups, the result would be , . The condition means are identical in both analyses; the repeated-measures test is far stronger because 73.17 of the total sum of squares of 116.5 is variability between people, which it removes from the error.
Choose a workable design
Costs of a within-subject design: order effects (practice, fatigue, boredom), carryover from one condition to the next, participants guessing the hypothesis after seeing all conditions, and dropout in long studies. Some manipulations cannot be undone, such as learning a strategy or receiving a one-time surgery; such a factor has to be a between-subject factor.
Keep the participant ID
Point-and-click programs (SPSS, JASP, jamovi) expect wide format for repeated-measures ANOVA: one row per participant and one column per level, here columns silence, music and speech. Many R functions, for example aov_ez() and aov_car() from the afex package, expect long format: one row per observation, with columns for participant ID, condition and score. Reshaping between the formats must keep the participant ID, because it tells the analysis which scores belong together.
A common mistake is analyzing repeated measures with a between-subject ANOVA or an independent-samples -test. That treats related scores as independent, which violates the independence assumption and usually wastes power. A related mistake is counting observations as participants: 6 people in 3 conditions give 18 scores but only 6 independent units, and the error degrees of freedom are , not .
Key Takeaways
- A within-subject factor gives every participant every level
- A between-subject factor puts different people in different levels
- Repeated scores are dependent: a person with a high baseline often remains high across conditions
- Keeping that link lets ANOVA set aside stable differences between people, shrinking the error and improving power.
1.2 Separate sequence from condition
Separate sequence from condition
Order effects arise because participants meet the conditions in a sequence. Practice effects raise scores as people get used to the task; fatigue or boredom effects lower them. If every participant did silence first and speech last, a fatigue effect would look like an effect of speech: order would be confounded with condition.
Carryover effects occur when one condition changes how a person responds in a later condition: a drug that is still active, a strategy learned in the first task, or a mood induced by an earlier film. Carryover can be asymmetric, for example A affects B strongly while B hardly affects A; counterbalancing does not cancel asymmetric carryover.
Plan the orders
Counterbalancing varies the order across participants so that each condition appears equally often in each position. Complete counterbalancing uses every possible order: orders for conditions, so 6 orders for 3 conditions, 24 for 4 and 120 for 5. The number of participants should then be a multiple of the number of orders, for example 12 or 18 participants for the 6 orders of 3 conditions.
A Latin square uses orders in which each condition appears exactly once in each position. For conditions A, B and C: ABC, BCA, CAB. A balanced Latin square (for an even number of conditions) also lets each condition immediately precede every other condition exactly once, which balances simple carryover from one condition to the next. For four conditions: ABDC, BCAD, CDBA, DACB.
Reduce carryover in practice
Randomizing the order separately for each participant balances order effects on average and works well with larger samples. Practical remedies add to this: practice trials before measurement starts, rest breaks, a washout period between drug conditions, and parallel materials (for example, three equally difficult word lists) with the pairing of list and condition also counterbalanced.
When time is the factor
When the within-subject factor is time (pretest, posttest, follow-up), the order cannot be counterbalanced, because the sequence is the variable studied. Change over time can then come from the intervention, from retesting, from natural development or from outside events. Adding a control group that is measured on the same occasions, which makes the study a mixed design, separates the intervention effect from these other sources of change.
Counterbalancing balances order effects across conditions; it does not remove them. They no longer bias the condition means, but they add variability to the scores. Entering the order group as a between-subject factor shows whether order effects are present and whether they interact with the conditions.
A common mistake is assuming that counterbalancing fixes any order problem. When carryover is strong or asymmetric, or when a condition cannot be undone, a between-subject design is the better choice even though it needs more participants.
Key Takeaways
- Order effects arise from position in the sequence; carryover arises when an earlier condition changes a later response
- If everyone gets the same order, fatigue can become confounded with condition
- Complete counterbalancing assigns all possible orders; three conditions need six orders
- A Latin square uses fewer orders while placing every condition once in every position
2Run and interpret a one-way repeated-measures ANOVA
The repeated-measures F test compares systematic changes across conditions with the ways individual people depart from that pattern. Building the ANOVA table makes its error term easier to understand. Read the output alongside the data layout and assumption checks, then use contrasts or adjusted paired comparisons to answer more specific questions. A significant overall test starts that investigation; it does not identify the differing pairs.
2.1 State the hypothesis
State the hypothesis
A one-way repeated-measures ANOVA tests , the hypothesis that the population means of all conditions are equal, against the alternative that at least one population mean differs. Here is the number of participants, each measured once in each of the conditions.
Split the sums of squares
The total sum of squares adds the squared deviations of all scores from the grand mean, with . It splits into the between-subjects sum of squares with , which measures how much the people's own means differ, and the within-subject sum of squares with , which measures how much each person's scores vary around that person's mean.
The within-subject part splits again. The model (condition) sum of squares is with . The residual is with . The residual is the condition-by-participant interaction: it measures how inconsistently people react to the conditions.
Build the F ratio
The test statistic is , where each mean square is a sum of squares divided by its degrees of freedom. appears in neither mean square: the design sets the variability between people aside. In a one-way between-subject ANOVA of the same scores, the error would be , which is why the repeated-measures F is usually larger.
Another way to see the same model: a one-way repeated-measures ANOVA is a two-way ANOVA with condition and participant as factors and one score per cell. Participant is treated as a random factor, and because each cell holds a single score, the condition-by-participant interaction serves as the error term.
Work through the recall data
Worked example with the recall data (silence, music, speech; six participants). The grand mean is 11.5 and the condition means are 13.0, 12.0 and 9.5, so . The total sum of squares is . The person means are 12.33, 11.00, 14.00, 9.00, 13.67 and 9.00, so . Then and .
Continuing the example: , , and . Then , and . The critical value of at is 4.10, and : recall differs across the noise conditions.
Read the residual correctly
The residual is small when people respond to the conditions in a consistent way. If every participant had dropped by exactly the same amount from one condition to the next, would be 0. Large differences in overall level between people do not enlarge the residual; they belong to .
Errors to avoid include using (the between-subject error df) instead of for the error; and treating as explained by the conditions. In SPSS output, the between-person variability appears as the Error row of the Tests of Between-Subjects Effects table, next to the Intercept, which tests whether the grand mean differs from 0 and is usually of no interest.
Key Takeaways
- The null hypothesis says all population condition means are equal
- Total variability splits into between-person and within-person parts:
- The within-person part splits into condition and residual parts:
- The residual represents differences in how people respond to the conditions.
2.2 Check the model
Check the model
Assumptions of repeated-measures ANOVA: (1) scores from different participants are independent; (2) the outcome is quantitative (interval or ratio); (3) the relevant within-person difference scores are approximately normally distributed, and the test is fairly robust to mild departures in moderate samples; (4) sphericity, the equal variance of the differences between every pair of levels.
Connect two levels to a paired test
With two levels, a repeated-measures ANOVA and a paired -test are the same test: and the -values are identical. For silence versus speech in the recall data, and . With two levels there is only one set of difference scores, so sphericity holds automatically.
Read the software tables
In SPSS, Analyze > General Linear Model > Repeated Measures asks for a name and the number of levels of the within-subject factor, then for the column that belongs to each level. The output includes Mauchly's Test of Sphericity, Tests of Within-Subjects Effects (with rows Sphericity Assumed, Greenhouse-Geisser, Huynh-Feldt and Lower-bound), and Tests of Between-Subjects Effects. JASP and jamovi have a Repeated Measures ANOVA analysis in which the factor levels are named and the columns are dragged into the matching cells. In every row of the within-subjects table the F value is the same; only the degrees of freedom and the -value change with the sphericity correction. For the recall data, the Sphericity Assumed row shows , .
In R, aov_ez(id = "id", dv = "recall", data = d, within = "noise") from the afex package fits the model to long-format data; by default afex reports Greenhouse-Geisser corrected degrees of freedom and generalized eta squared. jamovi reports no sphericity correction unless one is selected under Assumption Checks. Knowing these defaults matters when comparing output from different programs.
Account for missing observations
Standard repeated-measures ANOVA needs a score at every level for every participant. A participant with one missing score is dropped entirely (listwise deletion). If one of the six recall participants had missed the music condition, the analysis would use and error . Multilevel (mixed-effects) models can use incomplete records, which is one reason researchers analyze longitudinal data with them.
When the difference scores are clearly nonnormal in a small sample, or the outcome is ordinal (ranks or a single rating item), the Friedman test is the rank-based alternative for one within-subject factor.
A significant omnibus F shows that the condition means are not all equal; it does not show which conditions differ. Follow-up contrasts or corrected pairwise comparisons answer that question.
Key Takeaways
- Repeated-measures ANOVA requires independent participants, a quantitative outcome, approximately normal difference scores or residual contrasts, and sphericity
- Inspect the data and diagnostic plots alongside the test output
- With two levels, sphericity holds automatically and for the paired test.
2.3 Ask a focused question
Ask a focused question
A planned contrast tests a specific prediction made before seeing the data. It weights the condition means with coefficients that sum to 0. For example, the weights compare the average of silence and music with speech.
When the levels are ordered and equally spaced (time points, doses), polynomial contrasts test trends. With three levels, the linear weights are and the quadratic weights are . For mean anxiety scores of 29.0, 22.5 and 22.5 at pretest, posttest and follow-up, the linear contrast is (an overall decline) and the quadratic contrast is (the decline levels off after the posttest).
Compare pairs
Post hoc pairwise comparisons test every pair of levels, pairs: 3 for three levels, 6 for four. For a within-subject factor they are paired -tests, each on its own difference scores, with a correction for multiple testing.
Control the testing family
The Bonferroni correction multiplies each -value by the number of comparisons (capped at 1). The Holm procedure orders the -values from smallest to largest, multiplies the smallest by , the next by , and so on, and stops declaring significance at the first adjusted value above . To report Holm-adjusted -values, go through the multiplied values in sorted order, replace each by the largest value met so far so that they never decrease, cap them at 1, and return them to their original comparisons. Holm rejects every hypothesis that Bonferroni rejects and sometimes more, while still controlling the familywise error rate.
Work through adjusted results
Worked example with the recall data. Silence minus music: mean difference 1.0, , . Silence minus speech: 3.5, , . Music minus speech: 2.5, , . Bonferroni-adjusted -values are .123, < .001 and .006. Holm-adjusted -values are < .001 (silence–speech), .004 (music–speech) and .041 (silence–music).
Interpretation: background speech lowers recall compared with both silence and instrumental music. Whether silence and music differ depends on the correction: the difference is significant at .05 with Holm and not with Bonferroni. The correction method should be chosen before the analysis and named in the report.
Use a suitable error term
Paired -tests use a separate error term for each pair, so they stay valid when sphericity is violated. Comparisons that use the pooled from the ANOVA, as Tukey's test does in between-subject designs, assume sphericity and can be misleading when it fails. In SPSS's repeated-measures dialog, the Post Hoc button covers between-subject factors only; pairwise comparisons for a within-subject factor are requested under EM Means (Compare main effects) with a Bonferroni or Šidák adjustment.
Errors to avoid include running all pairwise tests uncorrected after a significant F, so the chance of at least one false positive rises above .05 (for three independent tests at .05 it would be ); and reporting only the one pair that reached significance without the omnibus test and the other comparisons.
Key Takeaways
- A planned contrast tests a prediction with weights that sum to zero
- Weights compare the average of two conditions with a third
- Equally spaced ordered levels also support polynomial contrasts: tests a linear trend and tests curvature across three levels.
3Check sphericity and correct the F test
Sphericity concerns how much the differences between conditions vary from person to person. It is easy to mistake it for equal variances of the original scores, but the covariances matter too. Work from difference scores to Mauchly’s test and epsilon, then see exactly what a correction changes in an F test. The reporting decision needs a consistent rule, because choosing the most favorable output row changes the meaning of the analysis.
3.1 Start with difference scores
Start with difference scores
Sphericity means that the variances of the difference scores between every pair of levels are equal in the population. With three levels: .
Worked example. For the recall data, compute each participant's difference for every pair of conditions and take the variance of those differences: silence minus music 0.80, silence minus speech 0.70, music minus speech 1.10. These are similar, so the data are close to sphericity.
Include the covariance
The variance of a difference combines the two variances and their covariance: . For silence and speech, . Sphericity therefore depends on the covariances (or correlations) between levels as well as on the variances.
Distinguish compound symmetry
Compound symmetry means that all variances of the levels are equal and all covariances between levels are equal. Compound symmetry implies sphericity, but sphericity can hold without it: in the recall data the variances (5.6, 6.4 and 3.5) are unequal, yet the variances of the differences are similar. Sphericity is the weaker condition that the F test needs.
With two levels there is a single set of difference scores, so sphericity holds automatically. The same is true for any effect with one numerator degree of freedom, such as a 2 × 2 interaction of within-subject factors. Mauchly's test cannot be computed then; SPSS prints 0 degrees of freedom and no -value.
Understand the false-positive risk
When sphericity is violated, the F ratio no longer follows the F distribution with and degrees of freedom. The test becomes liberal: it rejects a true null hypothesis more often than the nominal 5%. Comparisons that use the pooled error term are affected too.
Violations are common in data collected over time, because measurements close together usually correlate more strongly than measurements far apart. Week 1 and week 2 scores might correlate at .90 while week 1 and week 12 scores correlate at .50, so the differences between distant occasions vary more.
A common mistake is confusing sphericity with homogeneity of variance. Equal variances of the raw scores at each level are not required for sphericity, and they do not guarantee it, because the covariances also count.
Key Takeaways
- Sphericity means equal population variances of every pairwise difference score
- With three conditions, compare the variability of A minus B, A minus C, and B minus C across participants
- The original conditions’ variances alone cannot establish this assumption because .
3.2 Read Mauchly’s test
Read Mauchly’s test
Mauchly's test has the null hypothesis that sphericity holds. Its statistic lies between 0 and 1, with 1 meaning perfect sphericity, and is converted to an approximate chi-square with degrees of freedom (2 for three levels, 5 for four). A -value below .05 is taken as evidence of a violation.
For the recall data, , , : no evidence against sphericity.
Interpret the evidence
Mauchly's test has low power in small samples, so it can miss real violations, and in large samples it flags departures too small to matter. It is also sensitive to nonnormality. For these reasons many methodologists judge sphericity by the size of epsilon, or apply a correction routinely, rather than letting Mauchly's -value decide.
Read epsilon as a severity measure
Epsilon () describes how far the data depart from sphericity. It equals 1 under perfect sphericity, and its smallest possible value, the lower bound, is , where is the effect's numerator df: 0.50 for three levels, 0.33 for four and 0.25 for five. The further epsilon falls below 1, the more serious the violation.
Compare the estimates
The Greenhouse-Geisser estimate tends to underestimate epsilon when the true value is near 1, which makes its correction conservative. The Huynh-Feldt estimate adjusts upward to reduce that bias; it can exceed 1 and is then set to 1 for the correction. The lower-bound correction assumes the worst possible violation and is very conservative.
For the recall data, , the Huynh-Feldt estimate is 1.45 and is therefore set to 1.00, and the lower bound is .50. In SPSS these values appear in the Mauchly's Test of Sphericity table; JASP and jamovi show them under Assumption Checks.
A common mistake is reading epsilon like a -value. Epsilon is not a probability; a small epsilon means a larger violation, and a value near 1 means the uncorrected test is close to accurate.
Key Takeaways
- Mauchly’s test tests the null hypothesis that sphericity holds
- A small p-value provides evidence of a violation
- A nonsignificant result in a small sample can reflect low power; in a large sample, a tiny departure can be detected
3.3 Correct both degrees of freedom
Correct both degrees of freedom
A sphericity correction multiplies both degrees of freedom by epsilon: and . The F value itself stays the same; the -value is read from the F distribution with these smaller, usually fractional, degrees of freedom, so it grows.
Calculate a correction
Worked example. A study with 20 participants and three conditions gives , uncorrected . With , the corrected degrees of freedom are and , and gives . The effect is still significant at .05, but the evidence is weaker than the uncorrected test suggested.
For the recall data, the Greenhouse-Geisser correction gives , , and the lower-bound correction gives , . With an epsilon this close to 1, the choice of correction does not change the conclusion.
Choose the rule in advance
A widely used guideline (Girden, 1992): when is above .75, use the Huynh-Feldt correction; when it is .75 or below, use Greenhouse-Geisser, because Huynh-Feldt then tends to overestimate epsilon. Some researchers and programs apply Greenhouse-Geisser in every analysis. The rule should be fixed before looking at which correction gives a significant result.
Recognize the multivariate alternative
SPSS also prints a Multivariate Tests table (Pillai's trace, Wilks' lambda and others). This multivariate approach treats the difference scores as several outcomes and does not assume sphericity. It requires more participants than the number of levels minus one and often has less power than a corrected F test in small samples.
Write the result
An APA-style report names the sphericity check, the correction and epsilon, and gives the corrected df to two decimals: "Mauchly's test indicated that the assumption of sphericity was violated, , , so Greenhouse-Geisser corrected degrees of freedom are reported (). Recall differed across the noise conditions, , , ."
Errors to avoid include dividing or adjusting the F value instead of the degrees of freedom; rounding corrected df to whole numbers; applying a correction to an effect with one numerator df, where epsilon is 1 by definition; and applying an epsilon correction to a between-subject effect, which does not involve sphericity.
Key Takeaways
- A sphericity correction multiplies both F-test df by epsilon
- It leaves F unchanged and obtains a new p-value from the corrected distribution
- For and , the corrected test is , with instead of .011
4Analyze factorial designs with repeated measures
Adding a second factor changes both the questions and the error terms. When everyone completes every combination, each within-subject effect has its own participant interaction as error. When independent groups are measured repeatedly, the group comparison and the repeated comparisons use different error strata. Cell means and interaction contrasts connect those tables to the research question, while simple effects show where an interaction occurs.
4.1 Map every cell
Map every cell
In a two-way repeated-measures (fully within-subject) design, every participant gives a score in every combination of the levels of two factors. A 2 × 3 design gives six scores per person.
Match each effect to its error
The design has three effects: the main effect of A, the main effect of B and the A × B interaction. Unlike a between-subject factorial ANOVA, each effect has its own error term: its interaction with participants (A × S, B × S and A × B × S). Each error term has the effect's df multiplied by degrees of freedom.
Read an interaction from means
Worked example. Twelve drivers in a simulator brake for sudden obstacles in four conditions: phone (none or hands-free call) by traffic (light or heavy). Mean braking reaction times are 520 ms (no phone, light), 560 ms (no phone, heavy), 600 ms (hands-free, light) and 700 ms (hands-free, heavy). Each of the three effects is tested with .
Reading the means: the phone main effect compares 540 ms (no phone) with 650 ms (hands-free); the traffic main effect compares 560 ms (light) with 630 ms (heavy). The interaction is a difference of differences: heavy traffic adds 40 ms without a phone and 100 ms with a hands-free call, so the interaction contrast is ms.
Check each effect separately
Sphericity applies separately to every within-subject effect with two or more numerator df, and each such effect gets its own epsilon. In a 2 × 3 within-subject design, the three-level factor and the interaction each have 2 df and need a sphericity check; the two-level factor has 1 df and does not.
Follow up the pattern
A significant interaction means that the effect of one factor depends on the level of the other. Follow it up with simple effects: for example, the effect of traffic tested separately without a phone and with a phone, by paired -tests or one-way repeated-measures ANOVAs within each level, with a correction for the number of tests.
In wide format each cell is one column (for example none_light, none_heavy, hf_light, hf_heavy). In SPSS, the order in which the columns are assigned must match the factor definition: the levels of the last-defined factor change fastest, so with phone defined first and traffic second the order is none_light, none_heavy, hf_light, hf_heavy.
Errors to avoid include using one pooled error term for all effects, as in a between-subject factorial ANOVA; mixing up the column-to-cell assignment so that conditions are mislabeled; and interpreting a main effect on its own when an interaction shows that the effect differs strongly, or even reverses, across the levels of the other factor.
Key Takeaways
- In a fully within-subject factorial design, everyone completes every cell
- A 2 × 3 design has six scores per person
- Test the two main effects and their interaction against separate participant interactions: A × S, B × S, and A × B × S
- Multiply each effect’s df by to obtain its error df.
4.2 Combine groups and repeated scores
Combine groups and repeated scores
A mixed design (also called a between-within or split-plot design) has at least one between-subject factor and at least one within-subject factor. The classic example is a pretest-posttest study: a treatment group and a control group, each measured at pretest, posttest and follow-up.
A design with one between factor (group, levels) and one within factor (time, levels) has three effects: the group main effect, the time main effect and the group × time interaction. In a randomized pretest-posttest study, the interaction answers the main question: did the groups change differently over time?
Use two error strata
The effects use two different error terms. The group effect is tested against variability between participants within groups (, , where is the total number of participants). The time effect and the interaction are tested against the time × participants-within-groups term (, ).
Build the mixed table
Worked example. Eight people with exam anxiety (scale 0–40) are randomly assigned to a 4-week relaxation training or to a waiting-list control and measured at pretest, posttest and follow-up. Training: 30, 23, 25; 28, 22, 20; 32, 24, 26; 26, 21, 19. Control: 29, 28, 30; 31, 27, 29; 27, 28, 25; 30, 29, 28. Cell means: training 29.0, 22.5, 22.5; control 29.25, 28.0, 28.0.
Partition for the example: splits into group 84.38, participants within groups 65.58, time 80.08, group × time 36.75 and time × participants within groups 21.17. The degrees of freedom are 1, 6, 2, 2 and 12 (total 23).
F tests for the example: group , ; time , ; group × time , . The significant interaction shows that the two groups changed differently.
Connect changes to the interaction
With exactly two occasions (pretest and posttest), the group × time F equals the square of an independent-samples -test on the change scores. Using only pretest and posttest of the example, the changes are −7, −6, −8, −5 (training) and −1, −4, 1, −1 (control), , and the interaction gives .
Errors to avoid include testing the change in each group separately and comparing the verdicts ("significant in the training group, not in the control group") instead of testing the interaction; and reading the group main effect as the intervention effect, although it averages over all occasions, including the pretest before any training.
Key Takeaways
- A mixed design combines independent groups with a repeated factor
- Its group main effect compares averages over occasions; its time main effect compares occasions averaged over groups
- The group × time interaction asks whether the groups’ changes differ.
4.3 Start with the cell means
Start with the cell means
Start from the table of cell means and a line plot with time on the horizontal axis and one line per group. Roughly parallel lines suggest no interaction; lines that diverge, converge or cross suggest one. The plot shows the pattern, and the interaction test shows whether it is larger than chance would produce.
In the anxiety example, both groups start near 29 at pretest. The training group drops 6.5 points by posttest and stays at 22.5 at follow-up, while the control group changes by about one point (29.25 to 28.0). Training reduced anxiety, and the reduction lasted until follow-up.
Test time within each group
Simple effects of time within each group are separate one-way repeated-measures ANOVAs, so each gets its own sphericity check and the two tests share a correction for multiple testing. Training group: , below .75, so the Greenhouse-Geisser test gives , , and Bonferroni adjustment for two tests gives . Control group: and the Huynh-Feldt estimate exceeds 1, so , stands (adjusted ). A separate error term per group avoids relying on equal covariance matrices across the groups, but it does not replace the sphericity check within each group.
Test groups at each occasion
Simple effects of group at each occasion: independent-samples -tests give pretest , ; posttest , ; follow-up , . With a Bonferroni correction for three tests, the follow-up difference () is no longer significant at .05, so the evidence of a lasting group difference is weaker than the posttest evidence.
Interpret the averaged effects
Main effects can mislead when an interaction is present. In the example, the time main effect is large mostly because of the training group, and the group main effect averages a pretest with no group difference and two later occasions with clear differences.
An APA-style report gives the design, the means and SDs per cell, the sphericity decision, every effect and the follow-ups, for example: "A 2 (group) × 3 (time) mixed ANOVA showed a group × time interaction, , , (Greenhouse-Geisser corrected, ). Simple effects of time, Bonferroni-adjusted for two tests, showed that anxiety fell in the training group, , (Greenhouse-Geisser), but not in the control group, , ."
A common mistake is concluding from a nonsignificant pretest difference that the groups were proven equal at the start. A nonsignificant test does not establish equality; random assignment is what makes the groups comparable, and the size of the pretest difference (here 0.25 points) is what to report.
Key Takeaways
- Read a group × time interaction from cell means and a plot before describing the tests
- Parallel population profiles mean no interaction; diverging, converging, or crossing sample profiles suggest a pattern to test
- A significant interaction supports different changes across groups.
4.4 Match checks to assumptions
Match checks to assumptions
A mixed ANOVA assumes independent participants, approximately normal residuals within the cells, sphericity for the within-subject effects, homogeneity of variance across groups at every occasion and homogeneity of covariance matrices: the variances and covariances of the repeated measures are the same in every group.
Correct the repeated effects
Sphericity in a mixed design is judged on the covariance matrix pooled across the groups, and it concerns only the time effect and the group × time interaction. The group effect is a between-subject test and gets no epsilon correction.
For the anxiety example, (the Huynh-Feldt estimate exceeds 1 and is set to 1). Following the .75 guideline, use Greenhouse-Geisser: time , ; group × time , . The corrected degrees of freedom come from the unrounded estimate, and .
Compare variances and covariances
Levene's test checks equal variances across groups separately at each occasion; SPSS prints one Levene test per measurement column (pretest, posttest, follow-up) when homogeneity tests are requested.
Box's M tests the equality of the covariance matrices across groups. It is very sensitive, especially with large samples or nonnormal data, so it is often judged at rather than .05. Unequal covariance matrices matter most when group sizes are unequal; with equal group sizes the F tests are fairly robust to them.
Judge the checks with the sample size
In the anxiety example the training group's variances (6.67, 1.67 and 12.33 at the three occasions) are larger than the control group's (2.92, 0.67 and 4.67). The equal group sizes (four and four) reduce the risk this poses, but with groups this small the tests have little power to detect such differences, so describing the variances alongside the tests is informative.
Errors to avoid include applying a sphericity correction to the between-subject effect; skipping the group-by-occasion variance check because sphericity looked fine; and treating a nonsignificant Box's M in a small sample as proof that the covariance matrices are equal.
Key Takeaways
- A mixed ANOVA requires independent participants, approximately normal residuals within cells, sphericity for repeated effects, and comparable variances and covariance matrices across groups
- Levene’s test checks group variances separately at each occasion
- Box’s M checks whole covariance matrices and is sensitive to nonnormality and large samples; .001 is a commonly used threshold.
5Measure and report effect sizes for repeated measures
An F test describes evidence against equal means; an effect size describes the size of the observed pattern using a stated denominator. Repeated measurements make that denominator especially important because stable differences between people can be excluded or retained. Compare the eta-squared measures, then standardize paired differences and add confidence intervals. A complete report keeps the original score scale visible alongside the standardized results.
5.1 Name the denominator
Name the denominator
Eta squared is . Partial eta squared is , where is the error term used to test that effect. In a repeated-measures design that error term excludes the variability between people, so can be very large.
For the recall data, . Partial eta squared can also be recovered from F and its degrees of freedom: .
Restore person variability
Generalized eta squared (, Olejnik and Algina, 2003; Bakeman, 2005) puts the variability between people back into the denominator: in a one-way design. For the recall data, ; in a one-way repeated-measures design it equals .
Why it matters: generalized eta squared is designed to be comparable between within-subject and between-subject studies of the same effect. Partial eta squared from a within-subject design is not comparable with one from a between-subject design, because it leaves the person-level variability out.
Extend generalized eta squared
In a mixed design with manipulated factors, . For the anxiety example: group , time .48 and group × time .30, against partial values of .56, .79 and .63.
When a between-subject factor is measured rather than manipulated (age group, gender), its variability also belongs in the denominator of . In R's afex package such factors are declared with the observed argument so the generalized value is computed correctly.
Label the software result
Software differs: SPSS reports partial eta squared (option Estimates of effect size); jamovi offers , and ; afex reports by default. Always label which measure is reported.
Errors to avoid include comparing an of .90 from a repeated-measures study with an of .30 from a between-subject study and concluding the first effect is three times stronger; reporting partial eta squared as plain ; and judging a within-subject against benchmarks such as .01, .06 and .14, which were proposed for between-subject .
Key Takeaways
- Eta squared divides effect SS by total SS
- Partial eta squared divides effect SS by effect SS plus that effect’s error SS
- In repeated measures, the latter excludes stable person differences and can be much larger
- In the recall data, partial eta squared is .
5.2 Standardize the paired difference
Standardize the paired difference
Cohen's divides the mean difference by the standard deviation of the difference scores: . For silence versus speech in the recall data, , which equals .
Cohen's divides the mean difference by the average of the two conditions' standard deviations, which ignores the correlation between them. For silence () versus speech (), .
Understand why the measures differ
The two values differ because shrinks as the correlation between conditions grows; here , so is much larger than . suits power analysis for a planned within-subject study; is closer to the of a between-subject comparison and suits comparisons across designs. A report states which version it uses.
Show uncertainty
A confidence interval for a paired mean difference uses the difference scores: . For silence minus speech, , giving a 95% CI of [2.62, 4.38] words.
Error bars computed separately for each condition include the variability between people. They can overlap heavily even when the within-subject difference is very reliable, as in the recall data. Within-subject confidence intervals (the Cousineau-Morey method) remove each person's overall level before computing the intervals; a figure caption states which kind of error bar is shown.
Report the full analysis
A complete report covers: the design (factors, levels, , counterbalancing); the means and SDs for every condition or cell; the sphericity check with the correction and epsilon; each F with its (corrected) df, and a labeled effect size; and the follow-up tests with their correction method and effect sizes.
Example report for the recall study: "Recall differed across noise conditions, , , , ; sphericity was not rejected, , , . Holm-corrected paired -tests showed lower recall with background speech (, ) than in silence (, ), , , , and than with instrumental music (, ), , , . Silence and music differed by one word, , , ."
APA style: statistical symbols are italic (, , , , ); values that cannot exceed 1, such as and , have no leading zero; exact -values are given to two or three decimals, with for smaller values; and corrected df are given to two decimals.
Key Takeaways
- For paired conditions, is the mean difference divided by the SD of the differences; equivalently,
- The measure divides by the arithmetic average of the two condition SDs
- In the recall example, the same 3.5-word difference gives and because the conditions are strongly correlated and their differences vary little.
Repeated-Measures ANOVA examples
1Plan and recognize within-subject designs
15 steps
- 1IntroductionFollow the same people
Repeated scores carry information about both the conditions and the people who supplied them. A useful design keeps those two sources separate from the start. Measuring everyone in every condition is a within-subject design; it controls differences between people. Learn to recognize the independent units, preserve their identities in the data, and decide whether every person can reasonably complete every condition. Then choose an order plan that keeps practice, fatigue, and carryover from being confused with the effect you want to study.
- 2ExampleRecognize the repeated observations
In a within-subject design (also called a repeated-measures design), every participant is measured under every level of a factor. Examples: the same 20 people tested in three noise conditions, or the same patients measured before treatment, after 6 weeks and after 12 weeks. A factor whose levels are all given to each participant is a within-subject factor; a factor whose levels split participants into separate groups is a between-subject factor.
- 3ExplanationCompare the same people
The main gain is control of individual differences. In a between-subject design, stable differences between people (ability, motivation, baseline level) end up in the error term. In a within-subject design, each person serves as their own control, so the analysis can set aside the variability between people. The error term shrinks and the test gains power.
- 4ExampleCompare the same people: read the next component
Worked example. Six participants each learn three lists of 20 words, one list in silence, one with instrumental music and one with background speech, and recall the words. Their recall scores (silence, music, speech) are: P1 14, 13, 10; P2 12, 12, 9; P3 16, 14, 12; P4 10, 9, 8; P5 15, 15, 11; P6 11, 9, 7. The condition means are 13.0, 12.0 and 9.5. The participants' own means range from 9.0 to 14.0, so people differ a lot in overall memory.
- 5ExampleWhat the analysis gains
Analyzed correctly as repeated measures, the recall data give , . If the same 18 scores had come from 18 different people and were analyzed as three independent groups, the result would be , . The condition means are identical in both analyses; the repeated-measures test is far stronger because 73.17 of the total sum of squares of 116.5 is variability between people, which it removes from the error.
- 6ExampleKeep the participant ID
Point-and-click programs (SPSS, JASP, jamovi) expect wide format for repeated-measures ANOVA: one row per participant and one column per level, here columns silence, music and speech. Many R functions, for example
aov_ez()andaov_car()from the afex package, expect long format: one row per observation, with columns for participant ID, condition and score. Reshaping between the formats must keep the participant ID, because it tells the analysis which scores belong together. - 7ChallengeTry it: tell within-subject designs from between-subject designs
Twelve people rate five interface designs. How many observations and independent participants are there?
---reveal---
There are 60 ratings and 12 independent participants. Each person supplies five dependent observations. Retain one ID per person in a long table, or one row per person in a wide table, so the analysis can separate stable person differences from responses to the designs.
- 8ExplanationSeparate sequence from condition
Order effects arise because participants meet the conditions in a sequence. Practice effects raise scores as people get used to the task; fatigue or boredom effects lower them. If every participant did silence first and speech last, a fatigue effect would look like an effect of speech: order would be confounded with condition.
- 9ExamplePlan the orders
Counterbalancing varies the order across participants so that each condition appears equally often in each position. Complete counterbalancing uses every possible order: orders for conditions, so 6 orders for 3 conditions, 24 for 4 and 120 for 5. The number of participants should then be a multiple of the number of orders, for example 12 or 18 participants for the 6 orders of 3 conditions.
- 10Key InsightPlan the orders: read the next component
A Latin square uses orders in which each condition appears exactly once in each position. For conditions A, B and C: ABC, BCA, CAB. A balanced Latin square (for an even number of conditions) also lets each condition immediately precede every other condition exactly once, which balances simple carryover from one condition to the next. For four conditions: ABDC, BCAD, CDBA, DACB.
- 11ExampleReduce carryover in practice
Randomizing the order separately for each participant balances order effects on average and works well with larger samples. Practical remedies add to this: practice trials before measurement starts, rest breaks, a washout period between drug conditions, and parallel materials (for example, three equally difficult word lists) with the pairing of list and condition also counterbalanced.
- 12ExampleWhen time is the factor
When the within-subject factor is time (pretest, posttest, follow-up), the order cannot be counterbalanced, because the sequence is the variable studied. Change over time can then come from the intervention, from retesting, from natural development or from outside events. Adding a control group that is measured on the same occasions, which makes the study a mixed design, separates the intervention effect from these other sources of change.
- 13ChallengeTry it: control order and carryover effects
Four reversible conditions are assigned using only ABCD and DCBA. Does this balance every condition across all four positions?
---reveal---
No. A and D occur only first or last, while B and C occur only in the middle positions. Reversing one order does not create a Latin square. Add suitable orders so each condition occupies each position equally often, or assign all 24 orders for complete counterbalancing.
- 14ChallengePut the decisions together
A study gives all participants A then B then C. Its long-format table includes condition and score but no ID. What two changes are needed before a defensible repeated-measures comparison?
---reveal---
Restore IDs to link each person’s observations and distribute feasible orders across participants. Pairing controls stable person differences, while counterbalancing prevents condition from being confounded with serial position. Neither change substitutes for the other.
- 15RecapKeep these decisions linked
Identify the participant as the independent unit and retain the links between repeated scores. Match the design to reversible conditions, then distribute orders and reduce carryover. For time studies, use a repeated control group to assess shared changes from retesting and outside events.
2Run and interpret a one-way repeated-measures ANOVA
17 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionBuild the repeated-measures test
- 2ExplanationSplit the sums of squares
- 3ExplanationSplit the sums of squares: read the next component
- 4ExampleWork through the recall data
- 5ExampleSubtract the person and condition components
- 6ExampleWork through the recall data
- 7ChallengeTry it: partition the variability in repeated scores
- 8ExplanationConnect two levels to a paired test
- 9ExplanationRead the software tables
- 10Key InsightAccount for missing observations
- 11ChallengeTry it: run the test, check its assumptions and read the output
- 12ExampleAsk a focused question
- 13ExplanationControl the testing family
- 14ExampleWork through adjusted results
- 15ChallengeTry it: find out which conditions differ
- 16ChallengePut the decisions together
- 17RecapKeep these decisions linked
3Check sphericity and correct the F test
17 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionAdjust the reference distribution
- 2ExplanationStart with difference scores
- 3ExplanationInclude the covariance
- 4Key InsightDistinguish compound symmetry
- 5ChallengeTry it: explain the sphericity assumption
- 6ExplanationRead Mauchly’s test
- 7ExplanationRead epsilon as a severity measure
- 8Key InsightCompare the estimates
- 9ChallengeTry it: test and estimate departures from sphericity
- 10ExplanationCorrect both degrees of freedom
- 11ExampleCalculate a correction
- 12ExampleRead the corrected evidence
- 13Key InsightChoose the rule in advance
- 14ExampleWrite the result
- 15ChallengeTry it: correct the F test and report it
- 16ChallengePut the decisions together
- 17RecapKeep these decisions linked
4Analyze factorial designs with repeated measures
22 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionFind differences in change
- 2ExplanationMatch each effect to its error
- 3ExampleRead an interaction from means
- 4Key InsightRead an interaction from means: read the next component
- 5ExplanationCheck each effect separately
- 6ChallengeTry it: analyze two within-subject factors
- 7ExplanationUse two error strata
- 8ExampleBuild the mixed table
- 9ExampleBuild the mixed table: read the next component
- 10ExampleBuild the mixed table: interpret the result
- 11ExampleConnect changes to the interaction
- 12ChallengeTry it: set up and test a mixed between-within design
- 13ExplanationStart with the cell means
- 14ExplanationTest time within each group
- 15Key InsightTest groups at each occasion
- 16ChallengeTry it: interpret and follow up a mixed-design interaction
- 17ExplanationCorrect the repeated effects
- 18ExplanationCompare variances and covariances
- 19Key InsightCompare variances and covariances: read the next component
- 20ChallengeTry it: check the assumptions of a mixed design
- 21ChallengePut the decisions together
- 22RecapKeep these decisions linked
5Measure and report effect sizes for repeated measures
15 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionKeep the denominator visible
- 2ExplanationName the denominator
- 3ExplanationName the denominator: read the next component
- 4Key InsightRestore person variability
- 5ExampleExtend generalized eta squared
- 6ExampleExtend generalized eta squared: read the next component
- 7ChallengeTry it: choose an effect size for a repeated-measures effect
- 8ExplanationStandardize the paired difference
- 9ExplanationStandardize the paired difference: read the next component
- 10Key InsightUnderstand why the measures differ
- 11ExplanationShow uncertainty
- 12ExplanationShow uncertainty: read the next component
- 13ChallengeTry it: measure differences between two conditions and report the full analysis
- 14ChallengePut the decisions together
- 15RecapKeep these decisions linked
Repeated-Measures ANOVA practice questions
Set 1: Design and one-way analysis10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Sphericity and factorial designs10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Effect sizes and applied decisions10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Integrated analysis and reporting10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
APA-style result
B
Between-subject factor
Bonferroni correction
Box’s M
C
Carryover effect
Cell mean
Change-score comparison
Cohen’s d_av
Cohen’s d_z
Compound symmetry
Condition sum of squares
Confidence interval
Corrected degrees of freedom
Counterbalancing
Covariance
D
Difference score
E
Effect-specific error
Epsilon
Eta squared
F
F ratio
Familywise error rate
Friedman test
Fully within-subject design
G
Generalized eta squared
Greenhouse-Geisser correction
Greenhouse-Geisser estimate
Group-by-time interaction
H
Holm procedure
Homogeneity of covariance matrices
Homogeneity of variance
Huynh-Feldt estimate
I
Independent participants
Individual differences
Interaction
Interaction plot
L
Latin square
Levene’s test
Listwise deletion
Long format
Lower-bound epsilon
M
Main effect
Mauchly’s test
Mean square
Mixed design
Multivariate repeated-measures test
O
Observed factor
Omnibus test
Order effect
P
Partial eta squared
Participant sum of squares
Participants within groups
Planned contrast
Polynomial contrast
R
Residual sum of squares
S
Simple effect
Sphericity
W
Washout period
Wide format
Within-subject error bars
Within-subject factor
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.