Let's say I fit the following two models in R:
mod.a = glm(log(mpg) ~ log(wt), data = mtcars, family = gaussian)
mod.b = glm(mpg ~ wt, data = mtcars, family = Gamma)
and I want to compare these two models in terms of AIC. I know the response has different distributions for the two models, hence in order to compare the AIC values some transform of the AIC must be made. Hence I'm wondering how the AIC values can be transformed so that the two models can be compared with AIC?
@probabilityislogic discusses this in their answer in this thread Prerequisites for AIC model comparison but they do not disclose much details of how the transformation is actually derived.
logLik(mod.a)
), however. What you need is the likelihood implied by the LM on the original scale, $L_{y_i}(\hat\theta)=\prod f_{Y_i}(y_i;\hat\theta)$ which differs by a factor of $\prod \frac{d\ln y_i}{d y_i}=\prod 1/y_i$ from what you get when fitting the LM. $\endgroup$