Skip to content

Instantly share code, notes, and snippets.

@mbannert
Created October 6, 2017 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbannert/a8dc43ba6329552e7a680d383519d450 to your computer and use it in GitHub Desktop.
Save mbannert/a8dc43ba6329552e7a680d383519d450 to your computer and use it in GitHub Desktop.
library(MASS)
set.seed(123)
m <- mvrnorm(10000, mu = c(20,2.6),
Sigma = matrix(c(8,0.85,0.85,.57),
ncol = 2),
empirical = TRUE)
disp <- m[,1]
wt <- m[,2]
am <- rbinom(10000,1,.4)
cyl <- sample(c(4,6,8),
10000,
replace = T,
prob = c(.2,.4,.4))
e <- rnorm(10000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment