# [Friedmans ANOVA] Can I use the test for different sub groups and compare the outcome?

#### JuergenM

##### New Member
Hello everyone!

I am currently assessing an experiment. I had 90 subjects performing a task over 5 rounds. They were divided into three groups (between subjects), and next to rounds and scores I also had their gender. I want to look at the interaction between female and round, to see whether there are differences in round effects depending on gender. E.g. maybe there is a round (time) effect for male subjects, but not for females.
Unfortunately, my data is not normally distributed, so I first took a look at Round effects with the Friedmans ANOVA as a non-parametric test. I followed it up with Wilcoxon signed rank test (with bonferroni corrected alphas). That worked fine. However, I am wondering whether these effects differ between, for instance, gender.
When I am doing the tests in Stata, I get a significant result for males with Friedmans anova. The post-hoc reveals that there is a small, significant effect within the male group from Round2 to Round5. Am I allowed to use these tests like that?

Sadly, a forum and a google search gave me no further insights. I would be incredibly grateful if someone can help me!
Thanks a lot for your time

#### Karabiner

##### TS Contributor
Unfortunately, my data is not normally distributed, so I first took a look at Round effects with the Friedmans ANOVA as a non-parametric test.
You do not need normally distributed data for an analysis of variance,
at least with a sample size much larger than 30. Other assumptions
are much more important for a repeated-measures analysis of variance.
When I am doing the tests in Stata, I get a significant result for males with Friedmans anova. The post-hoc reveals that there is a small, significant effect within the male group from Round2 to Round5. Am I allowed to use these tests like that?
No. If you assume group effects (interactions), you have to test them directely.

With kind regards

Karabiner

#### JuergenM

##### New Member
Thanks a lot for your input Karabiner! I was afraid this answer would occur.
I also took a try on these interaction effects using Stata. (see code below). Do you perhaps have expertise in this? I'd appreciate your feedback on this a lot! Otherwise, what would you do?

However, I am very unsure how this code exactly works, since I found it in an article and adopted it to my data.
I can, however, interpret the p-values. That is how I came up with the understanding below. It would be nice to know whether my understanding is correct and if I am missing anything.

I have the following understanding of what I am doing:
- First, the anova is performed, which indicates significant interaction. The Contrast-command shows this for the specific round.
- Through the contrast command afterward I see the effect of time for each gender and if it is significant
- the margins in the next one is checking separately for both genders and all pairs
- the next part checks for the singular effect of the gender at each time

Code:
anova Score Female / ParticipantID|Female Round Female#Round, repeated(Round)
** -> interaction effect is  significant (gender and round interact with each other)
** -> Round effect is significant (some tests) and indicates that there is a difference between the rounds

contrast a.Round#Female
** -> Jointly, only effect from second to third round is significant

marginsplot, x(Round)