[R-sig-ME] design matrix for mixed effects model

Andreas Böck andreas.boeck at tum.de
Tue Jan 11 08:59:48 CET 2011


Hi Wade,
For a model y ~ x1 + x2 + (x1 + x2 | id)
you get the random effects design matrix via

model.matrix(~ 0 + id + (x1 + x2):id)

Best,
Andi




More information about the R-sig-mixed-models mailing list