Repeated measures ANOVA and GAMLj

Discuss statistics related things
Post Reply
TPalma
Posts: 24
Joined: Fri Jul 14, 2017 9:04 am

Repeated measures ANOVA and GAMLj

Post 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
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Repeated measures ANOVA and GAMLj

Post by mcfanda@gmail.com »

Hi, would you share the analyses so we can check them out?
TPalma
Posts: 24
Joined: Fri Jul 14, 2017 9:04 am

Re: Repeated measures ANOVA and GAMLj

Post by TPalma »

Hi Marcello,

Sure, see attachments.

Thanks!
Tomás
Attachments
rm_anova.omv
(66.11 KiB) Downloaded 479 times
glm.omv
(27.07 KiB) Downloaded 478 times
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Repeated measures ANOVA and GAMLj

Post 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 6675 times
TPalma
Posts: 24
Joined: Fri Jul 14, 2017 9:04 am

Re: Repeated measures ANOVA and GAMLj

Post 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
TPalma
Posts: 24
Joined: Fri Jul 14, 2017 9:04 am

Re: Repeated measures ANOVA and GAMLj

Post by TPalma »

Can you share that mixed effects analysis with me?
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Repeated measures ANOVA and GAMLj

Post 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
Attachments
mixedrace.omv
(27.51 KiB) Downloaded 475 times
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Repeated measures ANOVA and GAMLj

Post 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
TPalma
Posts: 24
Joined: Fri Jul 14, 2017 9:04 am

Re: Repeated measures ANOVA and GAMLj

Post 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
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Repeated measures ANOVA and GAMLj

Post by mcfanda@gmail.com »

You're welcome, it's the most difficult issue in mixed models, it took me years to get it
Post Reply