Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should ANOVA keyword argument "equal_var" ever be True? #141

Closed
0todd0000 opened this issue Aug 31, 2020 · 1 comment
Closed

Should ANOVA keyword argument "equal_var" ever be True? #141

0todd0000 opened this issue Aug 31, 2020 · 1 comment

Comments

@0todd0000
Copy link
Owner

(Redirected from #139)

I notice that equal_var = False in the scripts in the website. So I'm wondering if the it should be kept that way for all analyses. Or are there situations where equal_var = True?

@0todd0000
Copy link
Owner Author

In general, equal_var should always be False.

Consider just a two-sample test, which is sufficient to understand the issue for more complex tests like ANOVA:

  • "Sphericity" implies that the two groups have equal variance.
  • Usually true variance is not known before conducting an experiment.
  • The true variances for each group are usually estimated from the experimental measurements.
  • Assuming sphericity before conducting the experiment is usually not justified, because the true variances are not known.
  • Imposing an assumption of sphericity, when the groups truly have different variances, is generally associated with a higher false positive rate. That is, usually a sphericity assumption will produce a lower p value than if sphericity is not assumed.
  • There are many statistical techniques for dealing with nonsphericity.
  • When the dependent variable is simple (i.e., a scalar value), these nonsphericity corrections are straightforward.
  • When the dependent variable is complex (e.g., a vector, or a scalar/vector time series), nonsphericity corrections become more complex.
  • spm1d implements an appropriate nonsphericity correction for the two-sample case, but its corrections for more complex designs are only approximate; spm1d will generate warning and/or error messages for equal_var=False, depending on the specific test.
  • One way to indirectly deal with nonsphericity in spm1d is to conduct two sets of analyses: (1) parametric analysis, which assumes sphericity (e.g. spm1d.stats.ttest2), then (2) nonparametric analysis, which does not assume sphericity (e.g. spm1d.stats.nonparam.ttest2). Provided these two sets of results qualitatively agree, it can be concluded that the assumption of sphericity is not a critical one for those particular results.
  • spm1d will more robustly support nonsphericity corrections in the future

Here are some related links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant