[R-sig-ME] lme4

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Sun Oct 11 23:33:45 CEST 2020




On 10/9/20 10:52 PM, Peter R Law via R-sig-mixed-models wrote:
> I have a simple question about how lme4 works. If one uses lme4 to model a given data set for several different distributional assumptions (e.g., > gamma distribution, via glmer, and Gaussian via lmer and maximum likelihood rather than REML) are the maximum likelihoods output by lme4 comparable in the sense that one could compute AIC from the MLs and compare these models?

   Yes.
> 
> I ran a Gaussian model and a Gamma model on the same set of responses with several predictors and for each distribution checked all predictor combinations. I was struck by the fact that all the Gamma models had lower AICs than all the Gaussian models and wondered if there was some systematic difference between the way the two distributional assumptions were modelled in lme4 that might be responsible for this fat other than the Gamma models just being better.

   No, not that I'm aware of!

If it's useful to you, you can directly compare the implementation of 
AIC for Gamma and Gaussian distributions:

https://github.com/lme4/lme4/blob/master/src/glmFamily.cpp#L239-L247
https://github.com/lme4/lme4/blob/master/src/glmFamily.cpp#L273-L277

   One way to to test your intuition (not *prove*) is to simulate some 
simple data with Gaussian  and Gamma-distributed responses and see that 
the AIC picks the correct model in each case ...

> 
> I would have thought the models with different distributional assumptions do have comparable likelihoods and hence AICs since the likelihood models are formulated in the same manner, Y ~ g^{-1}(Z) + \epsilon, where Y is the response, Z the systematic component and g the link function, so in each case the raw responses are not being transformed, unlike the case when the responses are log-normal, in which case lnY = Z + \epsilon, which does not take the form of a generalized linear model since the residuals are multiplicative on the expectation of Y rather than additive. I take it this is why the log-normal is not included as an option in glmer and one can't compare AIC's of the log-normal model of Y with glmer models of Y. I saw a suggestion on a forum to use
> 
> family = gaussian(link =
> 
> "log"
> 
> )
> 
> with lme4 but this model would be Y =Ln^{-1}(Z) + \epsilon = e^Z + \epsilon, i.e., one has linearized the multiplicative error to make it additive, which is not exactly
> 
> the same as requiring Y to be log-normally distributed.


    Correct.  The correction for the scale transformation is pretty 
simple: see here

https://stats.stackexchange.com/a/100671/2126

> 
> Peter R Law
> Research Associate
> Center for African Conservation Ecology
> Nelson Mandela University
> South Africa
> 
> Sent with [ProtonMail](https://protonmail.com) Secure Email.
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>



More information about the R-sig-mixed-models mailing list