mixed models analyses within GAMLj

Discuss the jamovi platform, possible improvements, etc.
TPalma
Posts: 24
Joined: Fri Jul 14, 2017 9:04 am

mixed models analyses within GAMLj

Post by TPalma »

Hi,

I have two questions regarding mixed models and generalized mixed models analyses within GAMLj:

1. The fixed effects estimates are unstandardized or standardized betas? 
2. When the model converges and we did not get singular fit warnings, should we still simplify the model (or try other remedies) when r-squared's cannot be computed?

Thanks!
Best,
Tomás
User avatar
mcfanda@gmail.com
Posts: 537
Joined: Thu Mar 23, 2017 9:24 pm

Re: mixed models analyses within GAMLj

Post by mcfanda@gmail.com »

1. The estimates are unstandardized. In generalized models, there are no betas. If you wish a sort of standardization, you can standardize the independent variables in "Covariate Scaling". Obviously, the dependent variable cannot be standardized.

2. No, for some generalized models the pseudo r-squared cannot be computed, but the model may be fine nonetheless. What model are you using?
User avatar
mcfanda@gmail.com
Posts: 537
Joined: Thu Mar 23, 2017 9:24 pm

Re: mixed models analyses within GAMLj

Post by mcfanda@gmail.com »

As regards the optimization (referring to the other message), gamlj tries "bobyqa" "Nelder_Mead" and "nloptwrap" options before yielding that the model did not converge
TPalma
Posts: 24
Joined: Fri Jul 14, 2017 9:04 am

Re: mixed models analyses within GAMLj

Post by TPalma »

Thanks!
It's a GLMM prediction recognition performance (yes/no) as a function of target race, target typicality, and confidence (continuously measured and mean-centered), with participants and stimuli as random factors (cluster variables). Here the model info:

Model Info

Info Value Comment
Model Type Logistic Model for binary y
Call glm Recognition ~ 1 + Race + Tipicality + Predictive_Conf + Race:Predictive_Conf + Tipicality:Predictive_Conf + Race:Tipicality + Race:Tipicality:Predictive_Conf + (1 | Face_id) + (Race:Predictive_Conf + Tipicality:Predictive_Conf | Subject_id)
Link function Logit Log of the odd of y=1 over y=0
Direction P(y=1)/P(y=0) P( Recognition = 1 ) / P( Recognition = 0 )
Distribution Binomial Dichotomous event distribution of y
LogLikel. -2030.185 Unconditional Log-Likelihood
-2*LogLikel. 4060.369 Unconditional absolute deviance
Deviance 3688.095 Conditional relative deviance
R-squared NaN Marginal
R-squared NaN Conditional
AIC 4098.37 Less is better
BIC 4214.644 Less is better
Residual DF 3341
Chi-squared/DF 0.888 Overdispersion indicator
Converged yes
Optimizer bobyqa
Note. R-squared cannot be computed.
TPalma
Posts: 24
Joined: Fri Jul 14, 2017 9:04 am

Re: mixed models analyses within GAMLj

Post by TPalma »

I have another question, sorry.

In the covariate scaling menu, the "centered" option means centering around the grand mean, and the option "centered clusterwise" means around participant's own mean?
User avatar
mcfanda@gmail.com
Posts: 537
Joined: Thu Mar 23, 2017 9:24 pm

Re: mixed models analyses within GAMLj

Post by mcfanda@gmail.com »

correct
vliborio
Posts: 4
Joined: Fri May 12, 2023 10:49 am

Re: mixed models analyses within GAMLj

Post by vliborio »

mcfanda@gmail.com wrote: Wed May 19, 2021 6:07 am
2. No, for some generalized models the pseudo r-squared cannot be computed, but the model may be fine nonetheless. What model are you using?
Hi mcfanda! I found the same problem as TPalma and your answer has helped me a lot but I keep wondering why for some generalized models the pseudo r-squared cannot be computed? and why may be fine nonotheless?

Thanks in advanceª
Best,
User avatar
mcfanda@gmail.com
Posts: 537
Joined: Thu Mar 23, 2017 9:24 pm

Re: mixed models analyses within GAMLj

Post by mcfanda@gmail.com »

Sorry, I got lost. Is the question about the mixed model, the generalized mixed or generalized linear modes?
hsorlie
Posts: 2
Joined: Fri Sep 06, 2024 11:28 am

Re: mixed models analyses within GAMLj

Post by hsorlie »

Hi! I have a question regarding the GAMLj interface. Particularly, I wonder what the «Fixed Intercept» check box under the collapsible «Fixed Effects» settings menu does. I apologise if the question is odd and the answer obvious, but I’m a little confused here.

I have data from a daily diary study where respondents report on different fluctuating states for several consecutive days. What I’d like to do is specify a random intercept only model where I hypothesise fixed effects between several day-level independent variables and a corresponding day-level dependent variable. That is, I only want the intercept to vary across individuals, to account for differing individual baseline levels of the variables, but the main effects from the independent variables should be fixed.

I use the collapsible menus «Fixed Effects» and «Random Effects» to do this. I add all the independent variables to the right-hand «Model Terms» under the «Fixed Effects» menu. But my understanding was that I could specify this random intercept by adding the intercept to the right-hand «Random Coefficients» table under the «Random Effects» menu. But if this is how I specify whether I want a fixed or random intercept, what does the «Fixed Intercept» check box do? And what does the model do I have both checked the Fixed Intercept box, and added the Intercept to the «Random Coefficients» table?

Kind regards,
Henrik
User avatar
mcfanda@gmail.com
Posts: 537
Joined: Thu Mar 23, 2017 9:24 pm

Re: mixed models analyses within GAMLj

Post by mcfanda@gmail.com »

Hi
In mixed models the is no dichotomy between fixed and random coefficients. Usually, all coefficients are fixed and some of them are also random. This is because having coefficients only random can bias the results. When a coefficient is fixed and random, the fixed coefficient represents the average of the random coefficients.

Thus, if you want to have random intercepts, include them in the random component. Leave the "fixed intercept" flagged, so the model will have
random intercepts varying across participants. The average of these random intercepts will be the fixed intercept.
Post Reply