-
Notifications
You must be signed in to change notification settings - Fork 204
Description
I always loved the ggstatsplot package, and I frequently use it.
As you know, for ggbetweenstats() and ggwithinstats(), the user must choose between type = 'parametric' or type = 'nonparametric'.
I have developed a function which automatically chooses between the parametric or nonparametric version based on the results of the Shapiro-Wilk test. More precisely:
- for
ggbetweenstats(): the Shapiro-Wilk test is performed for each group separately, and if the normality assumption is violated for at least one group, the nonparametric type will be selected - for
ggwithinstats(): if there are only 2 paired samples, the Shapiro-Wilk test is performed on the differences between the 2 samples, if there are > 2 paired samples, the Shapiro-Wilk test is performed on each samples separately. If normality is violated (for the differences when there are 2 paired samples, or for at least one sample when there are > 2 paired samples), it's the nonparametric type that will be used inggwithinstats()
I believe this helps the user to select the appropriate version, in particular for users who do not have a statistical background (and who are not particularly aware of the nonparametric vs. parametric version, and/or who do not know how to choose the appropriate version).
If you are interested in this feature, I'd be happy to share the code. In that case, feel free to let me know the best way to share it.