\begin{Schunk}
\begin{Sinput}
 mymod8 <- lm(y ~ rcs(x, 8))
 predict8 <- predict(mymod8, newdata = data.frame(x = newx))
 plot(x, y, main = "8 Knots! Using lm(y~rcs(x,8))", pch = 16)
 lines(newx, predict8)
\end{Sinput}
\end{Schunk}
