I have a GLMM with the following form:
m1 <- glmer(Y ~ A*B + (A*B|Subject), data, family=binomial(logit))
B are categorical factors with 2 levels, and
Subject is my grouping factor, with a relatively small number of levels (e.g., 10). A likelihood ratio test indicates that the random slope for the interaction
A:B makes a significant contribution to the fit of the model, so I keep it.
Let's say I have no prior hypothesis about the structure of the random effects, and I want to find the model that provides the best and most parsimonious description of the data. Does it makes sense to proceed testing random slopes for the main effects?
More specifically, is it appropriate to compare (with a likelihood ratio test) the model above (
m1) with this reduced model where I removed the random component for one of the main effects?
m2 <- glmer(Y ~ A*B + (A + A:B|Subject), data, family=binomial(logit))
I would say that intuitively it makes sense, as
m2 would be a model where the effect of
B is pretty much constant for all subjects, while the magnitude of the interaction
A:B varies from subject to subject. However I am wondering whether in practice one can distinguish between variability in the effect of
B vs. variability in the interaction
A:B. I know that, for fixed-effects predictors, it is generally wrong to fit a model that has an interaction term without including the main effects marginal to that interaction, so I guess that I am asking whether I should respect the marginality principle also for testing random slopes.