[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


Hello:

The R information from ?glm includes the following:

aic:

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)

I got
Deviance Residuals:

Min1QMedian3QMax

-0.42321-0.10661-0.020420.077280.45861

Coefficients:

Estimate Std. Error t value Pr(>|t|)

(Intercept)3.577e-029.012e-0439.692<2e-16 ***

density-1.134e-045.469e-06 -20.730<2e-16 ***

rain2.414e-051.758e-051.3740.17

---

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

AIC: 3095.8

Number of Fisher Scoring iterations: 4

> logLik(M50)

'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?

Peter Law

Sent with [ProtonMail](https://protonmail.com) Secure Email.
	[[alternative HTML version deleted]]



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