Atlas
statminds
ANOVAThe underlying model family class (e.g. GLM, linear model, categorical matrix, log-linear).Parametric ReferenceStatistical methods that assume a specific probability distribution family (typically normal).12-stage workflow

Three-way Repeated Measures ANOVA

Analyze three within-subjects factors (all repeated measures) on a continuous outcome..

Model familyANOVA
Hypothesisomnibus
AliasesThree-way within-subjects ANOVA · Triple repeated measures ANOVA · 3×3×3 within-subjects design
G1
association
G2
description
Visual Overview Dashboard
1

What is it?

Three-Way Repeated Measures ANOVA assesses the impact of three within-subjects factors (e.g., Dose, Time, and Task Type) on a continuous dependent variable.

2

When to use it

  • 3 Within Factors: Every subject completes all combinations (e.g. 3 Doses x 2 Times x 2 Tasks).
  • Outcome: Continuous outcome variable.
3

Core Idea

Isolates the 3-way synergistic effect. Shows if the combined effect of Dose and Time varies depending on the Task performed:

TASK 1 (Cognitive)TASK 2 (Motor)

This design has the absolute highest statistical power per participant, but suffers from severe fatigue and learning effect threats.

4

Hypotheses

Tests 7 separate hypotheses: 3 main effects, 3 two-way interactions, and 1 three-way interaction.

5

How it works

The total within-subject variance is partitioned into 7 effects, each tested against its own individual interaction-with-subjects error term.

6

Assumptions

🔮 Multi-Sphericity: Sphericity must hold for all factors with 3+ levels and their interactions.
7

Important Note

If sphericity fails repeatedly, a multivariate (MANOVA) approach or linear mixed modeling (LMM) is strongly recommended.

8

Quick Example

Audit reaction speed under different doses of alcohol (Factor A), at different times of day (Factor B), across different cognitive tasks (Factor C).
Interactive Sandbox

Three-Way RM ANOVA Live Laboratory

Vary the three within-subjects factors to observe the complex 3-way repeated measures output.

Factor A (Dose Effect)5
Factor B (Time Effect)5
Factor C (Task Effect)0
3-Way Interaction (ABC)0
Residual Noise (σ)8
Dual Profile Panel (3-Way Repeated Measures)Y-Axis: Score
TASK 1: COGNITIVE
Time 1Time 2
TASK 2: MOTOR
Time 1Time 2
Three-Way Repeated Measures ANOVA Table
SourceSSFp-value
Factor A (Dose)300.04.69p < 0.05
Factor B (Time)300.04.69p < 0.05
Factor C (Task)0.00.00p > 0.05
ABC Interaction0.00.00p > 0.05
Verdict
❌ No 3-Way RM Interaction
No three-way interaction. Trajectories are parallel across tasks.
01Hypothesis test logic

Hypotheses

Pragmatic null and alternative hypotheses defined in mathematical notation.

We test the null hypothesis of equality to prove the alternative of distinction.
Logic Core
Null · H₀

H₀: No main effects or interactions exist for any of the three within-subjects factors (all condition means are equal after controlling for individual differences)

Alternative · Hₐ

Hₐ: At least one main effect or interaction exists among the three within-subjects factors

Why it matters omnibus

Tests main effects for Factor A, B, and C, plus all two-way interactions (A×B, A×C, B×C) and the three-way interaction (A×B×C). Each test requires sphericity assumption. With 3 factors of 3 levels each, you're testing 7 effects across 27 repeated measurements per subject.

02Model diagnostics

Assumptions

The core mathematical criteria needed to ensure that statistical testing remains unbiased and valid.

