Guest User

Untitled

a guest
Apr 26th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. n <- 100000
  2. x <- matrix(NA, nrow <- 3, ncol=n)
  3. x[,1] <- c(1, 1, 1)
  4.  
  5. for(i in 2:n) {
  6. x[1,i]<- rexp(1, rate = 1+x[2,i-1] * x[3,i-1])
  7. x[2,i]<- rexp(1, rate = 2+x[1,i] * x[3,i-1])
  8. x[3,i]<- rexp(1, rate = 3+x[1,i] * x[2,i])
  9. }
Add Comment
Please, Sign In to add comment