[R-sig-ME] [R] glmm: random term, overdispersion and comparisons

Thierry Onkelinx thierry.onkelinx at inbo.be
Mon Oct 5 09:26:11 CEST 2015


Dear Ellen,

I think that you need to do some reading on mixed models. Zuur et al 2009
is a great book on mixed models. It written with ecologists in mind.

(1|site) estimates the common site effect within the observations. So it
models the dependence on site.

Have you looked a the examples in the helpfile of glht() and the vignettes
in the multcomp package?

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

2015-10-02 20:53 GMT+02:00 Ellen Andresen <eandresens op gmail.com>:

> Dear Thierry,
> Thank you for your advice. So, using (1|site) should suffice, even
> though it was always the same sites sampled? I really worry about not
> specifying the random part correctly.
> Finally, do you know of a good tutorial on how to speciffy contrast
> coefficients to do the comparisons I am interested in?
> Thanks again.
> Ellen
>
> 2015-10-02 3:03 GMT-05:00 Thierry Onkelinx <thierry.onkelinx op inbo.be>:
> > Dear Ellen,
> >
> > You're using the Poisson distribution. There is no error (noise) term in
> a
> > glmm with Poisson distribution.
> >
> > 1) The random part seems to be quite complicated given the sample size.
> > (1|site) is probably sufficient. Note that your design is not nested but
> > crossed.
> > 2) Overdispersion is likely in bird abundance. You could use a negative
> > binomial distribution instead of a Poisson distribution. Then the
> > overdispersion is modeled. Use the glmer.nb() function.
> > 3) Have a look at the glht() function in the multcomp package. That
> allows
> > you to test specific contrasts of your model parameters.
> >
> > Note that the r-sig-mixedmodels list is more appropriate for follow-up
> > questions.
> >
> > Best regards,
> >
> > ir. Thierry Onkelinx
> > Instituut voor natuur- en bosonderzoek / Research Institute for Nature
> and
> > Forest
> > team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
> > Kliniekstraat 25
> > 1070 Anderlecht
> > Belgium
> >
> > To call in the statistician after the experiment is done may be no more
> than
> > asking him to perform a post-mortem examination: he may be able to say
> what
> > the experiment died of. ~ Sir Ronald Aylmer Fisher
> > The plural of anecdote is not data. ~ Roger Brinner
> > The combination of some data and an aching desire for an answer does not
> > ensure that a reasonable answer can be extracted from a given body of
> data.
> > ~ John Tukey
> >
> > 2015-10-01 16:59 GMT+02:00 Ellen Andresen <eandresens op gmail.com>:
> >>
> >> Hello,
> >> I studied the effect of a hurricane in Cozumel on understory birds. I
> >> have bird abundances (i.e. counts) registered always on the SAME six
> >> sites (i.e. blocks). I have data for: before the hurricane, first year
> >> after the hurricane, second year after the hurricane. I each of these
> >> time periods, I also have data for summer season and for winter
> >> season. I do not have a balanced design, in one of the time periods I
> >> only have data for 5 of the six sites, and for another period I only
> >> have data for 3 of the six sites.
> >> I am defining Poisson error distrubution for the response variable.
> >> I am using 'glmer' with two fixed factors, and I am interested in
> >> their interaction:
> >> - factor hurricane (three levels: before, after 1 y, after 2 y)
> >> - factor season (two levels: summer, winter)
> >> I am also specifying a random factor (sites), and I am specifying the
> >> nested structure of the design. However, I don't know if I am
> >> specifying the random part of the model in the correct way; this is
> >> what I am doing:
> >>        abundance ~ hurricane*season + (1|site/hurricane/season)
> >>
> >> I have three questions:
> >> 1. Is the random part specified correctly?
> >> 2. How do I check for overdispersion, and how can I correct for it?
> >> (for each site I only have one observation; sites are my replicates)
> >> 3. How do I make the following comparisons: I am interested in testing
> >> for each season separately, after 1 y vs. before the hurricane, and
> >> after 2 years vs. before the hurricane.
> >>
> >> Thank you so much!
> >> Ellen Andresen
> >> UNAM-Mexico
> >>
> >> ______________________________________________
> >> R-help op r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> 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.
> >
> >
>

	[[alternative HTML version deleted]]



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