Variance homogeneity is a key assumption, though ANOVA is robust to moderate inequality when group sizes are equal. Severe inequality requires Welch's adjustment to prevent distorted p-values.
Integrity Shield
7
Assumptions
6
Critical / High Severity
How to check
Quick
Verify variable is numeric and not categorical; check measurement units are truly interval/ratio
Rigorous
Inspect histograms and summary statistics across all repeated conditions; verify scale has equal intervals
If violated
If ordinal with many levels (7+) → proceed cautiously (RM-ANOVA somewhat robust). If few ordinal categories (e.g., Likert 1-5) → use Friedman test (nonparametric alternative for one factor only; no direct 3-way nonparametric equivalent). If binary → use generalized linear mixed model (GLMM) with binomial family. If count data → use Poisson or negative binomial GLMM
friedman
How to check
Quick
Verify study design: each subject ID appears in all factor level combinations; check data structure has complete repeated measures (no between-subjects factors mixed in)
Rigorous
Create subject × condition matrix; confirm no missing cells (except true missingness); verify design is fully within-subjects (not mixed design)
If violated
If one or more factors are between-subjects → use mixed/split-plot ANOVA (e.g., two-way mixed ANOVA or three-way mixed ANOVA depending on configuration). If only 2 within-subjects factors → use two-way RM-ANOVA. If only 1 within-subjects factor → use one-way RM-ANOVA. If factors are continuous predictors (not categorical) → use linear mixed model with continuous predictors
linear mixed model
How to check
Quick
Mauchly's test of sphericity for each main effect and interaction (p > .05 indicates sphericity holds). CRITICAL: Check sphericity separately for Factor A, Factor B, Factor C, A×B, A×C, B×C, and A×B×C
Rigorous
Compute variance-covariance matrix of all repeated measures; check if compound symmetry or circularity holds; calculate epsilon (ε) for degree of violation: ε < .75 (severe), .75-.85 (moderate), > .85 (mild)
If violated
If Mauchly's p < .05 (sphericity violated): (1) BEST: Apply Greenhouse-Geisser correction (conservative, use when ε < .75) or Huynh-Feldt correction (less conservative, use when ε > .75) to adjust df and p-values. (2) Use multivariate approach (MANOVA-style, no sphericity assumption but requires large n). (3) OPTIMAL: Use linear mixed model with unstructured covariance (models actual correlation pattern, no sphericity needed). NEVER report uncorrected F-tests when sphericity is violated—this inflates Type I error
linear mixed model
How to check
Quick
Create difference scores for key contrasts (e.g., Time2 - Time1, Condition_B - Condition_A); inspect Q-Q plots and histograms of these differences
Rigorous
Shapiro-Wilk test on difference scores for each contrast (p > .05 indicates normality); check skewness (< |2|) and kurtosis (< |7|) of differences
If violated
If mild violation with n ≥ 30: RM-ANOVA is robust via Central Limit Theorem, proceed cautiously. If severe violation: (1) Transform DV (log for right-skew, sqrt for count-like data, Box-Cox for optimal transformation). (2) Use linear mixed model with robust standard errors (Huber-White). (3) Use permutation-based RM-ANOVA (resampling-based, distribution-free). (4) Use Friedman test for single factor (no 3-way equivalent). (5) Bootstrap confidence intervals for F-statistics
linear mixed modelfriedman
How to check
Quick
Review study design: were conditions counterbalanced or randomized across subjects? Check if performance systematically improves/declines across measurement sequence regardless of condition
Rigorous
Test for order effects by including order as a covariate or between-subjects factor; use Latin square or balanced counterbalancing designs; plot outcome by presentation order
If violated
If carryover detected: (1) Include washout periods between conditions (prospective design fix). (2) Model order effects explicitly: add presentation order as covariate in LMM. (3) Use counterbalancing and test order as between-subjects factor in mixed design. (4) If practice effects: include trial number as continuous predictor in LMM to model learning curve. (5) If severe contamination: consider between-subjects design for future studies (cannot fix post-hoc)
linear mixed modelancova
How to check
Quick
Check for missing values (NA, NaN) in dataset; count observations per subject—should equal total number of conditions (e.g., 27 observations if 3×3×3 design)
Rigorous
Create missingness pattern matrix; test if data are missing completely at random (MCAR) using Little's test; compute % missing per subject and per condition
If violated
If < 5% missing and MCAR: (1) Use linear mixed model with restricted maximum likelihood (REML)—automatically handles missing data via full information ML. (2) Multiple imputation (MI) with chained equations, then pool results. If > 5% missing or not MCAR (MNAR): (3) Use mixed model with appropriate missingness model (selection models, pattern mixture models). (4) Sensitivity analysis with different imputation strategies. NEVER use listwise deletion (loses power and biases results) or last-observation-carried-forward (LOCF—biases toward null)
linear mixed model
How to check
Quick
Verify each subject ID is unique; check if subjects are clustered (e.g., family members, students from same school, patients from same clinic)
Rigorous
Check for nested/hierarchical structure; compute intraclass correlation (ICC) at subject level and any higher clustering level; inspect study recruitment process
If violated
If subjects are clustered (e.g., patients within clinics, students within schools): (1) Use three-level mixed model with random intercepts for subjects nested within clusters (Level 1: repeated measures, Level 2: subjects, Level 3: clusters). (2) Use cluster-robust standard errors. (3) Include cluster as fixed effect if few clusters (< 10). (4) Use generalized estimating equations (GEE) with exchangeable correlation structure
gee
03Residual Forensics

Diagnostics

Checking residual plots and indices to examine model deviations and ensure standard error integrity.

Trust, but verify. Outliers can reveal critical data quality issues or genuine subgroup effects that averages obscure.
System Health
Essential checks
  1. Mauchly's test of sphericity for all main effects and interactions (7 tests total)
  2. Greenhouse-Geisser or Huynh-Feldt epsilon (ε) for degree of sphericity violation
  3. Descriptive statistics (M, SD) for all conditions
  4. Profile plots (interaction plots) for all two-way and three-way interactions
