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,
>> might be variation in bird abundance across years, and similarly,
>> 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
>> in particular years.
>> Another option is to include interaction terms as random effects,
>> (1|Field:GrassHeight), to allow the effect of GrassHeight to vary
>> fields.
>>
>>
>> On Fri, Apr 28, 2017 at 9:32 AM, Joaqu?n Aldabe
<joaquin.aldabe at gmail.com <mailto:joaquin.aldabe at gmail.com>>
>>> Dear all, I'm analysing bird presence/absence in 16 grassland
>>> 4
>>> seasons (different years) and want to know the effect of grass
>>> forest cover on presence/absence of the species. Grass height
>>> season but not forest cover in each field. So we have a spatial
>>> and a time dimension. I tried a binomial glm but wonder if I
>>> generalized linear mixed models with field identity as the
>>> 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
>>> 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
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-mixed-models at r-project.org
<mailto:R-sig-mixed-models at r-project.org> mailing list
>> 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
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org
<mailto:R-sig-mixed-models at r-project.org> mailing list