[R] AIC

juli g. pausas juli at ceam.es
Tue Sep 11 12:52:50 CEST 2001

```Dear R collegues,
I'm trying to understand what's AIC in R (ver. 1.3.1), and I'm getting a
different answer if I look at the AIC(of the fitted model) or the aic in
the summary( of the fitted model). Is this correct? Can somebody explain
me the difference between the two values? or Is the AIC criterion not
appropiated for Poisson models?

R session:

> t1 <- glm(tax ~ areal, family=poisson(link=log))
> t2 <- summary(t1)
> AIC(t1)
[1] 2173.717

> t2[5]
\$aic
[1] 35206.69

> t2[12]
\$aic
[1] 35206.69

> t1
Call:  glm(formula = tax ~ areal, family = poisson(link = log))

Coefficients:
(Intercept)        areal
3.19610      0.03029

Degrees of Freedom: 283 Total (i.e. Null);  282 Residual
Null Deviance:      40600
Residual Deviance: 32880        AIC: 35210

> t2
Call:
glm(formula = tax ~ areal, family = poisson(link = log))

Deviance Residuals:
Min       1Q   Median       3Q      Max
-25.259   -8.768   -1.270    6.653   25.605

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.1960994  0.0362085   88.27   <2e-16 ***
areal       0.0302905  0.0003333   90.88   <2e-16 ***
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1

(Dispersion parameter for poisson family taken to be 1)

Null deviance: 40605  on 283  degrees of freedom
Residual deviance: 32881  on 282  degrees of freedom
AIC: 35207

Number of Fisher Scoring iterations: 3

Thank you very much for your help

Juli

--
Juli G. Pausas
Centro de Estudios Ambientales del Mediterraneo (CEAM)
C/ C.R. Darwin 14, Parc Tecnologic,
46980 Paterna, Valencia, SPAIN
Tel: (+ 34) 96 131 8227; Fax: (+ 34) 96 131 8190
mailto:juli at ceam.es
http://www.gva.es/ceam

GCTE Fire Network - http://www.gva.es/ceam/FireNetwork

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010911/6365c884/attachment.html
```