Recommended checks
  1. Q-Q plots of residuals or key difference scores
  2. Shapiro-Wilk test on difference scores for main contrasts
  3. Check for missing data patterns and % missing per condition
  4. Residual plots to detect outliers or heteroscedasticity
  5. Counterbalancing verification (order × condition interaction)
  6. Simple effects analysis for significant interactions
  7. Effect size (partial η²) for all significant effects
04Live Instances

Applied Minds

Review concrete study examples, data layout guidelines, and copy executable syntax scripts.

Theory is the map. Practice is the terrain. Simulation bridges the gap.
Applied Wisdom
Example 01

Mindfulness Training and Cognitive Performance Across Tasks, Time, and Difficulty

Research question: Does mindfulness meditation training improve cognitive performance across multiple task types, time points, and difficulty levels? Design: 20 participants complete attention tasks under 3×3×3 fully within-subjects design: Task Type (Stroop, Flanker, Go/No-Go) × Time (Pre-training, Mid-training [4 weeks], Post-training [8 weeks]) × Difficulty (Easy, Medium, Hard). Each participant completes all 27 conditions in randomized order across multiple sessions. Outcome: Response accuracy (% correct, continuous 0-100).

Design3×3×3 fully within-subjects
Total n540
Outcome ScaleAccuracy (% correct, continuous 0-100)
# Three-way Repeated Measures ANOVA: Mindfulness × Task × Time × Difficulty
# Fully within-subjects design (3×3×3 = 27 conditions per participant)

# Load packages
library(tidyverse)   # Data manipulation and visualization
library(ez)          # For ezANOVA (simplified RM-ANOVA)
library(rstatix)     # For anova_test and effect sizes
library(emmeans)     # For post-hoc contrasts and simple effects
library(afex)        # Alternative: aov_ez for RM-ANOVA

# Set seed for reproducibility
set.seed(2025)

# Simulate realistic data (or load: data <- read.csv("mindfulness_cognition.csv"))
# Effect pattern: Time effect (improvement), Difficulty effect (harder = worse),
# Time × Difficulty interaction (more improvement on hard tasks)
n_subjects <- 20

data <- expand.grid(
  subject = factor(1:n_subjects),
  task = factor(c("Stroop", "Flanker", "GoNoGo")),
  time = factor(c("Pre", "Mid", "Post"), levels=c("Pre", "Mid", "Post")),
  difficulty = factor(c("Easy", "Medium", "Hard"), levels=c("Easy", "Medium", "Hard"))
)

# Generate accuracy with realistic effects
data <- data %>%
  mutate(
    # Base accuracy by difficulty
    base_acc = case_when(
      difficulty == "Easy" ~ 85,
      difficulty == "Medium" ~ 75,
      difficulty == "Hard" ~ 60
    ),
    # Time effect (training improvement)
    time_effect = case_when(
      time == "Pre" ~ 0,
      time == "Mid" ~ 3,
      time == "Post" ~ 6
    ),
    # Time × Difficulty interaction (more improvement on hard tasks)
    interaction_effect = case_when(
      time == "Pre" ~ 0,
      time == "Mid" & difficulty == "Hard" ~ 2,
      time == "Post" & difficulty == "Hard" ~ 5,
      TRUE ~ 0
    ),
    # Subject random effect (individual differences)
    subject_effect = as.numeric(subject) * 0.5 - 5,
    # Generate accuracy
    accuracy = base_acc + time_effect + interaction_effect + subject_effect + rnorm(n(), 0, 4)
  ) %>%
  select(subject, task, time, difficulty, accuracy)

# Ensure accuracy is bounded [0, 100]
data$accuracy <- pmin(pmax(data$accuracy, 0), 100)

cat("=== Data Structure ===", "\n")
cat("Total observations:", nrow(data), "\n")
cat("Observations per subject:", nrow(data) / n_subjects, "\n")
cat("Design: 3 tasks × 3 time points × 3 difficulty levels = 27 conditions\n\n")

# === STEP 1: Check Assumptions ===

# 1. Check for missing data
missing_count <- sum(is.na(data$accuracy))
cat("Missing observations:", missing_count, "\n\n")

# 2. Descriptive statistics
cat("=== Descriptive Statistics ===", "\n")
desc_stats <- data %>%
  group_by(task, time, difficulty) %>%
  summarise(
    n = n(),
    M = mean(accuracy),
    SD = sd(accuracy),
    .groups = "drop"
  )
print(desc_stats, n=27)

# === STEP 2: Run Three-way RM-ANOVA ===

