[R-sig-ME] Simulating multilevel dataset
Joshua Wiley
jwiley.psych at gmail.com
Fri Jul 5 19:52:27 CEST 2013
Hi Stuart,
Back when I worked at UCLA, I wrote a page where I simulated a three
level dataset, perhaps it will be useful to you:
http://www.ats.ucla.edu/stat/r/pages/mesimulation.htm
Cheers,
Josh
On Fri, Jul 5, 2013 at 9:03 AM, Stuart Luppescu <slu at ccsr.uchicago.edu> wrote:
> Hello, I'm trying to simulate a multilevel dataset representing teachers
> within schools. To generate the data I'm using parameters from actual
> data. I have the means, variances and covariances of teachers on two
> variables; and the means, variances and covariances of the school-level
> means for those two variables. I can generate the teacher-level data,
> and the school-level data using rmvnorm() with no problem, but what I
> can't figure out is how to generate teacher-level data conditional on
> the school-level generated data.
>
> Can anyone give me a clue?
>
> TIA.
> --
> Stuart Luppescu <slu at ccsr.uchicago.edu>
> University of Chicago
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
--
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://joshuawiley.com/
Senior Analyst - Elkhart Group Ltd.
http://elkhartgroup.com
More information about the R-sig-mixed-models
mailing list