\begin{Schunk}
\begin{Sinput}
 ## Generate 100 cases
 N <- 100
 ## X is normally distributed with a mean of 0 and a sd of 10
 ## Y = b0 + b1*X + e
 b0 <- 30
 b1 <- 2
 e.sigma <- 5
 x.mu <- 0
 x.sigma <- 5
 ## e = N(0, e.sigma^2)
 error <- rnorm(N, 0, e.sigma)
 x <- rnorm(N, x.mu, x.sigma)
 dtest <- data.frame(x = x,
                      y = b0 + b1 * x + error,
                      ynoe = b0 + b1 * x)
 head(dtest)
\end{Sinput}
\begin{Soutput}
          x        y     ynoe
1  1.278349 39.82345 32.55670
2 -1.088651 20.58299 27.82270
3  6.819867 45.73093 43.63973
4  6.390948 38.18484 42.78190
5 -3.679375 26.32133 22.64125
6 -8.880630  8.06160 12.23874
\end{Soutput}
\end{Schunk}