# Method 1: Using ez::ezANOVA (comprehensive output with sphericity tests)
cat("\n=== Three-way RM-ANOVA(ezANOVA) ===", "\n")
anova_result <- ezANOVA(
  data = data,
  dv = accuracy,
  wid = subject,
  within = .(task, time, difficulty),
  detailed = TRUE,
  type = 3
)

print(anova_result)

# Extract ANOVA table
anova_table <- anova_result$ANOVA
cat("\n=== Main Effects and Interactions ===", "\n")
print(anova_table)

# Extract sphericity tests
if(!is.null(anova_result$`Mauchly's Test for Sphericity`)) {
  cat("\n=== Mauchly's Test for Sphericity ===", "\n")
  print(anova_result$`Mauchly's Test for Sphericity`)
  cat("\nInterpretation: p < .05 indicates sphericity violated(use GG or HF correction)\n")
}

# Extract sphericity corrections
if(!is.null(anova_result$`Sphericity Corrections`)) {
  cat("\n=== Sphericity Corrections ===", "\n")
  print(anova_result$`Sphericity Corrections`)
  cat("\nGG = Greenhouse-Geisser(conservative), HF = Huynh-Feldt(less conservative)\n")
  cat("Use GG if epsilon < .75, use HF if epsilon > .75\n")
}

# Method 2: Using rstatix::anova_test (alternative)
cat("\n=== Alternative: rstatix anova_test ===", "\n")
anova_rstatix <- anova_test(
  data = data,
  dv = accuracy,
  wid = subject,
  within = c(task, time, difficulty),
  effect.size = "ges"  # Generalized eta squared
)
print(get_anova_table(anova_rstatix))

# === STEP 3: Check Normality of Residuals ===

# Compute residuals (within-subject deviations)
data <- data %>%
  group_by(subject) %>%
  mutate(residual = accuracy - mean(accuracy)) %>%
  ungroup()

# Q-Q plot
cat("\n=== Normality Check ===", "\n")
par(mfrow=c(1,2))
qqnorm(data$residual, main="Q-Q Plot of Residuals")
qqline(data$residual, col="red")
hist(data$residual, breaks=30, main="Histogram of Residuals", xlab="Residual")

# Shapiro-Wilk test
shapiro_test <- shapiro.test(sample(data$residual, min(5000, length(data$residual))))
cat("Shapiro-Wilk test: W =", round(shapiro_test$statistic, 3), 
    ", p =", round(shapiro_test$p.value, 4), "\n")
cat(ifelse(shapiro_test$p.value > .05, "✓ Normality OK", "⚠ Normality violated"), "\n\n")

# === STEP 4: Visualize Interactions ===

# Two-way interaction: Time × Difficulty
cat("=== Visualizing Interactions ===", "\n")
time_diff_means <- data %>%
  group_by(time, difficulty) %>%
  summarise(M = mean(accuracy), SE = sd(accuracy)/sqrt(n()), .groups="drop")

p1 <- ggplot(time_diff_means, aes(x=time, y=M, color=difficulty, group=difficulty)) +
  geom_line(linewidth=1.2) +
  geom_point(size=3) +
  geom_errorbar(aes(ymin=M-SE, ymax=M+SE), width=0.1) +
  labs(title="Time × Difficulty Interaction",
       subtitle="Training improves accuracy more for hard tasks",
       x="Time Point", y="Accuracy(% correct) ± SE",
       color="Difficulty") +
  theme_classic() +
  theme(legend.position="right")
print(p1)

# Three-way interaction: Task × Time × Difficulty (faceted)
task_time_diff_means <- data %>%
  group_by(task, time, difficulty) %>%
  summarise(M = mean(accuracy), SE = sd(accuracy)/sqrt(n()), .groups="drop")

p2 <- ggplot(task_time_diff_means, aes(x=time, y=M, color=difficulty, group=difficulty)) +
  geom_line(linewidth=1) +
  geom_point(size=2.5) +
  facet_wrap(~task, nrow=1) +
  labs(title="Three-way Interaction: Task × Time × Difficulty",
       x="Time Point", y="Accuracy(% correct)",
       color="Difficulty") +
  theme_bw() +
  theme(legend.position="bottom")
print(p2)

# === STEP 5: Post-hoc Tests and Simple Effects ===

# If Time × Difficulty interaction significant, decompose with simple effects
cat("\n=== Simple Effects: Effect of Time at each Difficulty Level ===", "\n")

# Test effect of Time separately for each Difficulty level
for(diff_level in c("Easy", "Medium", "Hard")) {
  cat("\n--- Difficulty:", diff_level, "---\n")
  subset_data <- data %>% filter(difficulty == diff_level)
  
  simple_anova <- anova_test(
    data = subset_data,
    dv = accuracy,
    wid = subject,
    within = time
  )
  print(get_anova_table(simple_anova))
}

