When I start with the maximal random effects structure for a repeated measures design with three within-subject factors m_1 <- lmer(y ~ a*b*c + (1 + a*b*c|subject), data)
and my model doesn't converge, how do I reduce it?
I think a model that converges most of the time should be the following random intercept model
m_interc <- lmer(y ~ a*b*c + (1|subject) + (1|a:subject) + (1|b:subject) + (1|c:subject)
+ (1|a:b:subject) + (1|a:c:subject) + (1|b:c:subject)
+ (1|a:b:c:subject), data)
But I don't really know how to get from m_1
to m_interc
. E.g. when the random slope variance for the a * b * c interaction is zero do I follow up with m_2
or m_3
m_2 <- lmer(y ~ a*b*c + (1 + a*b*c - a:b:c|subject) + (1|a:b:c:subject), data)
m_3 <- lmer(y ~ a*b*c + (1 + a*b*c - a:b:c|subject), data)
Or, given the random slope variance for factor a is zero, do I substitute the random slope for a with the term (1|a:subject)
or just exclude it?
Also, Bates states (slide 91) that if the variance-covariance matrix for the factor by subject slope, e.g. in a model with (0 + a|subject)
, has the form of compound symmetry it is equivalent to a model with random intercepts for subject (1|subject)
and for the factor:subject interaction (1|a:subject)
. Why is this the case?