This calculator analyzes data where the same subjects are measured multiple times under different conditions or time points. Whether you have long format data (one row per measurement) or wide format data (one row per subject with multiple measurement columns), this calculator handles both formats. Unlike regular ANOVA that compares different groups, Repeated Measures ANOVA controls for individual differences between subjects, making it more powerful for detecting treatment effects when using the same participants across conditions.
What You'll Get:
- Complete ANOVA Table: F-statistics, p-values, and sum of squares breakdown
- Complete Cases Analysis: Automatic handling of missing data with transparency
- Comprehensive Assumption Testing: Normality, sphericity, and outlier detection
- Effect Size Measures: Partial and generalized eta-squared for practical significance
- Data Processing Insights: Clear reporting of excluded subjects and data cleaning
- APA-Style Report: Publication-ready results formatted for academic writing
Important Note: This test requires each subject to have measurements for all conditions. Subjects with missing data will be excluded from the analysis.
Ready to analyze your repeated measures data? Load long format sample or load wide format sample to see how it works, or upload your own data to discover if there are significant changes across your conditions.
Calculator
1. Load Your Data
2. Select Data Format & Options
Leave blank to sort alphabetically by default
Related Calculators
Learn More
Repeated Measures ANOVA
Definition
Repeated Measures ANOVA analyzes the differences between three or more related measurements on the same subjects over time or under different conditions. It accounts for the correlation between repeated measurements on the same subject. It is commonly applied in within-subjects experimental designs where the same subjects are exposed to different treatments or conditions.
Formulas
F-statistic:
Sum of Squares:
Key Assumptions
Practical Example using rstatix
Step 1: Prepare Data
We’ll organize the scores data in a long format, which is required by rstatix. Each score will be associated with its respective student and teaching method.
library(tidyverse) library(rstatix) scores_long <- tibble( Student = rep(1:5, each = 3), Method = rep(c("A", "B", "C"), times = 5), Score = c(85, 90, 88, 78, 85, 82, 92, 95, 93, 88, 86, 89, 80, 84, 83) )
Step 2: Perform Repeated Measures ANOVA
Using rstatixwe will compute repeated measures ANOVA and summarize the results. Here’s the code:
# Perform repeated measures ANOVA res.aov <- scores_long |> anova_test(dv = Score, wid = Student, within = Method) # Get ANOVA table res.aov %>% get_anova_table()
Step 3: Interpret Results
The output provides the following key information:
- F-statistic:
- p-value:
Output:
# ANOVA Table (type III tests) # Effect DFn DFd F p p<.05 ges # 1 Method 2 8 4.925 0.04 * 0.094
- Effect: The within-subjects factor
- DFn: Degrees of freedom for the numerator
- DFd: Degrees of freedom for the denominator
- F: The F-statistic
- p: The p-value
- ges: The generalized eta-squared effect size
Step 4: Draw Conclusion
Since and , we reject . There is sufficient evidence to conclude that the teaching methods differ significantly.
Effect Size
Generalized Eta-squared ():
Interpretation guidelines:
- Small effect:
- Medium effect:
- Large effect:
For the example above, the generalized eta-squared effect size is , indicating a medium to large effect.
Code Examples
library(tidyverse)
library(rstatix)
# Original Data
scores <- tibble(
Student = 1:5,
Method_A = c(85, 78, 92, 88, 80),
Method_B = c(90, 85, 95, 86, 84),
Method_C = c(88, 82, 93, 89, 83)
)
# Convert to long format
scores_long <- scores |>
pivot_longer(
cols = starts_with("Method"),
names_to = "Method",
values_to = "Score"
)
res.aov <- scores_long %>%
anova_test(dv = Score, wid = Student, within = Method)
# Get ANOVA table
res.aov |>
get_anova_table()
import pandas as pd
from statsmodels.stats.anova import AnovaRM
# Data
data = pd.DataFrame({
'Student': [1, 2, 3, 4, 5],
'Method_A': [85, 78, 92, 88, 80],
'Method_B': [90, 85, 95, 86, 84],
'Method_C': [88, 82, 93, 89, 83]
})
# Reshape to long format
data_long = pd.melt(data, id_vars=['Student'], var_name='Method', value_name='Score')
# Repeated Measures ANOVA
anova = AnovaRM(data_long, 'Score', 'Student', within=['Method'])
res = anova.fit()
print(res)
Alternative Tests
Consider these alternatives:
- Friedman Test: Non-parametric alternative when assumptions are violated
- Mixed Models: When dealing with missing data or unequal time points