# Pairwise comparisons for Time (collapsed across Task and Difficulty)
cat("\n=== Pairwise Comparisons: Time(Main Effect) ===", "\n")
pairwise_time <- data %>%
  pairwise_t_test(
    accuracy ~ time,
    paired = TRUE,
    p.adjust.method = "bonferroni"
  )
print(pairwise_time)

# === STEP 6: Effect Sizes ===

cat("\n=== Effect Sizes(Partial Eta Squared) ===", "\n")
cat("From ANOVA table above(ges column = generalized eta squared)\n")
cat("Interpretation: .01 = small, .06 = medium, .14 = large(Cohen, 1988)\n\n")

# === APA-Style Reporting ===
cat("\n=== APA-Style Report ===", "\n")
cat("
A three-way repeated measures ANOVA was conducted to examine the effects of
mindfulness training on cognitive task performance across task type(Stroop,
Flanker, Go/No-Go), time(Pre, Mid, Post), and difficulty(Easy, Medium, Hard).
Mauchly's test indicated sphericity was violated for the Time main effect,
χ²(2) = 8.45, p = .015, therefore Greenhouse-Geisser corrected values are reported
(ε = .82).

Results revealed significant main effects for Time, F(1.64, 31.16) = 45.23, p < .001,
η²_G = .18 (large effect), and Difficulty, F(2, 38) = 287.56, p < .001, η²_G = .72
(large effect). The Task main effect was not significant, F(2, 38) = 2.13, p = .13.

Crucially, a significant Time × Difficulty interaction emerged, F(4, 76) = 12.34,
p < .001, η²_G = .08 (medium effect). Simple effects analysis revealed that
mindfulness training improved accuracy at all difficulty levels(all p < .001),
but the improvement was larger for Hard tasks(Pre: 60% → Post: 71%, Δ = 11%)
compared to Easy tasks(Pre: 85% → Post: 91%, Δ = 6%). The three-way interaction
was not significant, F(8, 152) = 1.45, p = .18.

These findings suggest mindfulness training enhances cognitive performance with
larger benefits for more challenging tasks, consistent with executive function
improvement theories.
")

cat("\n=== Key Statistics to Report ===", "\n")
cat("• Main effect Time: F(df1, df2) = X.XX, p < .001, η²_G = .XX\n")
cat("• Main effect Difficulty: F(df1, df2) = X.XX, p < .001, η²_G = .XX\n")
cat("• Interaction Time × Difficulty: F(df1, df2) = X.XX, p < .001, η²_G = .XX\n")
cat("• Sphericity corrections applied where violated(report ε and corrected df)\n")
cat("• Include descriptive statistics(M, SD) for all conditions\n")
cat("• Report simple effects for significant interactions\n")
Interpretation Blueprint

Main effects for Time (F[2,38] = 45.23, p < .001, η²_p = .70) and Difficulty (F[2,38] = 287.56, p < .001, η²_p = .94) were significant. Critically, Time × Difficulty interaction was significant (F[4,76] = 12.34, p < .001, η²_p = .39): mindfulness training improved accuracy more for Hard tasks (Δ = 11%) than Easy tasks (Δ = 6%). This supports the theory that mindfulness preferentially enhances executive function under high cognitive load. Three-way interaction was non-significant (p = .18), indicating the Time × Difficulty pattern generalized across all task types.

05Tactical Pivots

Alternatives

Structured fallback pathways for choosing alternative tests when normality or slopes requirements fail.

When the path is blocked, pivot. Rigor is not rigidity; it is the intelligent adaptation to reality.
Adaptive Strategy
Measurement Precision Ladder Ideal · Ratio / Interval
Ratio
Maintain Triple-RM ANOVA. Optimal for high-fidelity physiological monitoring across three temporal dimensions.
Peak Signal
Interval
Ideal for clinical scales. Ensure no significant range-restriction chokes the triple interaction.
Standard Precision
Ordinal
Pivot to Ordered GEE or Multilevel Ordinal models to preserve ranked trajectories in 3D.
Logic Collapse
Nominal
Abandon ANOVA. Use Multi-Way Log-Linear Analysis to audit categorical status-flips.
Information Suicide
Temporal Trajectory Audit Triple-Factor Within-Subjects
Repeated x 3
Multi-dimensional time.
Stay with Three-Way RM ANOVA. The standard for auditing complex internal rhythms.
Sparse Grid
Missing timepoints.
Pivot to Linear Mixed Models (LMM) to preserve power despite unbalanced cell data.
Adaptive Technical Safeguards · adaptive safeguards
triple sphericity failure
  • Greenhouse-Geisser Shield — Mandatory adjustment for all three factors and their interactions.
  • MANOVA Profile Strike — Treat the multi-level grid as a multivariate vector to bypass sphericity.
non normality detected
  • Bootstrap Interaction Strike — Generate robust CIs for the triple synergy term.
  • Log-Transformation — Neutralize extreme skewed trajectories.
06Adjusted Comparisons

Post-hoc

Group mean comparisons and correction controls (e.g. Tukey HSD, Bonferroni) to protect against Family-Wise Error Rates.

The omnibus test opens the door; post-hoc analysis explores the room.
Forensic Detail
Adjusted Comparisons

Post-hoc pairwise tests defined for this model.

Interpretation Guidelines

No specific guidelines provided.

07Standardized scale impact

Effect Size

Understanding effect sizes (e.g., Cohen's d, Partial Eta-Squared) and clinical impact benchmarks.

Eta-squared tells you the 'ownership' of variance. How much of the outcome does your treatment actually control?
Impact Magnitude

Proportion of variance explained after removing other effects. Small: .01, Medium: .06, Large: .14 (Cohen, 1988). Most commonly reported for RM-ANOVA

Comparable across different designs (between vs within). More appropriate for mixed designs. Same thresholds as partial η²

Less biased estimate of population effect size. Use for within-subjects effects when available

Recommended Metric: partial_eta_squared for within-subjects effects, generalized_eta_squared for mixed designs with between-subjects factors
Small
0.2
Medium
0.5
Large
0.8
0.50
partial_eta_squared for within-subjects effects, generalized_eta_squared for mixed designs with between-subjects factors
Recommended Measure
3
Available Metrics
ReportUse partial_eta_squared for within-subjects effects, generalized_eta_squared for mixed designs with between-subjects factors to represent clinical impact magnitude.
08Statistical Power

Sample Size

Guidelines for minimum sample requirements and power analysis parameters.

An underpowered study is an ethical failure. Respect the data by collecting enough of it.
Power Protocol
Floor Requirements

At least 15-20 subjects for adequate power, but depends heavily on effect size and number of repeated measures

Effect SizeParametersRequired n
Small Effectα=.05, power=.80n ≈ 84 subjects
Medium Effectα=.05, power=.80n ≈ 18 subjects
Large Effectα=.05, power=.80n ≈ 8 subjects
G*Power StrategyUse G*Power: F-test → ANOVA: Repeated measures, within-between interaction. Input: effect size f, α, power, number of groups, number of measurements, correlations among repeated measures
09APA narrative blueprint

Reporting

How to compile statistical results into publication prose matching APA and journal style guides.

Report the F-statistic as the signal-to-noise ratio, showing how much of the variance is driven by treatment differences versus background noise.
Narrative Arc
Worked APA paragraph example
A three-way repeated measures ANOVA was conducted to examine effects of mindfulness training on cognitive performance across Task Type (Stroop, Flanker, Go/No-Go), Time (Pre, Mid, Post), and Difficulty (Easy, Medium, Hard). Mauchly's test indicated sphericity was violated for Time (p = .015, ε = .82) and Time × Difficulty interaction (p = .032, ε = .78); Greenhouse-Geisser corrections were applied. Results revealed significant main effects for Time, F(1.64, 31.16) = 45.23, p < .001, η²_p = .70, and Difficulty, F(2, 38) = 287.56, p < .001, η²_p = .94. The Task main effect was not significant, F(2, 38) = 2.13, p = .13. A significant Time × Difficulty interaction emerged, F(3.12, 59.28) = 12.34, p < .001, η²_p = .39. Simple effects analysis revealed training improved accuracy at all difficulty levels (all p < .001), with larger gains for Hard tasks (Δ = 11%) versus Easy tasks (Δ = 6%). The three-way interaction was not significant, F(8, 152) = 1.45, p = .18. These findings suggest mindfulness training enhances cognitive performance with greater benefits for challenging tasks.
Reusable template

A three-way repeated measures ANOVA was conducted to examine the effects of Factor A, Factor B, and Factor C on DV. Mauchly's test of sphericity was assessed for all within-subjects effects; state if violated and which correction used: Greenhouse-Geisser (ε = .XX) or Huynh-Feldt (ε = .XX). Results revealed significant main effects for list significant main effects with F(df1, df2) = X.XX, p = .XXX, η²_p = .XX. Describe significant two-way interactions. Describe three-way interaction if significant, followed by simple effects decomposition. Post-hoc pairwise comparisons using correction method indicated describe key differences with means and p-values.

Essential statistics to report
  • F-statistic for all main effects and interactions
  • degrees of freedom (corrected if sphericity violated)
  • p-values
  • effect sizes (partial η² or generalized η²)
  • sphericity test results and corrections applied
  • descriptive statistics (M, SD) for key conditions
  • simple effects analysis for significant interactions
  • post-hoc pairwise comparisons with corrections
10Exhibit Builder

Manuscript Lab

Copy standard summary tables and forensic reporting grids to outline analysis details.

Table 1: Three-Way Repeated Measures ANOVA (Condition × Task × Time)
SourcedfMSFpηp²
Condition (C)1124.510.2.003.21
Task (T)145.23.8.058.09
Time (Ti)2310.125.4< .001.39
C × T × Ti265.45.12.008.12
Error (C×T×Ti)7812.8
Note. All factors are within-subjects. N = 40.
C × T × Ti (p=.008)The significant 3-way split confirms that performance dynamics are highly context-dependent. A blanket statement about 'Condition' is invalid.
Time (ηp² = .39)Despite the interaction, the sheer impact of Time (Learning Effect) is the strongest driver of variance.
Header glossary

The 'Cognitive Complexity' Audit. Does the effect of the Condition on Task Performance change over Time?

Specific Error Term. In RM-ANOVA, every interaction has its own specific error term (the interaction with the Subject ID).

Signal Strength. Ratio of the triple interaction variance to the random triple interaction noise.

11Algorithmic Logic

Command Center

Syntax libraries and function parameters for executing calculations in stats packages.

Code is the modern laboratory. Clean execution ensures reproducible discovery.
Execution Engine
# 1. Execute 3-Way Pure RM-ANOVA
model <- aov_ez(id = 'subID', dv = 'rt', data = df, 
                within = c('cond', 'task', 'time'))

# 2. Visualize the Triple Interaction
emmip(model, cond ~ time | task)
Library stack
R
afexemmeans
Python
pingouin
Elite Forensic Strike

With three within-subject factors, Sphericity violations multiply. Always prioritize the Corrected p-values (GG or HF).

# Auto-Corrected Output (Greenhouse-Geisser)
print(model, correction = 'GG')

# Decomposition of Triple Interaction
emmeans(model, pairwise ~ cond | task + time)
12The Over-adjustment Trap

Common Mistakes

Analytical caveats and corrections to maintain modeling integrity.

Wisdom is learning from the failures of others. Anticipate the error before it occurs.
Defensive Logic
Why it's wrong
Sphericity violation inflates Type I error rate (false positives). Uncorrected F-tests assume equal variances of all pairwise differences, which is often unrealistic in repeated measures. This leads to liberal p-values (too many 'significant' results).
The correction
ALWAYS check Mauchly's test for each within-subjects effect. If p < .05, apply Greenhouse-Geisser (GG) correction if ε < .75, or Huynh-Feldt (HF) if ε > .75. Report corrected df and p-values. Example: 'F(1.64, 31.16) = 45.23, p < .001' (GG corrected from original df = 2, 38). Alternatively, use linear mixed model which doesn't assume sphericity.
Why it's wrong
Three-way interactions are complex and uninterpretable without decomposition. Stating 'the three-way interaction was significant' tells readers nothing about the actual pattern of effects. Without simple effects analysis, you can't identify where differences lie.
The correction
For significant 3-way interaction A×B×C: (1) Decompose into simple two-way interactions (test A×B separately at each level of C), or (2) test simple simple main effects (test effect of A at each combination of B and C). Use Bonferroni correction for multiple comparisons. Report specific patterns with means and p-values. Create interaction plots to visualize patterns.
Why it's wrong
Loses statistical power and can bias results if data are not missing completely at random (MCAR). RM-ANOVA requires complete data, so software often drops entire subjects with 1+ missing values, potentially eliminating 30-50% of sample.
The correction
BEST: Use linear mixed model (LMM) with restricted maximum likelihood (REML)—handles missing data via maximum likelihood without deletion. Alternative: Multiple imputation (MI) with 20-40 imputations, then run RM-ANOVA on each imputed dataset and pool results. Never use last-observation-carried-forward (LOCF)—severely biases results. Always report % missing and test if missing data are MCAR (Little's test).
Why it's wrong
If all subjects experience conditions in same order (e.g., Time 1 → Time 2 → Time 3), practice effects, fatigue, and carryover confound true treatment effects. You can't separate whether differences are due to the condition itself or just order/learning.
The correction
PROSPECTIVE FIX: Use counterbalancing (Latin square, balanced incomplete block designs) or full randomization of condition order across subjects. POST-HOC FIX: (1) Include presentation order as covariate in LMM (tests and controls for order effects). (2) Test Order × Condition interaction to detect systematic carryover. (3) If severe contamination detected, report as limitation—cannot fully correct post-hoc. For learning/practice effects, model trial number as continuous predictor.
Why it's wrong
A significant omnibus F-test for a factor with 3+ levels only indicates 'at least one difference exists'—it doesn't specify which levels differ. You cannot conclude all pairwise comparisons are significant. With 3 time points (Pre, Mid, Post), a significant F could mean only Pre ≠ Post while Mid doesn't differ from either.
The correction
After significant omnibus test: (1) Run pairwise comparisons with Bonferroni or Holm correction for familywise error. (2) Use emmeans package (R) or pingouin.pairwise_tests (Python) for all pairwise contrasts. (3) Report which specific conditions differ with adjusted p-values. Example: 'Post-hoc tests revealed Post > Pre (p < .001) and Post > Mid (p = .002), but Mid did not differ from Pre (p = .18).'
Why it's wrong
p-values indicate statistical significance but not practical/clinical importance. With large n or many repeated measures, tiny trivial effects can be 'significant' (p < .05). Without effect sizes, readers can't judge if findings are meaningful or replicate prior work.
The correction
ALWAYS report partial η² (or generalized η²) for each effect: 'F(2, 38) = 45.23, p < .001, η²_p = .70'. Interpret magnitude: .01 = small, .06 = medium, .14 = large (Cohen, 1988). For repeated measures, also report means and SDs for each condition to aid meta-analysis. Consider reporting confidence intervals for effect sizes when possible.
Why it's wrong
If you have one or more between-subjects factors (e.g., Age Group, Treatment Group) combined with within-subjects factors, this is a MIXED/SPLIT-PLOT design, not pure repeated measures. Using pure RM-ANOVA ignores between-subjects variance structure, leading to incorrect F-tests and p-values for between-subjects effects.
The correction
Use mixed ANOVA (split-plot ANOVA): specify which factors are between-subjects and which are within-subjects. In R: ezANOVA(..., within=.(factor1, factor2), between=.(factor3)). In Python: pg.mixed_anova(..., within=['factor1', 'factor2'], between='factor3'). Report between-subjects effects separately from within-subjects effects with appropriate error terms.
Why it's wrong
RM-ANOVA tests whether means differ across conditions, but correlation ≠ causation. If factors are not experimentally manipulated with random assignment (e.g., comparing musicians vs non-musicians over time), confounds prevent causal inference. Self-selection bias and unmeasured variables may explain observed differences.
The correction
For causal claims: (1) Use randomized controlled trial (RCT) with random assignment to conditions. (2) If observational, use causal inference methods (propensity score matching, inverse probability weighting). (3) Report associations, not effects: 'Mindfulness training was associated with improved accuracy' (not 'caused'). (4) Discuss alternative explanations and confounds as limitations. Be explicit about study design (experimental vs observational) in methods.
13Academic Lineage

References

Scholarly lineage and citation keys grounding the statistical framework.

We stand on the shoulders of giants. Honor the source of the method.
Academic Lineage
[1]
Tang, Y. Y., Hölzel, B. K., & Posner, M. I. (2015). The neuroscience of mindfulness meditation. Nature Reviews Neuroscience, 16(4), 213-225.
Comprehensive review of mindfulness effects on attention and executive function. Basis for Example 1.
doi: 10.1038/nrn3916
[2]
Särkämö, T., Tervaniemi, M., Laitinen, S., Numminen, A., Kurki, M., Johnson, J. K., & Rantanen, P. (2014). Cognitive, emotional, and social benefits of regular musical activities in early dementia: Randomized controlled study. The Gerontologist, 54(4), 634-650.
Music training effects on memory across lifespan with emotion interactions. Basis for Example 2.
doi: 10.1093/geront/gnt100
[3]
Greenhouse, S. W., & Geisser, S. (1959). On methods in the analysis of profile data. Psychometrika, 24(2), 95-112.
Original paper on Greenhouse-Geisser correction for sphericity violations in repeated measures ANOVA.
doi: 10.1007/BF02289823
[4]
Huynh, H., & Feldt, L. S. (1976). Estimation of the Box correction for degrees of freedom from sample data in randomized block and split-plot designs. Journal of Educational Statistics, 1(1), 69-82.
Huynh-Feldt correction for sphericity violations, less conservative than Greenhouse-Geisser.
doi: 10.3102/10769986001001069
[5]
Maxwell, S. E., Delaney, H. D., & Kelley, K. (2017). Designing Experiments and Analyzing Data: A Model Comparison Perspective (3rd ed.). Routledge.
Comprehensive textbook on repeated measures ANOVA, sphericity, mixed models, and effect sizes. Chapters 11-14.
[6]
Bakeman, R. (2005). Recommended effect size statistics for repeated measures designs. Behavior Research Methods, 37(3), 379-384.
Guide to choosing appropriate effect sizes for repeated measures: partial η² vs generalized η².
doi: 10.3758/BF03192707
statminds · Three-wayMind reference · v2.2 · updated 2026-01-1715 of 15 sections