How to Perform Advanced ANOVA Techniques Using DataStatPro: Repeated Measures and Mixed Designs
Learning Objectives
By the end of this tutorial, you will be able to:
- Understand when to use repeated measures ANOVA vs mixed designs
- Set up and conduct repeated measures ANOVA in DataStatPro
- Perform mixed-design ANOVA with between and within-subject factors
- Interpret sphericity assumptions and apply corrections
- Report results in publication-ready format
When to Use Advanced ANOVA Techniques
Repeated Measures ANOVA
Use repeated measures ANOVA when:
- Same participants measured multiple times (longitudinal studies)
- Multiple conditions tested on same subjects (within-subject designs)
- Pre-post-follow-up measurements
- Time series with multiple measurement points
Mixed-Design ANOVA
Use mixed-design ANOVA when:
- Combining between-subject and within-subject factors
- Different groups measured over time
- Treatment groups with repeated assessments
- Factorial designs with repeated measures on one factor
Step-by-Step Guide: Repeated Measures ANOVA
Step 1: Data Preparation
-
Navigate to ANOVA Analysis
- Go to Inference → ANOVA Tests
- Select Repeated Measures ANOVA
-
Prepare Your Data
- Ensure data is in wide format (one row per participant)
- Each time point should be a separate column
- Include participant ID column
Step 2: Variable Selection
-
Select Repeated Measures Variables
- Choose all time point columns (e.g., Time1, Time2, Time3)
- Ensure variables are numeric and properly labeled
-
Optional: Add Between-Subject Factors
- Select grouping variables if conducting mixed design
- Choose categorical variables for group comparisons
Step 3: Assumption Checking
-
Sphericity Assessment
- Review Mauchly's test of sphericity
- Check epsilon values (Greenhouse-Geisser, Huynh-Feldt)
- Examine sphericity assumption violations
-
Normality and Outliers
- Check residual normality plots
- Identify potential outliers
- Assess homogeneity of variance
Step 4: Running the Analysis
-
Execute Analysis
- Click Run Analysis
- Review output tables and plots
- Check for convergence and warnings
-
Interpret Main Results
- Examine within-subjects effects table
- Review between-subjects effects (if applicable)
- Check effect sizes (partial eta-squared)
Step-by-Step Guide: Mixed-Design ANOVA
Step 1: Design Setup
-
Access Mixed Design Options
- Select Mixed-Design ANOVA from ANOVA menu
- Configure between and within-subject factors
-
Factor Configuration
- Between-Subject Factor: Group membership variable
- Within-Subject Factor: Repeated measures variables
- Specify factor levels and labels
Step 2: Model Specification
-
Main Effects and Interactions
- Include main effect of between-subject factor
- Include main effect of within-subject factor
- Specify interaction between factors
-
Contrast Planning
- Set up planned comparisons
- Choose contrast coding (treatment, sum, etc.)
- Specify custom contrasts if needed
Step 3: Post-Hoc Analysis
-
Multiple Comparisons
- Apply Bonferroni correction for multiple tests
- Use Tukey HSD for pairwise comparisons
- Consider false discovery rate (FDR) control
-
Simple Effects Analysis
- Test group differences at each time point
- Examine time effects within each group
- Interpret interaction patterns
Real-World Example: Clinical Trial Analysis
Scenario
A clinical trial comparing two treatments (Drug A vs Placebo) with measurements at baseline, 4 weeks, 8 weeks, and 12 weeks.
Data Structure
Participant | Group | Baseline | Week4 | Week8 | Week12
001 | Drug_A | 45 | 42 | 38 | 35
002 | Placebo | 44 | 43 | 42 | 41
...
Analysis Steps
-
Mixed-Design Setup
- Between-subject factor: Group (Drug_A, Placebo)
- Within-subject factor: Time (Baseline, Week4, Week8, Week12)
-
Key Results Interpretation
- Main effect of Time: Overall change across time points
- Main effect of Group: Overall difference between treatments
- Group × Time interaction: Different change patterns by treatment
-
Follow-up Analyses
- Simple effects: Group differences at each time point
- Trend analysis: Linear, quadratic change patterns
- Effect size calculation: Clinical significance assessment
Interpreting Results
Understanding F-Statistics
- Within-Subjects Effects: Tests changes over time
- Between-Subjects Effects: Tests group differences
- Interaction Effects: Tests if group differences vary over time
Effect Size Interpretation
- Partial Eta-Squared (ηp²):
- Small: 0.01
- Medium: 0.06
- Large: 0.14
Sphericity Corrections
- Greenhouse-Geisser: Conservative correction for sphericity violations
- Huynh-Feldt: Less conservative, use when epsilon > 0.75
- Lower-bound: Most conservative, use for severe violations
Publication-Ready Reporting
Results Section Template
"A 2 × 4 mixed-design ANOVA was conducted with Group (Drug A, Placebo) as the between-subjects factor and Time (Baseline, Week 4, Week 8, Week 12) as the within-subjects factor. Mauchly's test indicated that the assumption of sphericity was violated (χ² = 12.45, p = .006), therefore Greenhouse-Geisser corrected degrees of freedom were used (ε = 0.78).
There was a significant main effect of Time, F(2.34, 140.4) = 15.67, p < .001, ηp² = .21, indicating overall improvement across time points. The main effect of Group was also significant, F(1, 60) = 8.92, p = .004, ηp² = .13, with Drug A showing greater improvement than Placebo.
Most importantly, there was a significant Group × Time interaction, F(2.34, 140.4) = 4.58, p = .008, ηp² = .07, indicating that the treatment groups showed different patterns of change over time."
APA Style Table
Table 1
Mixed-Design ANOVA Results for Treatment Efficacy
Source df F p ηp²
Between-subjects
Group 1 8.92 .004 .13
Error 60
Within-subjects
Time 2.34 15.67 <.001 .21
Time × Group 2.34 4.58 .008 .07
Error(Time) 140.4
Troubleshooting Common Issues
Problem: Sphericity Violation
Solution: Apply appropriate correction (Greenhouse-Geisser or Huynh-Feldt)
Problem: Missing Data
Solution: Use mixed-effects models or multiple imputation
Problem: Unbalanced Design
Solution: Consider Type III sum of squares or mixed-effects approach
Problem: Non-normal Residuals
Solution: Transform data or use robust ANOVA methods
Frequently Asked Questions
Q: When should I use repeated measures vs mixed-effects models?
A: Use repeated measures ANOVA for balanced designs with complete data. Use mixed-effects models for unbalanced designs, missing data, or complex correlation structures.
Q: How do I handle missing data in repeated measures?
A: Options include listwise deletion (complete cases only), multiple imputation, or switching to mixed-effects models which handle missing data naturally.
Q: What if sphericity is severely violated?
A: Consider multivariate ANOVA (MANOVA) approach or use mixed-effects models which don't assume sphericity.
Q: How many participants do I need?
A: Minimum 10-15 per group, but power analysis should guide sample size based on expected effect size and desired power.
Q: Can I include covariates in repeated measures ANOVA?
A: Yes, use ANCOVA with repeated measures, but ensure covariates don't change over time or model time-varying covariates appropriately.
Related Tutorials
- How to Perform One-Way ANOVA Using DataStatPro
- How to Calculate Effect Sizes Using DataStatPro
- Multiple Comparisons and Correction Methods
- Statistical Assumptions Testing and Remedies
Next Steps
After mastering advanced ANOVA techniques, consider exploring:
- Mixed-effects models for complex longitudinal data
- Multivariate ANOVA (MANOVA) for multiple outcomes
- Structural equation modeling for complex relationships
- Bayesian ANOVA approaches for uncertainty quantification
This tutorial is part of DataStatPro's comprehensive statistical analysis guide. For more advanced techniques and personalized support, explore our Pro features.