Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set.seed(123)
- x <- rnorm(100)
- y = 4 + (1.5*x) + rnorm(100, sd = 2)
- DF <- data.frame(x = x,
- y = 4 + (1.5*x) + rnorm(100, sd = 2),
- b = as.factor(round(abs(x/3))),
- c = as.factor(round(abs(y/3)))
- )
- m1 <- lm(y ~ b*c, data = DF)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement