I'd like to use R to generate two correlated series that follow IMA(1,1) process.
rho is a correlation between the error terms, but when I changed the rho the plot does not change. Is it wrong if I use
d[i,] <- d[i-1,] - theta*(e[i-1,]+e[i,]) ?
rho < 0.1 mu <- c(400,400) theta <- c(0.1,0.1) d <- ts(matrix(0,ncol=2,nrow=1001)) e <- ts(rmvnorm(1001,sigma=cbind(c(400,rho*400),c(rho*400,400)))) for(i in 2:1001) d[i,] <- mu + d[i-1,] - theta*(e[i-1,]+e[i,]) plot(d)