I stumbeled upon the stats::model.matrix
function in R. In the description it sais that it would create a design matrix. It gives me a weired number of rows, which does not correspend to neither the number of observations in my data, nor the number of parameters in my model.
What is a design matrix / model matrix?
Here is how i used it:
M03b <- glmer(APMs ~ PrePost + Gf + eyeFRF + (1|content) + (eyeFRF|ID), data=mlmData, family=binomial("logit"))
X <- model.matrix(M03b)
it gives me a 2895x4 Matrix. ID has 105 levels and content 28, so the number of rows does not make much sense to me. Maybe missing values are an issue?