Created
October 6, 2017 12:53
-
-
Save mbannert/a8dc43ba6329552e7a680d383519d450 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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