Skip to content

[Bug]: RM-ANOVA with Two Within-Subjects Factors: Inconsistent Interaction DF Under Sphericity Violation #2931

@edouard-dendauw

Description

@edouard-dendauw

JASP Version

0.19.0

Commit ID

No response

JASP Module

ANOVA

What analysis are you seeing the problem on?

repeated Measures ANOVA

What OS are you seeing the problem on?

Windows 11, macOS Silicon

Bug Description

bug_jasp_RMANOVA_df_Residuals_2024-09-25

I am conducting a repeated measures ANOVA with two within-subjects factors: coh (coherence) and bias.

Theoretically, if bias has df = 3, coh has df = 2, and there are 24 subjects, then the degrees of freedom for the interaction bias_x_coh residuals should be ( 2 \times 3 \times 23 = 138 ). The prompt is correct in this case [see the first RM-ANOVA in the attached image].

However, when I reordered the Model Terms in the Model menu (swapping coh and bias), the df of the interaction residuals dropped from 138 to 46, which suggests that the df for coh was not accounted for in the second model [see the second RM-ANOVA in the image].

Additionally, in the second model, the ratio ( \frac{MS_{AXB}}{MS_{err}} ) does not match the reported F value.

I tried using various data, but the sphericity violation does not seem to be the origin of this issue. However, the order of the Repeated Measures Factors in the initialization impacts the issue.

Expected Behaviour

The order of the factors in the Model Terms box should not affect the df. Is that correct?

Steps to Reproduce

  1. Do an RM-ANOVA with two within-subjects factors stats.zip
  2. Switch the factor order in the Model Terms box
  3. See the df of the interaction residual changing

Log (if any)

No response

More Debug Information

No response

Final Checklist

  • I have included a screenshot showcasing the issue, if possible.
  • I have included a JASP file (zipped) or data file that causes the crash/bug, if applicable.
  • I have accurately described the bug, and steps to reproduce it.

Metadata

Metadata

Assignees

Labels

Bug: MediumBugs that don't influence the basic function of the app, but it's better to fix them at some point.Module: jaspAnovaOS: macOS Silicon

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions