jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
58 stars 29 forks source link

[Feature Request]: Not an unreplicated complete block design #2845

Open Rebecca-Aussie opened 1 month ago

Rebecca-Aussie commented 1 month ago

Description

Won't compute Friedman test

Purpose

Non parametric test for repeated measures ANOVA

Use-case

No response

Is your feature request related to a problem?

Yes. There are no cases missing. One group n = 43, the other n = 48. When I put my repeated measures in, it returns statistics, but when I put the grouping variable in I get the error message.

Is your feature request related to a JASP module?

No response

Describe the solution you would like

A solution that allows me to compute the correct results.

Describe alternatives that you have considered

My data is non-normative, so there are no alternatives.

Additional context

Screenshot 2024-07-26 at 11 59 29 AM
tomtomme commented 1 month ago

Can you share your .jasp file by renaming to zip,and drag and drop here? Thx

Eminmpenza commented 1 month ago

Hi,

I've got the exact same issue with Friedman test in three data sets I'm currently working with. In two of them I work with two within-subjects factor, in the other it has only one.

As OP : -there are no cases missing. But in my case : -The error message seems to appear differently depending on how many within-subjects factors I'm working with. In the data set with one w-s factor, it appears after I put the grouping variable in one set of data. In the two others (two within-subjects factor), the test won't work as soon as I put one of the two repeated measures in.

image image image

I'm sharing my .jasp files .zip renamed here as instructed by @tomtomme [2 within-subjects factors] Association sémantique - ANOVA à MR.zip [2 within-subjects factors] pour analyser 2.zip [1 within-subjects factors] Décision lexicale- ANOVA à MR.zip

Thanks in advance for the help

Rebecca-Aussie commented 1 month ago

Rebecca JASP ERROR copy.zip

Hi tomtomme, here is my file as requested. I have run the ANOVA twice, the first time with the variable as originally coded (with some zero's as scored in the survey), and the second time recoding this variable with scores + 1 to eliminate zeros. As you can see, this issue remains. Thanks so much, Rebecca :)

tomtomme commented 1 month ago

Thank you guys. I am going on vacation for 2 weeks now - so testing will be delayed a bit!

Eminmpenza commented 1 month ago

Hi @Rebecca-Aussie ,

I might have found the reason why it's not working. Not sure if that's relevant to your situation.

https://forum.cogsci.nl/discussion/8546/friedman-test

In that case it will be a bit tricky, because the Friedman test is generally for one-way RM ANOVA's, not for multiple repeated measures. One option to explore would be to try a rank-transformed ANOVA, where you convert your DV to their ranks, and then run the RM ANOVA (although see the warnings here: https://en.wikipedia.org/wiki/ANOVA_on_ranks)

https://github.com/jasp-stats/jasp-issues/issues/1710

However, I now see that we are too permissive in allowing the Friedman test, which has a strict requirement for the design to be unreplicated. When you have a 2x2 within subjects design, you have inherent replicated observations (e.g., an observation for participant 1, in condition 1A, for both conditions 2A and 2B - where 1 and 2 refer to the RM factors, and A and B to their levels). I will add an additional check, to prevent potentially misleading use of the Friedman test.

I also see you only have two groups (not three) so a paired sample t-test (Wilcoxon test if non-normative) might be the most appropriate solution for your issue. But in case you have to do it the way you do, you can almost always use the parametric ANOVA RM in place of Friedman test even when you have non-normative data.

https://www.researchgate.net/publication/320044814_Non-normal_data_Is_ANOVA_still_a_valid_option

Background: The robustness of F-test to non-normality has been studied from the 1930s through to the present day. However, this extensive body of research has yielded contradictory results, there being evidence both for and against its robustness. This study provides a systematic examination of F-test robustness to violations of normality in terms of Type I error, considering a wide variety of distributions commonly found in the health and social sciences. [...] Results: The results showed that in terms of Type I error the F-test was robust in 100% of the cases studied, independently of the manipulated conditions.

Blanca_anova.pdf

https://www.researchgate.net/publication/367545541_Non-normal_Data_in_Repeated_Measures_ANOVA_Impact_on_Type_I_Error_and_Power

Background: Repeated measures designs are commonly used in health and social sciences research. Although there are other, more advanced, statistical analyses, the F-statistic of repeated measures analysis of variance (RM-ANOVA) remains the most widely used procedure for analyzing differences in means. The impact of the violation of normality has been extensively studied for between-subjects ANOVA, but this is not the case for RM-ANOVA. Therefore, studies that extensively and systematically analyze the robustness of RM-ANOVA under the violation of normality are needed. This paper reports the results of two simulation studies aimed at analyzing the Type I error and power of RM-ANOVA when the normality assumption is violated but sphericity is fulfilled. Results: Overall, the results show that the Type I error and power of the F-statistic are not altered by the violation of normality. Conclusions: RM-ANOVA is generally robust to non-normality when the sphericity assumption is met.

4786.pdf

Hope it helps !

tomtomme commented 3 weeks ago

@Eminmpenza @Rebecca-Aussie I tested this with jasp 0.19 and two of your files and can confirm the error

@JohnnyDoorn Any idea?

I deleted empty rows and shortened var names etc. but the error remains. Also the post hoc test shows mostly "NA"