Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mark-andrews/bdb9171743d1191b51d39a814dfb938f to your computer and use it in GitHub Desktop.
Save mark-andrews/bdb9171743d1191b51d39a814dfb938f to your computer and use it in GitHub Desktop.
set.seed(10101) # Omit or change this if you like
N <- 25
x_1 <- rnorm(N)
x_2 <- rnorm(N)
beta_0 <- 1.25
beta_1 <- 1.75
beta_2 <- 2.25
mu <- beta_0 + beta_1 * x_1 + beta_2 * x_2
y <- mu + rnorm(N, mean=0, sd=1.75)
Df <- tibble(x_1, x_2, y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment