Design matrix for MLM from library(lme4) with fixed and random effects
问题 Context of application I have a model with random slopes and intercepts. There are numerous levels of the random effects. The new data (to be predicted) may or may not have all of these levels. To make this more concrete, I am working with music revenue at the album level ( title ). Each album may come in multiple types format2 (CD, vinyl, e-audio, etc). I have measurements for revenue for each album at each type of album. The model is specified as: lmer(physical~ format2+ (0+format2|title))