I have a model such as:
mymod = lmer(y ~ x1 + x2 + (x1 | id) , data = mydata)
I know I can get the model matrix from the fitted object using getME but is there a way to obtain the model matrix for the fixed effects without first fitting the model: