I’m currently working on analysing a few multilevel educational interventions which I would really like to simulate some data to think through the planned statistical analysis. I’ve reviewed the “Diagnosing multilevel models” topic, but I’m struggling to adapt the suggested code to a pretest postest multilevel design. A basic example case is:
- 12 students are clustered in 150 schools (1800 students in total)
- Pre and Posttest scores are assumed to be normally distributed, with a correlation of 0.5
- ICC of 0.15
- Randomisation at the school-level (so fitted using a varying intercept model)
Generally I can understand how to simulate a dataset with the correct structure, but struggle more on declaring the outcomes. I do have some ideas to increase the complexity of these simulated designs (e.g. adding subgroups, switching to a multisite design with individual level randomisation to allow modelling varying slopes etc), but I would like to get my head round the basics first. Any suggestions would be very gratefully received.