Until Rune Haubo pointed out that he cannot see how these models (using the double-bar notation for factorial designs in the way I do in m1) are relevant I was quite sure that they made sense: library("lme4") m1 <- afex::lmer_alt(angle ~ recipe + (recipe || replicate), cake)
which are different from m1 and equivalent to m4 <- afex::lmer_alt(angle ~ recipe + (0 + recipe || replicate), cake)
and m5 <- afex::lmer_alt(angle ~ recipe + (1|replicate) + (0 + recipe || replicate), cake)
I’m now quite puzzled because AFAICS you and others (but I don’t remember them) use m1 in the afex vignettes and also here.
What is the correct way to specify a lmer_alt model for categorical independent variables?
EDIT (I don’t know how I can edit or delete my question?!): I realized that this is a broader question that is not directly related to lmer_alt but more so to lmer and mixed models in general. So I decided to post it on CrossValidated.