```Date: Tue, 6 May 2008 15:44:14 -0400 Reply-To: Cordelia Flynn Sender: "SAS(r) Discussion" From: Cordelia Flynn Subject: Simulating variance components + Cholesky When simulating a data vector, why do we use the square roots of the variance components ? For example, to simulate both variance components of a simple mixed effects model, suppose the between-subject variance is 3, while the within-subject variance is 10. So assuming b ~ n(0,sig2B), e ~ n(0,sig2), the data vector has form, y = mu + beta + a + e. Then sample code to generate, say, 100 records of 2-level treatment data can have form: data a; do sim=1 to 100; do beta=1 to 2; a=rannor(0)*sqrt(3); do n=1 to 5; e=rannor(0)*sqrt(10); y = 100 + beta + a + e; output; end; end; end; So why have the square root of the var comps instead of the whole term ? Also, what role does the Cholesky decomposition play in data simulation? Any references ? Thanks Friends, Cordelia Flynn Lancaster, PA ```

Back to: Top of message | Previous page | Main SAS-L page