optimization parameters in gamlj module
Posted: Tue Apr 28, 2020 9:16 pm
Dear all,
I am considering to move some analyses in R to jamovi - particularly those related to the family of mixed models. First, I would like to know why I get different results, comparing R and jamovi (gamlj module), for linear mixed model analyses which I thought would be equivalent. In fact, looking at deviance (is that what in gamlj calls "LogLikel."), the result I get in jamovi is better.
I thought gamlj was kind of a wrapper around lme4 or lmerTest for most of the funcionality. When I run the analysis in syntax mode, and use the generated model in a call to gamlj::gamljMixed in R, I get the result as shown when I do this in jamovi. However, when I take the model formulation and feed it to lmer, setting the options to REML = TRUE and using the bobyqa optimizer, the fixed and random effects estimates, fitness measures and p-values are different, although I get the same number of parameters in the output (so I suppose the number of degrees of freedom is identical and the models to lmer and gamlj are in effect the same). They are not dramatically different but they go beyond rounding.
To give you an idea:
gamlj fit and some estimates
AIC: 123775.8378
BIC: 123845.2377
LogLikel.: 123757.5462
Fixed Effects Parameter Estimates
─────────────────────────────────────────────────────────────────────────────────────────
Names Estimate SE Lower Upper df t p
─────────────────────────────────────────────────────────────────────────────────────────
(Intercept) 2.8923 0.571 1.7739 4.011 19.1 5.0688 < .001
Random Components
─────────────────────────────────────────────────────────────
Groups Name SD Variance ICC
─────────────────────────────────────────────────────────────
Subject ...
(Intercept) 2.513 6.317 0.0711
Same through lmer:
REML criterion at convergence: 123762.7
AIC: 123780.7
BIC: 123850.4
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 3.43159 0.63977 19.10459 5.364 3.49e-05 ***
Random effects:
Groups Name Variance Std.Dev.
Subject ...
Subject.3 (Intercept) 7.9726 2.8236
I thought that the difference might be due to convergence criteria, but I can't find out whether gamlj uses any other values than the bobyqa defaults. There is simply no documentation on that, and I couldn't immediately localize it in the source code.
So what might be going on?
Thanks to all,
Peter
I am considering to move some analyses in R to jamovi - particularly those related to the family of mixed models. First, I would like to know why I get different results, comparing R and jamovi (gamlj module), for linear mixed model analyses which I thought would be equivalent. In fact, looking at deviance (is that what in gamlj calls "LogLikel."), the result I get in jamovi is better.
I thought gamlj was kind of a wrapper around lme4 or lmerTest for most of the funcionality. When I run the analysis in syntax mode, and use the generated model in a call to gamlj::gamljMixed in R, I get the result as shown when I do this in jamovi. However, when I take the model formulation and feed it to lmer, setting the options to REML = TRUE and using the bobyqa optimizer, the fixed and random effects estimates, fitness measures and p-values are different, although I get the same number of parameters in the output (so I suppose the number of degrees of freedom is identical and the models to lmer and gamlj are in effect the same). They are not dramatically different but they go beyond rounding.
To give you an idea:
gamlj fit and some estimates
AIC: 123775.8378
BIC: 123845.2377
LogLikel.: 123757.5462
Fixed Effects Parameter Estimates
─────────────────────────────────────────────────────────────────────────────────────────
Names Estimate SE Lower Upper df t p
─────────────────────────────────────────────────────────────────────────────────────────
(Intercept) 2.8923 0.571 1.7739 4.011 19.1 5.0688 < .001
Random Components
─────────────────────────────────────────────────────────────
Groups Name SD Variance ICC
─────────────────────────────────────────────────────────────
Subject ...
(Intercept) 2.513 6.317 0.0711
Same through lmer:
REML criterion at convergence: 123762.7
AIC: 123780.7
BIC: 123850.4
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 3.43159 0.63977 19.10459 5.364 3.49e-05 ***
Random effects:
Groups Name Variance Std.Dev.
Subject ...
Subject.3 (Intercept) 7.9726 2.8236
I thought that the difference might be due to convergence criteria, but I can't find out whether gamlj uses any other values than the bobyqa defaults. There is simply no documentation on that, and I couldn't immediately localize it in the source code.
So what might be going on?
Thanks to all,
Peter