I think I now know which model works, so I can answer the question for myself. Both models work, it depends on the subject-variable.
To get a better understanding of which random parts to use, I have computed four models:
fit <- lme4::lmer(DV ~ group * time + age + education +
(1|lfd) +
(1|group:lfd) +
(1|time:lfd),
data = mydata)
fit2 <- lme4::lmer(DV ~ group * time + age + education +
(1+time|lfd), data = mydata)
fit3 <- lme4::lmer(DV ~ group * time + age + education +
(1|subject), data = mydata)
fit4 <- lme4::lmer(DV ~ group * time + age + education +
(1|lfd), data = mydata)
All four models produce the same (fixed-effects) results. lfd
is a repeating number, which repeats an ID 4 times: once per group and once per time (so 2 groups by 2 time points are 4 groups).
subject
is a repeated ID for each group in both time points, i.e. I have just 2 groups (group A and B), not further distinguish by time
.
For me, the quintessence - after trying to better understand 2-way repeated measures with mixed models - is:
I think that you don't need to worry about nesting as long as you don't repeat subject ID's within treatment groups.
(as already mentioned in this answerin this answer, but at that time not understood by me. ;-) )