[R-group] negative binomial on transformed count data?

Michael Renton michael.renton at uwa.edu.au
Fri Oct 31 14:33:01 WST 2014


I echo everything Bruno says. quasipoisson and negative binomial should be fairly equivalent, but negative binomial has the advantage of having an AIC defined, whereas quasipoisson does not. 

And I'd add that if you think the functional form of the model needs tweaking then you can maybe transform the predictor variables and still compare AIC, as least as far I can see. So you could try a square transform of your predictor instead of a sqrt transformation of the dependent variable - it should have the same effect on the functional form but not mess with the scale of the dependent variable. 

Cheers
Michael

-----Original Message-----
From: r-group-bounces at maillists.uwa.edu.au [mailto:r-group-bounces at maillists.uwa.edu.au] On Behalf Of Bruno Buzatto
Sent: Friday, 31 October 2014 11:55 AM
To: r-group at maillists.uwa.edu.au
Subject: RE: [R-group] negative binomial on transformed count data?

Hi Danielle,

The problem is, you can only compare the AIC of different models applied to the same data. Once you transform your data, you are changing the scale of the data, and the AIC won't be comparable among models anymore. So, in short, the fact that your model fit to transformed data has half the AIC value of the model fit to the raw values is meaningless. 

To deal with your overdispersed count data, maybe you want to use a glm with "quasipoisson" as the error family? But your negative binomial option should also be ok, as far as I know. But definitely don't transform your data - at least in my opinion. Have a look at this discussion:

http://stats.stackexchange.com/questions/20826/poisson-or-quasi-poisson-in-a-regression-with-count-data-and-overdispersion

This will also be very useful:

http://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf

Cheers,
Bruno

--
Bruno Alves Buzatto
Postdoctoral Research Associate
Centre for Evolutionary Biology
School of Animal Biology; University of Western Australia - Crawley, WA - Australia
emails: bruno.buzatto at gmail.com / bruno.buzatto at uwa.edu.au
Phones: +61 8 425831125 / +61 8 64882699
ResearcherID: B-6583-2011
ORCID: 0000-0002-2711-0336
Personal website: www.buzatto.info

****** NEWS: The Evolution of Insect Mating Systems, now available from bookshops or directly from here:
http://ukcatalogue.oup.com/product/9780199678037.do
________________________________________
From: r-group-bounces at maillists.uwa.edu.au [r-group-bounces at maillists.uwa.edu.au] On Behalf Of Danielle Collins [20359208 at student.uwa.edu.au]
Sent: Thursday, October 30, 2014 6:44 PM
To: r-group at maillists.uwa.edu.au
Subject: [R-group] negative binomial on transformed count data?

Hi everyone,

I am currently modelling some count data (total abundance) using a negative binomial mixed model (glmer.nb from package lme4). I'm using negative binomial because my data is quite skewed (poisson distribution) with a large amount of overdispersion, which nb is working well on.

My current understanding is that you do not need to transform data when working with glmer.nb because the family 'negative binomial' will account for the non-normal distribution. However, I find that if I use a sqrt transformation it significantly improves the fit of my model - the AIC is halved. The data still has a poisson distribution, but not quite as skewed.

I know negative binomial is typically not used on non-integers but I have found some sources saying that this is actually ok to do. What I'm wondering about is if transforming data before using a negative binomial model causes problems? and generally shouldn't be done? I haven't found anything yet that says not to do this.

Can anyone shed some light on whether this is ok or not?

Thanks
Danielle
_______________________________________________
Ready to present an R meeting? Book a date on
http://goo.gl/tws96 and send the group a timely announcement to the R-group mailing list (R-group at maillists.uwa.edu.au). 

You can subscribe and unsubscribe via our web page: 
http://maillists.uwa.edu.au/mailman/listinfo/r-group


More information about the R-group mailing list