GAMLj mixed-effects modelling - random components

Discuss statistics related things
Post Reply
djkembrey
Posts: 9
Joined: Mon Jun 06, 2022 5:03 pm

GAMLj mixed-effects modelling - random components

Post by djkembrey »

Hi,

Is there any way of looking at the random components of two different categories within a nominal variable? I have added my variable (condition) as a cluster variable and added a random intercept. I want to look at the variance/ICC for condition 1 versus 2 but at the moment I can only get this data for the overall 'condition' variable. Is there any way of getting this information for each separate condition?

Thanks,

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

Re: GAMLj mixed-effects modelling - random components

Post by mcfanda@gmail.com »

Hi, to assess the random effects of a categorical variable, just put it in the random components. However, I suspect that your model is not well-specified because it is very unlikely that a "condition" variable is a clustering variable. I guess you want to define condition as a factor in your model, and look at the fixed effect of it
djkembrey
Posts: 9
Joined: Mon Jun 06, 2022 5:03 pm

Re: GAMLj mixed-effects modelling - random components

Post by djkembrey »

Thanks for your response. I am hoping to assess the stability of the DV by looking at the variance/ICC data so will need to have it included as a random effect. Am I right in thinking that if I add 'condition | participant' as a random slope this would allow me to include condition as a fixed and random effect? I found that when I added it as a slope I could look at the different variance/ICC data for condition 1 vs 2 but when it was just added as a cluster variable I was not able to look at the separate data for each condition (just the condition variable overall).
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: GAMLj mixed-effects modelling - random components

Post by mcfanda@gmail.com »

You're right. `condition` is the effect, which is random across `participants`. You can translate the bar "|" as "random across". If you have enough degrees of freedom (meaning more than one trial per condition) you can estimate the variance of the `condition` coefficient across participants, and this is usually a good thing. The fixed effect of condition will be the "average" effect of condition across participants.

If you add `condition` as a cluster, you are saying that your conditions are a random sample of equivalent and uninteresting conditions, which I guess it is not your case.
djkembrey
Posts: 9
Joined: Mon Jun 06, 2022 5:03 pm

Re: GAMLj mixed-effects modelling - random components

Post by djkembrey »

Perfect, thank you for clarifying this!
Post Reply