\begin{Schunk}
\begin{Sinput}
 set.seed(123123)
 xnum1 <- rnorm(100)
 xcat2 <- factor(sample(c("Female", "Male"), 100, replace = TRUE))
 z <- factor(sample(c("A","B","C","D"), 100, replace = TRUE))
 y <- rnorm(100)
 mod1 <- lm(y ~ xnum1 + xcat2 + z)
 dat <- model.frame(mod1)
 mod1mm <- model.matrix(mod1)
 dat$y <- mod1mm %*% c(0.1, 0.45, -0.1, 0.2, 0.35, -0.45) + 0.8 *rnorm(100)
 mod1 <- lm(y ~ xnum1 + xcat2 + z, data = dat)
\end{Sinput}
\end{Schunk}
