BackTwo-Way ANOVA, Randomized Block Designs, and Repeated Measures ANOVA
Study Guide - Smart Notes
Tailored notes based on your materials, expanded with key definitions, examples, and context.
13.3 Two-Way ANOVA and Randomized Blocks
Introduction to Two-Way ANOVA
Two-way ANOVA is a statistical method used to assess the effects of two categorical explanatory variables (factors) on a single quantitative response variable. It allows researchers to examine both the individual (main) effects of each factor and their interaction effect.
Main Effect: The average difference in the response across levels of one factor, ignoring the other factor.
Interaction Effect: Occurs when the effect of one factor varies depending on the level of the other factor.
Example: Studying the effects of different drugs and age groups on depression ratings.
Model and Hypotheses
The two-way ANOVA model for factors A (with levels) and B (with levels) is:
= grand mean
= effect of level i of factor A
= effect of level j of factor B
= interaction effect
= random error
Hypotheses:
Main effect of A: vs. : At least one
Main effect of B: vs. : At least one
Interaction: for all i, j vs. : At least one
Partitioning Variation
Two-way ANOVA partitions total variability into contributions from factor A, factor B, their interaction, and error. For balanced designs:
Mean squares are obtained by dividing each sum of squares by its degrees of freedom.
Randomized Block Designs
Randomized block designs use one factor (the block) to group similar experimental units and reduce variability. Only the treatment factor is of interest; the block factor accounts for nuisance variation.
Example: Blocking by age group in a drug trial to control for age-related variability.
Example: Antidepressants and Age
A psychiatrist studies the effects of three antidepressants on subjects in three age groups. Each subject is randomly assigned a drug, and ratings are recorded. The data is analyzed using two-way ANOVA to test for main effects and interaction.
Drug | 18-30 | 31-50 | 51-80 |
|---|---|---|---|
Drug A | 43, 41, 42 | 51, 51, 52 | 57, 55, 56 |
Drug B | 51, 51, 51 | 60, 60, 60 | 65, 66, 67 |
Drug C | 71, 70, 71 | 70, 70, 70 | 70, 70, 70 |
Testing hypotheses:
: Mean rating is equal for all three drugs for each age group
: Mean rating is equal for all age groups for each drug
Exploring Interaction Between Factors
Interaction is present if the effect of one factor depends on the level of the other. In plots, interaction is indicated by non-parallel lines connecting means for each group.
Example: Drug effectiveness varies by age group, as shown by non-parallel lines in the plot.
Analysis of Variance Table
Source | DF | Sum of Squares | Mean Square | F Ratio | Prob > F |
|---|---|---|---|---|---|
Drug | 2 | 386.3500 | 193.1750 | 287.911 | <.0001 |
Age Group | 2 | 1326.6667 | 728.5833 | 1087.974 | <.0001 |
Drug*Age Group | 4 | 2.3333 | 0.5833 | 0.872 | 0.491 |
Interpretation: Significant main effects for Drug and Age Group, but no significant interaction.
Performing Two-Way ANOVA in JMP
Use Analyze > Fit Model to specify response and factors.
Click Full Factorial to include main effects and interaction.
Check residual plots to assess model assumptions.
Recap Table
Keyword/Concept | Definition |
|---|---|
Two-way ANOVA | A model with two categorical explanatory variables (factors) that tests for main effects and interaction. |
Main effect | The effect of a factor averaged over levels of the other factor, tested by comparing to . |
Interaction | Occurs when the effect of one factor depends on the level of the other; tested via an F ratio using . |
Randomized block design | A special two-way ANOVA where one factor (the block) is used to control variability; only the treatment factor is of interest and the block factor accounts for nuisance variation. |
13.4 Repeated Measures ANOVA
Introduction to Repeated Measures ANOVA
Repeated measures ANOVA is used when the same subjects are measured repeatedly over time or under several conditions. It accounts for the correlation between repeated measurements on the same subject.
Example: Measuring pain scores at multiple time points after surgery.
Model and Partitioning Variance
The repeated measures ANOVA model is:
= grand mean
= effect of subject i
= effect of condition j
= error term
F statistic for testing condition effect:
Assumptions and Sphericity
Sphericity: The assumption that the variances of the differences between all pairs of conditions are equal.
If sphericity is violated, adjustments such as the Greenhouse-Geisser correction are applied.
Example: Pain Scores Over Time
Researchers collect pain scores on 12 patients at four time points after surgery. Repeated measures ANOVA compares mean pain at the four time points.
Source | DF | F Ratio | Prob > F |
|---|---|---|---|
Time | 3 | 1.2569 | 0.3051 |
Interpretation: No significant difference in mean pain levels over time.
Conducting Repeated Measures ANOVA in JMP
Stack repeated measurements into a single column with a factor for measurement occasion.
Use Analyze > Fit Model with the response variable, repeated factor, subject identifier, and interaction.
Select Random Effects for the subject to specify correct degrees of freedom.
Recap Table
Keyword/Concept | Definition |
|---|---|
Repeated measures ANOVA | A method for comparing means of three or more measurements on the same subjects, accounting for correlation among repeated observations. |
Sphericity | The assumption that the variances of differences between all pairs of conditions are equal. |
Between-subjects variation | Variability due to differences among subjects; removing this error term in repeated measures ANOVA increases sensitivity. |
Check Your Understanding
Why can't we treat repeated measurements on the same subject as independent observations?
What is the purpose of the sphericity assumption, and what adjustments can be made when it is violated?
Describe one advantage of the repeated measures design over a completely randomized design when the same subjects are measured multiple times.
Solutions:
Measurements on the same subject are correlated, violating independence. Repeated measures ANOVA models this correlation by separating between-subject and within-subject variation.
Sphericity requires equal variances of pairwise differences. When violated, corrections like Greenhouse-Geisser are used.
Repeated measures designs increase statistical power and require fewer subjects to detect effects, as they control for between-subject variability.