Hello,


I want to create 2 variables with normal distribution that the correlation 
between them is equal to 0.8 and also each one has a serial correlation equal 
to 0.6.



To generate variables with correlation between them I use:



t1<-10

N<-45

sigma2<-matrix(c(1,0.8*sqrt(1),0.8*sqrt(1),1),2,2)

x<matrix(rep(rmvnorm(t1,mean=rep(0,nrow(sigma2)),sigma=sigma2),N),nr=n,nc=2)



My problem is that I don't know how to impose the serial correlation in this 
case.



Does somebody has any suggestion?

Thanks in advance



Alexandra

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to