[R] AIC for tweedie glm

Ben Bolker bbolker at gmail.com
Thu Sep 30 16:16:05 CEST 2010


eleadbeater <e.leadbeater <at> sussex.ac.uk> writes:

> Dear R-users,
> 
> I'm trying to model some data using a tweedie GLM approach. My response
> variable is the number of pupae that are the offspring of a subordinate wasp
> on a wasp's nest. However, they're not count data- for each nest, I only
> know the mean number of pupae per subordinate, which is continous. The data
> also contain a high proportion of zeros.
> 
> This worked fine, and gave results I expected, but I don't know what the
> best method is to evaluate the fit of the model. I am used to using AIC to
> compare models. A site search turned up AICtweedie, within the tweedie
> package, but I get the following message: Error: could not find function
> "AICtweedie" when I try to use this command, even though "tweedie" and
> "statmod" are both loaded. I've also read that AIC can be calculated using
> dtweedie, but I'm a beginner and so, despite lots of searching, I'm not sure
> how. I'm sorry to ask a basic statistics rather than programming question,
> but I'm really stuck. Could anyone advise me on the best way to assess
> goodness-of-fit for this type of model, in order to compare models?

  Everything you're saying sounds sensible.  The only (!) problem is
that your problem isn't reproducible (for me at least).
  What happens if you run 

library(tweedie)
example(AICtweedie)

from a fresh R session (possibly using R --vanilla)?

What are the results of sessionInfo()  ?

  Works for me.

  Ben Bolker



More information about the R-help mailing list