I run a Linear Mixed-Effects Models (LMMs) with a repeated measures design with the lmer function on R.
mod <- lmer(response ~ factor1*factor2 + (1|ID_repeated),
data=db)
What covariance structure is implemented on the lmer function and how I can change it, in case?
I couldn't find any information about that!
site1is the reference level forfactor1and sayday0is the reference level fordays, the random intercepts will be the estimated values ofresponseif an individual had been atsite1onday0. Those are values estimated by the model; an individual doesn't need to have been atsite1onday0to have such an estimate made. With your model, all effects ofsite2, otherdays, and the interactions will be the same for all individuals. – EdM Aug 16 '20 at 17:28siteortimemight differ among individuals in a way that you need to account for, then you can specify random slopes forsiteortime, too. This page and its links show how to code such random effects. Just be careful, as you can easily run out of enough data to fit all the effects you might want to consider. – EdM Aug 16 '20 at 20:03