[R-sig-ME] Mixed model and negative binomial distribution

Seth W. Bigelow seth at swbigelow.net
Sat Oct 20 17:01:11 CEST 2012

Dear list: this is a continuation of a previous question. To recap,after
input from several listserv members, I have been using glmmADMB to model
snag (dead tree) densities before, after, and 5 years after forest (factor
variable 'time'). (I apologize for disregarding the advice to use 'BUGS'
approaches -- I didn't have $ for new books or time for assimilation of new
paradigm). The data sampling was stratified by 'Ecozone' ('East' densities
are much lower than 'West'). Because there are many plots with no snags, I
evaluated use of Poisson vs. Negative binomial distribution by finding mean
& variance for each combination of time & Ecozone. AIC for the NB
distribution was vastly smaller (more favorable) than for the Poisson.
Variance tended to be much higher prior to treatment (because a few plots
have large numbers of snags and loggers are instructed to knock most of
these down and simply retain a few).

My statement is glmmadmb(snag~time+Ecozone + (1|SettingID), data=.,
family="nbinom1"). ('SettingID' is a plot identifier).

So, I have these observations/questions. First, when I experiment with
'family="poisson", AIC for the glmm is only 2 AIC units greater than for the
negative binomial model, yet with AIC estimated for individual cells, AIC
Poisson >> AIC NegBinom. Any idea why this might be? (I've tried
zero-inflation for poisson & NB, doesn't seem to make much difference)

It's tricky to interpret the log-transformed coefficients and associated
confidence intervals, but they don't seem to reflect the decrease in snags
after treatment that I see when I examine the cell means (e.g., mean East
density at time1 (pre-treatment) is 1.7, dropping to 0.7 at time2 (after
treatment).) Here's part of the summary statement:

            Estimate Std. Error z value Pr(>|z|)   
(Intercept)     -0.764      0.359   -2.13   0.0334 * 
time2             -0.588    0.186   -3.16   0.0016 **
time3            -0.604     0.189   -3.20   0.0014 **
EcozoneW     1.249          0.487    2.57   0.0103 * 

>> exp(coef(.))
(Intercept)       time2       time3    EcozoneW 
      0.466       0.555       0.547       3.488

I have tried the full-interaction model ("time*Ecozone"), although it is not
justified from the standpoint of AIC values. This improves the situation
slightly, although confidence intervals do not indicate a significant
decrease in snags after treatment, contrary to what common sense suggests.
Do I need to somehow be modeling the big decrease in variance between time1
and time2 in order to make sense of these data? Data below.
--Seth W. Bigelow


-----Original Message-----
From: Seth W. Bigelow [mailto:seth at swbigelow.net] 
Sent: Friday, October 05, 2012 6:44 PM
To: 'Highland Statistics Ltd'; 'r-sig-mixed-models at r-project.org'
Subject: RE: [R-sig-ME] Fwd: Re: Mixed model and negative binomial

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.
> 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.



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.

3. A Beginner's Guide to R (2009).
Zuur, AF, Ieno, EN, Meesters, EHWG. Springer

4. Zero Inflated Models and Generalized Linear Mixed Models with R. (2012)
Zuur, Saveliev, Ieno.

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

More information about the R-sig-mixed-models mailing list