[R] GML with tweedie: AIC=NA

Gordon Smyth smyth at wehi.EDU.AU
Mon Aug 13 21:56:49 CEST 2007


Dear Catarina,

I prefer to leave the AIC value as NA for the tweedie GLM family 
because it takes extra time to compute and is only occasionally 
wanted. It's easy to compute the AIC yourself using the dtweedie() 
function of the tweedie package.

Best wishes
Gordon

At 03:05 AM 14/08/2007, Catarina Miranda wrote:
>Dear Gordon;
>
>I have also sent this email to R help mailing list, so I apologize 
>for duplicated mailing.
>I am modelling densities of some species of birds, and I have a 
>problem with a great amount of zeros.
>I have decided to try GLMs with the tweedie family, but in all the 
>models I have tried  I got an NA for the AIC value.
>Just  to check the problem I've compared the a glm using the 
>Gaussian family with the identity link and a glm using the tweedie 
>family with var.power=0 and link.power=1. These are equal, as 
>expected, except the fact that the tweedie output gives me an NA for the AIC.
>Could you help me with this problem?
>Below you can find the two outputs I refer.
>
>Best Wishes;
>
>Catarina
>
> > summary(glm(formula=ACIN~DIST_REF+DIST_H2O+DIST_OST+ 
> COTA+H2O_SUP+vasa,family=gaussian(link="identity")))
>Call:glm(formula = ACIN ~ DIST_REF + DIST_H2O + DIST_OST + COTA 
>+     H2O_SUP + vasa, family = gaussian(link = "identity"))
>Deviance 
>Residuals:       Min         1Q     Median         3Q        Max 
>-0.112792   -0.042860  -0.021113  -0.006311   1.551824
>Coefficients:              Estimate Std. Error t value 
>Pr(>|t|)  (Intercept) 
>-6.625e-02  5.454e-02  -1.215   0.2256  DIST_REF     3.581e-06 
>1.336e-05   0.268   0.7889  DIST_H2O    - 
>3.168e-05  1.527e-05  -2.074   0.0391 
>*DIST_OST    -1.799e-05  1.953e-05  -0.921   0.3579  COTA 
>5.648e-04  2.470e-04   2.287   0.0230 
>*H2O_SUP     -2.172e-04  3.994e-04  -0.544   0.5870  vasa 
>3.695e-02  4.573e-02    0.808   0.4199  ---Signif. codes:  0 '***' 
>0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>(Dispersion parameter for gaussian family taken to be 0.02151985)
>     Null deviance: 5.6028   on 257  degrees of freedomResidual 
> deviance: 5.4015  on 251  degrees of freedomAIC: -249.33
>Number of Fisher Scoring iterations: 2
>
>
> > summary(glm(formula=ACIN~DIST_REF+DIST_H2O+DIST_OST+ 
> COTA+H2O_SUP+vasa,control= 
> glm.control(maxit=750),family=tweedie(var.power=0, link.power=1)))
>Call:glm(formula = ACIN ~ DIST_REF + DIST_H2O + DIST_OST + COTA 
>+     H2O_SUP + vasa, family = tweedie(var.power = 0, link.power = 
>1),     control = glm.control (maxit = 750))
>Deviance 
>Residuals:       Min         1Q     Median         3Q        Max 
>-0.112792  -0.042860  -0.021113  -0.006311   1.551824
>Coefficients:              Estimate Std. Error t value 
>Pr(>|t|)  (Intercept) - 
>6.625e-02  5.454e-02  -1.215   0.2256  DIST_REF     3.581e-06 
>1.336e-05   0.268   0.7889  DIST_H2O    -3.168e-05  1.527e-05 
>-2.074   0.0391 
>*DIST_OST    -1.799e-05  1.953e-05  -0.921   0.3579  COTA 
>5.648e-04  2.470e-04    2.287   0.0230 
>*H2O_SUP     -2.172e-04  3.994e-04  -0.544   0.5870  vasa 
>3.695e-02  4.573e-02   0.808   0.4199  ---Signif. codes:  0 '***' 
>0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>(Dispersion parameter for Tweedie family taken to be 0.02151985)
>     Null deviance: 5.6028  on 257  degrees of freedomResidual 
> deviance: 5.4015  on 251  degrees of freedomAIC: NA
>Number of Fisher Scoring iterations: 2
>
>



More information about the R-help mailing list