design matrix for mixed effects model
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
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