Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. set.seed(123)
  2. x <- rnorm(100)
  3. y = 4 + (1.5*x) + rnorm(100, sd = 2)
  4. DF <- data.frame(x = x,
  5. y = 4 + (1.5*x) + rnorm(100, sd = 2),
  6. b = as.factor(round(abs(x/3))),
  7. c = as.factor(round(abs(y/3)))
  8. )
  9.  
  10.  
  11. m1 <- lm(y ~ b*c, data = DF)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement