# Formula symbols for mixed model using lme4 [duplicate]

This question already has an answer here:

I often confuse symbols :, |, / and * in the R formulas, particularly when fitting mixed models with lme4. Can somebody explain clearly the differences between them?

Later edit by @amoeba (Jan 2018): this question had a long and extremely confusing R code. I cut it all out for the benefit of future readers. Please see edit history if interested.

## merged by gung - Reinstate Monica♦Jan 31 '18 at 0:58

This question was merged with R's lmer cheat sheet because it is an exact duplicate of that question.

• Just to link to a related thread where Mike Lawrence provided a pretty nice overview of R's formula for mixed-effects models. – chl Nov 15 '11 at 21:19