Guest User

Untitled

a guest
Dec 17th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. # Multiple Regression Code Supplement
  2. # Michael B. Morrissey and Graeme D. Ruxton
  3.  
  4. library(mvtnorm)
  5. library(ellipse)
  6.  
  7. n <- 200
  8. cov_mat <- matrix(c(1, 0.5, 0.5, 1), 2, 2)
  9. x <- rmvnorm(n, c(0, 0), cov_mat)
  10. x1 <- x[,1]
  11. x2 <- x[,2]
  12. y <- rnorm(n, 0.5*x1, sqrt(0.75))
Add Comment
Please, Sign In to add comment