Page 1 of 1

Repeated measures ANOVA and GAMLj

Posted: Tue Jan 21, 2020 11:12 pm
by TPalma
Sorry if this question has already been asked:

I analyzed my data using a 2X2 repeated measures ANOVA and then did the same thing using a General Linear Model on the (excellent) GAMLj module. Surprisingly, results were very different: on the repeated measures ANOVA I got 1 sig. main effect and a sig interaction; on the GLM, I got 2 sig. main effects and a sig. interaction.

I am curious about what is going on here? Has anyone experienced a similar situation?

Thank you.
Tomás

Re: Repeated measures ANOVA and GAMLj

Posted: Tue Jan 21, 2020 11:21 pm
by mcfanda@gmail.com
Hi, would you share the analyses so we can check them out?

Re: Repeated measures ANOVA and GAMLj

Posted: Wed Jan 22, 2020 10:34 am
by TPalma
Hi Marcello,

Sure, see attachments.

Thanks!
Tomás

Re: Repeated measures ANOVA and GAMLj

Posted: Thu Jan 23, 2020 10:47 am
by mcfanda@gmail.com
Hi
in the GAMLj module you used GLM, which implements the general linear model. One assumption of the GLM is that the dependent variable scores are independent, meaning that the design is between-subjects. To analyze a repeated measure design with GAMLj (and in general with linear models) you need to use the Mixed model, because it allows capturing the dependence in the data.

If you run a mixed model on your data, with race and typicality as random effects, you get very similar results to the RM anova,
race.png
race.png (18.97 KiB) Viewed 6839 times

Re: Repeated measures ANOVA and GAMLj

Posted: Thu Jan 23, 2020 10:57 am
by TPalma
Hi,

Thanks for the clarification!

One question regarding the mixed model: why are race and typicality random and not fixed effect? I would put them as fixed factor and then subjects and face stimuli as random factor, no?

Best,
Tomás

Re: Repeated measures ANOVA and GAMLj

Posted: Thu Jan 23, 2020 9:55 pm
by TPalma
Can you share that mixed effects analysis with me?

Re: Repeated measures ANOVA and GAMLj

Posted: Mon Jan 27, 2020 3:53 pm
by mcfanda@gmail.com
Hi
in the mixed model, there is no such a thing as "either random or fixed". Effects (coefficients) can be fixed AND random. When an effect is random, its corresponding fixed effect can be interpreted as the average effect across clusters (grouping variable levels).

here is a way to analyzed your data- You can also set the intercept as random, but you should remove race a random. If you keep them both as random, the model will not converge

Re: Repeated measures ANOVA and GAMLj

Posted: Mon Jan 27, 2020 3:59 pm
by mcfanda@gmail.com
I would put them as fixed factor and then subjects and face stimuli as random factor, no
You should also distinguish between random effects (random coefficients) and clustering variables. A clustering variable represents the variable that creates the clusters across which the random coefficients vary. In your case, subject and/or stimuli can be the cluster variable(s), whereas race effect or typicality effect may be random effects, meaning that they vary from subject to subject (if subject is the cluster variable) or from stimulus to stimulus (is stimuli is the clustering variable.

This is in theory, in your example, however, race and typicality cannot be both random in the same model because the model does not converge: There's not enough variance in the data to allow that. Nonetheless, you can use race as random to capture the dependency in the data

Re: Repeated measures ANOVA and GAMLj

Posted: Mon Jan 27, 2020 10:12 pm
by TPalma
Hi Marcello,

Now i got it! Thanks a lot for the clarifications! I was indeed confusing random effects and clustering variables.

Best,
Tomás

Re: Repeated measures ANOVA and GAMLj

Posted: Thu Jan 30, 2020 11:14 pm
by mcfanda@gmail.com
You're welcome, it's the most difficult issue in mixed models, it took me years to get it