Mixed model and negative binomial distribution
Alain, thank you very much for the advice regarding analysis of my (negative binomial vs. poisson-distributed) snag data, and my warmest congratulations on your nuptials -Seth W. Bigelow -----Original Message----- From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Highland Statistics Ltd Sent: Friday, October 05, 2012 1:04 PM To: r-sig-mixed-models at r-project.org Subject: [R-sig-ME] Fwd: Re: Mixed model and negative binomial distribution -------- Original Message -------- Subject: Re: Mixed model and negative binomial distribution Date: Fri, 05 Oct 2012 12:37:28 +0200 From: Highland Statistics Ltd <highstat at highstat.com> To: r-sig-mixed-models at r-project.org <r-sig-mixed-models at r-project.org> ------------------------------ Message: 2 Date: Fri, 5 Oct 2012 04:32:36 +0000 (UTC) From: Ben Bolker <bbolker at gmail.com> To: r-sig-mixed-models at r-project.org Subject: Re: [R-sig-ME] Mixed model and negative binomial distribution Message-ID: <loom.20121005T062854-986 at post.gmane.org> Content-Type: text/plain; charset=us-ascii Seth W. Bigelow <seth at ...> writes:
Dear mixed-model brain trust: I am comparing snag (dead tree) densities 1 year and 5 years after silvicultural treatment in forest plots to densities prior to treatment.
In
nlme, my model is
lme(snagnum~treatment, random=(~1|plot), correlation=corExp(form=~year)).
{Treatment is a factor with values of Pre/1-year post/5-year post}. This
gives reasonable output, but I'm having a niggling doubt that I should be
using something akin to a negative binomial distribution, since about half
of the values are zeros (i.e., many plots had no snags prior to treatment,
and did not gain additional snags as a result of treatment). Can anyone
suggest an appropriate package and associated syntax for doing this mixed
model based on an alternative probability density function?
Negative binomial would be a reasonable distribution; the other answer gives you some methods for doing this. *However*, incorporating both serial correlation and non-Gaussian errors in a model of this form is a bit of a nuisance. The model you want might be something like
snagnum ~ Poisson(lambda) lambda ~ MVN(mean=treatment,Sigma=...)
where the variance-covariance matrix gives you both some extra-Poisson variation (to handle overdispersion) and some correlation between observations. I'm hoping Alain Zuur will pop up shortly to point you to a reference in his new book that will tell you how to do this in WinBUGS ...
----------- Yesterday, Alain was on a nice beach in the Caribbean enjoying his wedding. Now he is close to the north pole. Yes....this sounds MCMC. And code for NB GLMM with AR1 correlation and zero inflation is indeed in the 2012 book. However...if the zeros are sequential in time then the correlation and zero inflation components may fight for the same information. And the NB distribution may try to take its share of zeros as well. Better start with the Poisson version of it....and if a Poisson + correlation + ZIP still shows problems, then consider the NB. For irregular time series consider a CAR correlation. As to the implementation..try WinBUGS, OpenBUGS, JAGS....code is nearly the same. I recently downloaded STAN...looks promising too. You may also want to have a look at "Generalized Additive Mixed Model Analysis via gammSlice" by Pham and Wand. GAMM is essentially a GLMM.... But I don;t think it can do zero inflation....but perhaps it does NB GLMM. Not sure. Alain
Dr. Alain F. Zuur First author of: 1. Analysing Ecological Data (2007). Zuur, AF, Ieno, EN and Smith, GM. Springer. 680 p. URL: www.springer.com/0-387-45967-7 2. Mixed effects models and extensions in ecology with R. (2009). Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer. http://www.springer.com/life+sci/ecology/book/978-0-387-87457-9 3. A Beginner's Guide to R (2009). Zuur, AF, Ieno, EN, Meesters, EHWG. Springer http://www.springer.com/statistics/computational/book/978-0-387-93836-3 4. Zero Inflated Models and Generalized Linear Mixed Models with R. (2012) Zuur, Saveliev, Ieno. http://www.highstat.com/book4.htm Other books: http://www.highstat.com/books.htm Statistical consultancy, courses, data analysis and software Highland Statistics Ltd. 6 Laverock road UK - AB41 6FN Newburgh Tel: 0044 1358 788177 Email: highstat at highstat.com URL: www.highstat.com URL: www.brodgar.com [[alternative HTML version deleted]] _______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models