-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
Description
Describe the bug
In the current implementation of TwoWayAnovaModel, the logic for assigning denominator mean squares in F-test creation is incorrect for all three model types. This leads to incorrect results when performing two-way ANOVA.
Steps to reproduce the behavior:
Compare two way anova results to implementations of R or python
Expected Behavior
Each TwoWayAnovaModel type should use the correct denominator mean square for its F-tests:
- Fixed: denominator = error mean squares
- Random: denominator = factor mean squares (depending on nesting)
- Mixed: denominator = error mean squares for fixed factor, factor mean squares for random factor
Actual Behavior
The denominator assignments are mismatched:
- Fixed case is using Random logic
- Random case is using Mixed logic
- Mixed case is using Fixed logic
This causes incorrect F-test values and potentially invalid conclusions.