On Tue, 28 Apr 2009, K. Elo wrote:

mathallan wrote:
How can I from the summary function, decide which glm (fit1, fit2 or fit3)
fits to data best? I don't know what to look after, so I would please
explain the important output.

Start with the AIC value (Akaike Information Criterion). The model
having the lowest AIC is the best (of the fitted models, of course).

So, in Your case, the AICs are:

fit1 <- glm(Y~X, family=gaussian(link="identity"))
AIC: 51.294

fit2 <- glm(Y~X, family=gaussian(link="log"))
AIC: 32.954

fit3 <- glm(Y~X, family=Gamma(link="log"))
AIC: 36.65


Hence, the best model seems to be 'fit2'.

Except that fit3 did not use maximum likelihood to estimate the shape parameter and so that is not really a valid AIC value (and the actual AIC will be smaller since the maximized likelihood will be larger). Given that, and that AIC differences between non-nested models are highly variable I would see no clearcut difference between fit2 and fit3. (Even for nested models an AIC difference of not more than 3.7 would not be seen as a large difference.)

This is not really about the subject line at all: 'AIC' as printed here is computed by glm() and not summary.glm(). There is a warning about it on the ?glm help page (all the 'AIC' values quoted here do not take account of the estimation of the dispersion parameter), and AIC() does a slightly better job.

--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to