[R] AIC for tweedie glm

eleadbeater e.leadbeater at sussex.ac.uk
Thu Sep 30 17:01:00 CEST 2010


Many thanks! Using a fresh session didn't work, but I upgraded to R.2.11.1
and it runs fine now.


bbolker wrote:
> 
> 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
> 
> ______________________________________________
> R-help at 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.
> 
> 

-- 
View this message in context: http://r.789695.n4.nabble.com/AIC-for-tweedie-glm-tp2720813p2720934.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list