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