\begin{Schunk}
\begin{Sinput}
 ss0 <- smooth.spline(x, y, all.knots = TRUE)
 ss0
\end{Sinput}
\begin{Soutput}
Call:
smooth.spline(x = x, y = y, all.knots = TRUE)

Smoothing Parameter  spar= 0.918557  lambda= 0.0001279235 (14 iterations) 
Equivalent Degrees of Freedom (Df): 11.33271 
Penalized Criterion: 53.2251 
GCV: 0.6770015 
\end{Soutput}
\begin{Sinput}
 ss0a <- smooth.spline(x, y, all.knots = T, cv = TRUE)
 ss0a
\end{Sinput}
\begin{Soutput}
Call:
smooth.spline(x = x, y = y, cv = TRUE, all.knots = T)

Smoothing Parameter  spar= 0.9086429  lambda= 0.0001083533 (13 iterations) 
Equivalent Degrees of Freedom (Df): 11.75724 
Penalized Criterion: 52.75363 
PRESS: 0.67302 
\end{Soutput}
\begin{Sinput}
 ss0a <- smooth.spline(x, y, all.knots = TRUE, df = 7)
 ss0a
\end{Sinput}
\begin{Soutput}
Call:
smooth.spline(x = x, y = y, df = 7, all.knots = TRUE)

Smoothing Parameter  spar= 1.052917  lambda= 0.001194488 (11 iterations) 
Equivalent Degrees of Freedom (Df): 7.000742 
Penalized Criterion: 77.90035 
GCV: 0.9007006 
\end{Soutput}
\begin{Sinput}
 ss1 <- smooth.spline(x, y, all.knots = TRUE, spar = 0.5)
 ss1
\end{Sinput}
\begin{Soutput}
Call:
smooth.spline(x = x, y = y, spar = 0.5, all.knots = TRUE)

Smoothing Parameter  spar= 0.5  lambda= 1.209908e-07 
Equivalent Degrees of Freedom (Df): 49.81667 
Penalized Criterion: 28.79416 
GCV: 1.143367 
\end{Soutput}
\begin{Sinput}
 ss2 <- smooth.spline(x, y, all.knots = FALSE, nknots = 4)
 print(ss2)
\end{Sinput}
\begin{Soutput}
Call:
smooth.spline(x = x, y = y, all.knots = FALSE, nknots = 4)

Smoothing Parameter  spar= -0.1997111  lambda= 1.169087e-05 (15 iterations) 
Equivalent Degrees of Freedom (Df): 5.981517 
Penalized Criterion: 158.3074 
GCV: 1.790914 
\end{Soutput}
\begin{Sinput}
 ss3 <- smooth.spline(x, y, cv = TRUE)
\end{Sinput}
\end{Schunk}
