Is there some sort of memory-efficient approximate solution? What if all of the off-diagonal elements of the covariance matrix are equal to $\alpha$ and all of the diagonal elements are equal to $\sigma^2$? An implementation in R would be terrific.

For additional context, the MVN has a dimension around 70000 and has a dense covariance matrix. I've tried using the standard multivariate normal packages in R but even on a machine with a lot of memory can't realistically sample from MVNs with more than a few thousand elements. I'm running simulations to test for coverage and power of parameter estimates in settings where there's high covariance between observations, and it would be helpful if I could exactly specify the covariance matrix I want to use.

  • $\begingroup$ It's quite straightforward. Is this an exercise for some class? $\endgroup$ – Glen_b Oct 30 '17 at 8:14
  • 1
    $\begingroup$ Note that this covariance structure is that of a random-intercept model, so you can simply simulate data from a random intercept model that has the corresponding covariances and variances. $\endgroup$ – Glen_b Oct 30 '17 at 9:30
  • $\begingroup$ Thanks for the response Glen_b. I've tried to find a reference for simulating data from random intercept models but can't find a solution that doesn't run into the same problem. I'm adding more context to the original question. $\endgroup$ – user3072995 Nov 5 '17 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.