Skip to content
Prev 33818 / 398513 Next

logLik.lm()

Your by-hand calculation is wrong -- you have to use the MLE of sigma^2.

sum(dnorm(y, y.hat, sigma * sqrt(16/18), log=TRUE))

Also, this is an inappropriate use of AIC: the models are not nested, and
Akaike only proposed it for nested models.  Next, the gamma GLM is not a
maximum-likelihood fit unless the shape parameter is known, so you can't
use AIC with such a model using the dispersion estimate of shape

The AIC output from glm() is incorrect (even in that case, since the
shape is always estimated by the dispersion).
On Wed, 25 Jun 2003, Edward Dick wrote: