[R] How to simulate heteroscedasticity (correlation)

Jörg Groß joerg at licht-malerei.de
Tue Jul 22 20:59:00 CEST 2008


I would like to generate two correlated variables.

I found that funktion for doing that:
a <- rmvnorm(n=10000,mean=c(20,20),sigma=matrix(c(5,0.8*sqrt(50),  
(using library(mvtnorm))

Now I also want to generate two correlated variables where the error  
variance vary over the variable-correlation.
And I want to plot this for showing heteroscedasticity.

Like shown here:

Is that possible with R?

More information about the R-help mailing list