Skip to content
Prev 19337 / 20628 Next

glmer and nAGQ

Thanks for your response. I'm sorry the formatting of the R output got messed up and hard to read when I forwarded the original message. I do understand that changing the value of nAGQ is changing the approximation of the likelihood, not changing the model itself. I wondered whether the change in likelihood from -643.8 (n=1) to -5.9 (n=2) to -inf (n=3) was a reason to suspect the model was badly behaved in that none of these approximations of the logLik should be trusted. The parameter estimates for the fixed effects don't change that much, basically just the logLik and consequently the AIC. I wanted to compare the glmer with a Gamma distribution to the lmer to see whether AIC favoured one over the other. My intent was to start with the glmer with default n=1, then increase n until model parameters seemed stable, then use that n value for the glmer model to obtain a logLik and then AIC to compare to the lmer version. But the dramatic differences in logLik in going from n=1 to n= 2 and the negative infinite value already for n=3 I thought might suggest that none of these logLiks should be trusted and the the Gamma model simply abandoned. Does that sound plausible in light of the warning messages? In particular, that the negative infinity answer is a failuer in the estimation procedure rather than an indication that that the Gamma model has zero likelihood?

I will repeat the analyses with the log link. As far as the data is concerned, it's simulated data I created without using any distributional assumptions but rather based on ecological assumptions for how the response might depend on the fixed predictors. My purpose here is to explore the glmer function in preparation for a study with real data (still being collected). Because the responses are positive values, I thought it would be worth investigating how a Gamma glmer compares with an lmer (and compare both with a log-normal model, after making the adjustment in the latter so that its AIC is comparable to the others, as was pointed out in a previous posting).

Peter


Sent with ProtonMail Secure Email.

??????? Original Message ???????
On Friday, June 18th, 2021 at 5:44 PM, Ben Bolker <bbolker at gmail.com> wrote:

            
Message-ID: <CMAdImRcLjL5-85lpWAMiEgGkFecpFON3PRPgT2K0GyVYJzWqpfgCDRttmpyV4R_OMXMHP6zTMTBVOZTjKNI9n6hU77F8_u1XpPboKK6ca8=@protonmail.com>
In-Reply-To: <ecb77626-a725-bb11-eead-9a00e21f71ce@gmail.com>