Re: [R] Overdispersion in count data

From: Wade Wall <wade.wall_at_gmail.com>
Date: Thu, 03 Apr 2008 09:11:32 -0400

Alright, I feel stupid now. That was the problem. For glm you can use both successes and failures, while with the negative binomial it is simply a count. That is why I was getting the subscript too long message. I understand generalized linear models, but I haven't worked with negative binomial distribution models, so I will read up on it before I try to use it. RTFM, right?

I will read about using betabinomial for overdispersed data.

Thanks for your help,

Wade

On Thu, Apr 3, 2008 at 8:30 AM, Michael Dewey <info_at_aghmed.fsnet.co.uk> wrote:

> At 12:54 03/04/2008, Wade Wall wrote:
>
> > That is exactly how I am writing it. Glm works fine, but as I stated
> > the residual deviance is much greater (10x) than the degrees of freedom. I
> > want to take a look at using the negative binomial distribution, but I can't
> > get glm.nb to work. I get the message Error: (subscript) logical subscript
> > too long. I have used traceback() and it seems to be in the glm.fitter
> > function, but as I say I am at the limit of my abilities here.
> >
>
> For Poisson models and for the negative binomial you have a single
> outcome, a count.
> For the binomial you can have two columns of counts of successes and
> failures (there are other ways of arranging your data).
>
> I think you might want to try the beta-binomial which is available I think
> in aod.
>
> However I still think reading the relevant section of MASS first would be
> a good idea (or some equivalent text).
>
>
> Wade
> >
> > On Thu, Apr 3, 2008 at 7:23 AM, Michael Dewey <<mailto:
> > info_at_aghmed.fsnet.co.uk>info_at_aghmed.fsnet.co.uk> wrote:
> > At 17:03 02/04/2008, Wade Wall wrote:
> > Hi all,
> >
> > I have count data (number of flowering individuals plus total number of
> > individuals) across 24 sites and 3 treatments (time since last burn).
> > Following recommendations in the R Book, I used a glm with the model y~
> > burn, with y being two columns (flowering, not flowering) and burn the
> > time
> > (category) since burn. However, the residual deviance is roughly 10
> > times
> > the number of degrees of freedom, and using the quasibinomial
> > distribution
> > doesn't change this. Any suggestions as to why the quasibinomial
> > distribution doesn't change the residual deviance and how I should
> > proceed.
> > I know that this level of residual deviance is unacceptable, but not
> > sure is
> > transformations are in order.
> >
> >
> > You have received much helpful advice from Gavin and Achim and others
> > but I wonder whether they are answering the quaestion in your title rather
> > than in your post.
> >
> > Are you doing something like
> > fit <- glm(cbind(flower, notflower) ~ burn, family = binomial)
> >
> > You might find it helpful to read the relevant section in MASS (see
> > quasibinomial in the index) or in some other text.
> >
> >
> > Needless to say that I am at the outer limits of my statistical
> > knowledge.
> >
> > Thanks for any help,
> >
> > Wade Wall
> >
> > [[alternative HTML version deleted]]
> >
> >
> > Michael Dewey
> > <http://www.aghmed.fsnet.co.uk>http://www.aghmed.fsnet.co.uk
> >
> >
> Michael Dewey
> http://www.aghmed.fsnet.co.uk
>
>

        [[alternative HTML version deleted]]



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. Received on Thu 03 Apr 2008 - 13:14:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Apr 2008 - 14:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive