I am analyzing plant densities (n° of plants/0,36m²) across 5 different treatments (repeated on two blocks) in time (year and season). Since my outcome is plant density and repeated measures were done, I wish to analyze the data with a mixed model with a Poisson distribution.
However, on each block:plot:year:season, more than one quadrat was realized, i.e. I have more than one value of plant density for each block:plot:year:season in order to account for the within field variability. Moreover, I am interested in i) a time trend so I wish to include year as a fixed continuous predictor and 2) comparing plant densities between seasons. Hence, I was wondering if it was recommendable to include year as a fixed continuous predictor and a random categorical variable (in order to account for the fact that quadrats realized at the same sampling season on each plot are not independent).
My model (in R) with the glmer function would be the following:
mod = glmer(density ~ treatment*as.numeric(year)*season+(1|plot/as.factor(year)/season),
family="poisson",data=dat)
- Could anybody specify whether this recommendable or not?
- Considering the quadrats are fixed within a block:plot:year:season, should I also add a quadrat ID? However, this would result in single observations per combination...
lmer) using an observation-level random effect does not make any sense because there is a noise term that plays its role. However, in case of Poisson GLMM like you are using here, observation-level random effect can be used to model overdispersion. See e.g. https://stats.stackexchange.com/a/83652/28666, and https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#fitting-models-with-overdispersion. In your case,(1|block:plot:year:season:quadrat)will be observation-level. – amoeba Feb 05 '18 at 14:11yearis coded as numeric (note that whenever it appears to the right of|it will automatically be treated as categorical anyway). So,treatment*year + (1|plot/year/season)is slightly unusual but does make sense. However, note thatyearis within-plot so you can also consider using random slopes instead:treatment*year + (year|plot) + (1|plot:year:season). – amoeba Feb 05 '18 at 14:16treatment*year + (year|plot) + (1|quadrat)might be a reasonable model and a simpler way to write it. – amoeba Feb 05 '18 at 14:20treatment*year*season + (year*season|plot) + (1|plot/quadrat)would make sense as as a starting point. But you will have to deal withseasonbeing categorical which might turn this model into a bit of a mess. You can't really useblockas a random effect because it only has 2 levels which is way too few. – amoeba Feb 05 '18 at 15:09