Skip to content
Prev 82108 / 398513 Next

Simulate Correlated data from complex sample

It may help to recall the following:

	  var(X) = var{E(X|School)} + E{var(X|School)}.

	  The first term here is the between-group covariance matrix, while the 
second is the within group covariance matrix.  Decide how you want to 
decompose var(X), and use mvrnorm{MASS} or rmvnorm{mvtnorm} for each, 
combining them as you've outlined below.

	  Does this make sense?
	  spencer graves
Doran, Harold wrote: