Skip to content
Prev 11730 / 20628 Next

Simulating hierarchical data with correlated errors

The help page for the simfun function in the TeachingDemos package has
some examples of simulating hierarchical data.  Just replace the calls
to rnorm with calls to mvrnorm from the MASS package with the
correlation structure that you want and you will have a tool to
simulate hierarchical data with correlated errors.

If you want better help than that then you will need to at minimum ask
a question.  But you should read through the posting guide (link at
the bottom of this message and all messages on the list) to learn how
to ask a good question that will have the best chance of leading to a
good answer.
On Tue, Apr 1, 2014 at 4:17 AM, Raluca Gui <raluca.gui at gmail.com> wrote: