[R-sig-ME] mixed model?
Ben Bolker
bbolker at gmail.com
Wed May 3 00:19:27 CEST 2017
It's a little difficult.
Unless you have very large sample sizes per year or very small noise
levels, it's quite likely that lme4 and friends will collapse the
among-year variance to zero in this case, which may be anticonservative.
You have a variety of choices, none of them super-easy or universally
appropriate:
- collect more data (hah!)
- fit year as a fixed effect
- fit year as a random effect and accept the risk of getting a
completely pooled model
- use some form of regularization to push the variance away from zero
(e.g., blmer)
- go completely Bayesian/MCMC, e.g. brms/MCMCglmm (you'll probably
still need an informative prior to get the model to converge)
Someone has also pointed to the GLMM FAQ.
On 17-05-02 01:56 PM, Joaquín Aldabe wrote:
> Thanks Ben. In this case I considered grass height as continuous. Is it
> fine to consider year as random effect with only 4 years?
> Best,
> Joaquín
>
> 2017-05-02 14:49 GMT-03:00 Ben Bolker <bbolker at gmail.com
> <mailto:bbolker at gmail.com>>:
>
> Minor correction: if GrassHeight is a continuous variable then you
> need (GrassHeight|Field) to model the among-Field variation in the
> effect of grass height. If GrassHeight is categorical, then
> (GrassHeight|Field) will also work, but it will fit an unstructured
> variance-covariance model (n*(n+1)/2 parameters for an n-level
> categorical predictor), whereas (1|Field/GrassHeight) would fit a
> (positive) compound-symmetric model for the variation in grass height
> effects among fields (2 parameters instead of n*(n+1)/2)
>
> On Tue, May 2, 2017 at 1:36 PM, Joaquín Aldabe
> <joaquin.aldabe at gmail.com <mailto:joaquin.aldabe at gmail.com>> wrote:
> > Thankyou very much Evan. I´ll try that!
> > Cheers,
> > Joaquín.
> >
> > 2017-05-02 14:17 GMT-03:00 Evan Palmer-Young <ecp52 at cornell.edu
> <mailto:ecp52 at cornell.edu>>:
> >
> >> Joaquin,
> >> It looks like you could use Year and Field as random effects,
> since there
> >> might be variation in bird abundance across years, and similarly,
> variation
> >> across fields.
> >>
> >> So in this case your model is
> >> Birdmodel<- glmer(Presence~ GrassHeight * ForestCover + (1|Year) +
> >> (1|Field), data=BirdData, family = "binomial")
> >>
> >> Alternatively you could use Year as a fixed effect, if you are
> interested
> >> in particular years.
> >> Another option is to include interaction terms as random effects, eg
> >> (1|Field:GrassHeight), to allow the effect of GrassHeight to vary
> across
> >> fields.
> >>
> >>
> >> On Fri, Apr 28, 2017 at 9:32 AM, Joaquín Aldabe
> <joaquin.aldabe at gmail.com <mailto:joaquin.aldabe at gmail.com>>
> >> wrote:
> >>
> >>> Dear all, I'm analysing bird presence/absence in 16 grassland
> fields over
> >>> 4
> >>> seasons (different years) and want to know the effect of grass
> height and
> >>> forest cover on presence/absence of the species. Grass height
> varied among
> >>> season but not forest cover in each field. So we have a spatial
> dimension
> >>> and a time dimension. I tried a binomial glm but wonder if I
> should use
> >>> generalized linear mixed models with field identity as the
> random as I
> >>> have
> >>> repeated measures (bird counts) in each field.
> >>>
> >>> I appreciate your opinion.
> >>>
> >>> Thanks in advanced,
> >>>
> >>> Joaquin Aldabe.
> >>>
> >>> --
> >>> *Joaquín Aldabe*
> >>>
> >>> *Grupo Biodiversidad, Ambiente y Sociedad*
> >>> Centro Universitario de la Región Este, Universidad de la República
> >>> Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
> >>>
> >>> *Departamento de Conservación*
> >>> Aves Uruguay
> >>> BirdLife International
> >>> Canelones 1164, Montevideo
> >>>
> >>> https://sites.google.com/site/joaquin.aldabe
> <https://sites.google.com/site/joaquin.aldabe>
> >>> <https://sites.google.com/site/perfilprofesionaljoaquinaldabe
> <https://sites.google.com/site/perfilprofesionaljoaquinaldabe>>
> >>>
> >>> [[alternative HTML version deleted]]
> >>>
> >>> _______________________________________________
> >>> R-sig-mixed-models at r-project.org
> <mailto:R-sig-mixed-models at r-project.org> mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>
> >>
> >>
> >>
> >>
> >> --
> >> Evan Palmer-Young
> >> PhD candidate
> >> Department of Biology
> >> 221 Morrill Science Center
> >> 611 North Pleasant St
> >> Amherst MA 01003
> >> https://scholar.google.com/citations?user=VGvOypoAAAAJ&hl=en
> <https://scholar.google.com/citations?user=VGvOypoAAAAJ&hl=en>
> >> https://sites.google.com/a/cornell.edu/evan-palmer-young/
> <https://sites.google.com/a/cornell.edu/evan-palmer-young/>
> >> epalmery at cns.umass.edu <mailto:epalmery at cns.umass.edu>
> >> ecp52 at cornell.edu <mailto:ecp52 at cornell.edu>
> >>
> >
> >
> >
> > --
> > *Joaquín Aldabe*
> >
> > *Grupo Biodiversidad, Ambiente y Sociedad*
> > Centro Universitario de la Región Este, Universidad de la República
> > Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
> >
> > *Departamento de Conservación*
> > Aves Uruguay
> > BirdLife International
> > Canelones 1164, Montevideo
> >
> > https://sites.google.com/site/joaquin.aldabe
> <https://sites.google.com/site/joaquin.aldabe>
> > <https://sites.google.com/site/perfilprofesionaljoaquinaldabe
> <https://sites.google.com/site/perfilprofesionaljoaquinaldabe>>
> >
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models at r-project.org
> <mailto:R-sig-mixed-models at r-project.org> mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>
>
>
>
>
> --
> *Joaquín Aldabe*
>
> /Grupo Biodiversidad, Ambiente y Sociedad/
> Centro Universitario de la Región Este, Universidad de la República
> Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
>
> /Departamento de Conservación/
> Aves Uruguay
> BirdLife International
> Canelones 1164, Montevideo
>
> https://sites.google.com/site/joaquin.aldabe
> <https://sites.google.com/site/perfilprofesionaljoaquinaldabe>
>
>
>
More information about the R-sig-mixed-models
mailing list