Repeated measures ANOVA and GAMLj

Discuss statistics related things

by TPalma » Tue Jan 21, 2020 11:12 pm

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

by mcfanda@gmail.com » Tue Jan 21, 2020 11:21 pm

Hi, would you share the analyses so we can check them out?
User avatar
mcfanda@gmail.com
 
Posts: 179
Joined: Thu Mar 23, 2017 9:24 pm

by TPalma » Wed Jan 22, 2020 10:34 am

Hi Marcello,

Sure, see attachments.

Thanks!
Tomás
Attachments
rm_anova.omv
(66.11 KiB) Downloaded 15 times
glm.omv
(27.07 KiB) Downloaded 13 times
TPalma
 
Posts: 9
Joined: Fri Jul 14, 2017 9:04 am

by mcfanda@gmail.com » Thu Jan 23, 2020 10:47 am

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

by TPalma » Thu Jan 23, 2020 10:57 am

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

by TPalma » Thu Jan 23, 2020 9:55 pm

Can you share that mixed effects analysis with me?
TPalma
 
Posts: 9
Joined: Fri Jul 14, 2017 9:04 am

by mcfanda@gmail.com » Mon Jan 27, 2020 3:53 pm

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

by mcfanda@gmail.com » Mon Jan 27, 2020 3:59 pm

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

by TPalma » Mon Jan 27, 2020 10:12 pm

Hi Marcello,

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

Best,
Tomás
TPalma
 
Posts: 9
Joined: Fri Jul 14, 2017 9:04 am

by mcfanda@gmail.com » Thu Jan 30, 2020 11:14 pm

You're welcome, it's the most difficult issue in mixed models, it took me years to get it
User avatar
mcfanda@gmail.com
 
Posts: 179
Joined: Thu Mar 23, 2017 9:24 pm


Return to Statistics