I am confused about how random effects are structured in my model. I've read the discussion about it Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4?. But I'm still having doubts.
I measured the response in plants as Duration [in seconds] at two Ages [young and old] using the same plants. So, I think it's a repeated measures design with crossed random effects, because the same individuals were measured two times, first at T1, then at T2. I assumed it is not nested, because subjects are not independently measured at Age.
I think that I have a crossed design, so a model like this would be appropriate:
m <- glmmTMB(Duration~ Age+ Nleaves.plant +(1|plantID) + (1|Age), data=df, family = Gamma("log"))
But I also was wondering if this model is correct as well:
m2 <- glmmTMB(Duration~ Age+ Nleaves.plant + (Age|plantID), data=df, family = Gamma("log"))
My questions are:
- Which model is correctly specified?
Sorry about this question, I know that it has been adressed many times in this forum, but I am still confused on this topic. Thank you for your time.