Skip to content
Prev 16390 / 20628 Next

Simulating linear mixed model data for factorial design with 3 levels

Dear list,

I struggle to simulate linear mixed model data for a within-subject
within-item factorial design (with crossed participant and item effects)
where the categorical independent variable has three levels.

The default parameters correspond to the estimates I got from an analysis
of previous data.
As I am using the mvrnorm() function with empirical = TRUE I expected that
the estimated parameters from lmer and my specified parameters for the
simulation would match closely.
However, they differ more than I expected.

I would be grateful if somebody more experienced in mixed model simulations
could have a look at my R code on Cross Validate:
https://stats.stackexchange.com/q/335643/136579


Best Regards,

Maarten