[R-sig-ME] GL(L)Ms, Gamma distributions, and AIC
Peter R Law
pr|db @end|ng |rom protonm@||@com
Tue Apr 20 04:47:15 CEST 2021
The R information from ?glm includes the following:
A version of Akaike'sAn Information Criterion, minus twice the maximized log-likelihood plus twice the number of parameters, computed by theaiccomponent of the family. For binomial and Poison families the dispersion is fixed at one and the number of parameters is the number of coefficients. For gaussian, Gamma and inverse gaussian families the dispersion is estimated from the residual deviance, and the number of parameters is the number of coefficients plus one. For a gaussian family the MLE of the dispersion is used so this is a valid value of AIC, but for Gamma and inverse gaussian families it is not. For families fitted by quasi-likelihood the value isNA.
Does the text in bold mean the AIC value contained in the summary output of a glm with the Gamma distribution run in R is not valid? If so, can one still use the output from logLik for the glm to compute AIC directly? It's not quite clear to me what the issue is. For a test model of the form
glm(y ~ x + y, family=Gamma)
Estimate Std. Error t value Pr(>|t|)
density-1.134e-045.469e-06 -20.730<2e-16 ***
Signif. codes:0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for Gamma family taken to be 0.02430272)
Null deviance: 21.859on 499degrees of freedom
Residual deviance: 11.702on 497degrees of freedom
Number of Fisher Scoring iterations: 4
'log Lik.' -1543.925 (df=4)
The logLik and AIC indicate four parameters are counted in the computation of the AIC, as I would have expected.
Whatever the issue is, is there a similar issue with Gamma models in glmer in lme4?
Sent with [ProtonMail](https://protonmail.com) Secure Email.
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models