GAMLj Mixed Model

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
BenH
Posts: 7
Joined: Tue Sep 21, 2021 5:26 pm

GAMLj Mixed Model

Post by BenH »

Hi,

I have a couple of questions about the GAMLj Mixed Model module.

Firstly, how many reps is the 'bootstrap' CI method set too? Apologies if this is written in the documentation somewhere but I couldn't locate it.

Secondly, when testing an interaction between a covariate and a factor, how do I tell what levels are being compared in the Fixed Effects Parameter Estimates section?
Screen Shot 2021-10-07 at 11.33.04.png
Screen Shot 2021-10-07 at 11.33.04.png (53.93 KiB) Viewed 6592 times
For example, where it says 'POL_LVLGND' is that comparing the level GND to everything else (i.e GND coded 1 and the other two levels coded 0) or is it comparing GND to a particular other group (CON or CEE). Is there a way of changing which levels are being compared?

Many Thanks,

Ben
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: GAMLj Mixed Model

Post by mcfanda@gmail.com »

Hi
1. bootstrap reps are 500, which is the default of R confint.merMod() function. In the coming versions, the user will be able to decide how many, but for the moment they are 500
2. As regards the interaction, how do you estimate the model you showed? The table should look differently if you include POL_LVL as factor and let it interact with Anxious
BenH
Posts: 7
Joined: Tue Sep 21, 2021 5:26 pm

Re: GAMLj Mixed Model

Post by BenH »

Hi
Thank you for the details on the bootstrap default.

For that model we were not interested in the main effects of Anxious so we specified it as POL_AVG ~ 1 + POL_LVL + POL_LVL:ANXIOUS+( 1 | ID ).

I can now see that when you include Anxious [POL_AVG ~ 1 + POL_LVL + ANXIOUS + POL_LVL:ANXIOUS+( 1 | ID )] you get the interactions in the format I was expecting.
Screen Shot 2021-10-08 at 12.32.06.png
Screen Shot 2021-10-08 at 12.32.06.png (50.29 KiB) Viewed 6555 times
Please could you explain why the interactions appear in the format they did in the screenshot from my original message? Can those results be interpreted in some way or is it just an error?

Many Thanks,
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: GAMLj Mixed Model

Post by mcfanda@gmail.com »

Sure!
There is a beautiful story behind your "original" model, told in Cohen & Cohen 1983 (and subsequent editions), and some general ideas to learn from it.

In a linear model (glm, mixed or whatever ) with X (categorical) and W (any kind of variable) as independent variables, two main effects X and W, and an interaction X:W, the interaction coefficients can be interpreted as the difference in the effect of W between levels of X .

If you omit the main effect of W, however, the interpretation of the coefficients is completely different. Each coefficient is the simple effect of W estimated for a specific group of X.

So in your first model, the coefficient POL_LVLGND*ANXIOUS is the effect of ANXIOUS estimated for the group POL_LVL=GND, the coefficient POL_LVLCON*ANXIOUS is the effect of ANXIOUS estimated for the group POL_LVL=CON, and so on.

If you what to check that this holds in your data, ask for the simple effects of ANXIOUS in your second model [POL_AVG ~ 1 + POL_LVL + ANXIOUS + POL_LVL:ANXIOUS+( 1 | ID )] . You will see that the simple effects coefficients will be equal to the ones you obtain as interactions in the original model.

The story is that omitting one main effect was the old fashion way to quickly estimate simple effects (before jamovi easy interface :-))

The general idea to get here is that, no matter what a lot of people say, we are not free to decide which effect to estimate and which not, based on our interest in the results. When you omit one effect, the interpretation of the other effects changes. Keep in mind that I'm not usually interested in the left-back wheel of my car, but I try to be sure that it is there when I drive.
BenH
Posts: 7
Joined: Tue Sep 21, 2021 5:26 pm

Re: GAMLj Mixed Model

Post by BenH »

Hi
Thank you so much for your detailed response. That is certainly a lesson learnt for me.
Thanks
Ben
Post Reply