[R] How to read the summary

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Apr 29 09:00:36 CEST 2009


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,                  ripley at 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




More information about the R-help mailing list