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