\HeaderA{initial.sp}{Starting values for multiple smoothing parameter estimation.}{initial.sp}
\keyword{models}{initial.sp}
\keyword{smooth}{initial.sp}
\keyword{regression}{initial.sp}
\begin{Description}\relax
Finds initial smoothing parameter guesses for multiple smoothing
parameter estimation. The idea is to find values such that the estimated
degrees of freedom per penalized parameter should be well away from 0 and 1
for each penalized parameter, thus ensuring that the values are in a region of
parameter space where the smoothing parameter estimation criterion is varying
substantially with smoothing parameter value.
\end{Description}
\begin{Usage}
\begin{verbatim}
initial.sp(X,S,off)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{X}] is the model matrix.
\item[\code{S}] is a list of of penalty matrices. \code{S[[i]]} is the ith penalty matrix, but note
that it is not stored as a full matrix, but rather as the smallest square matrix including all 
the non-zero elements of the penalty matrix. Element 1,1 of \code{S[[i]]}  occupies 
element \code{off[i]}, \code{off[i]} of the ith penalty matrix. Each \code{S[[i]]} must be 
positive semi-definite.  
\item[\code{off}] is an array indicating the first parameter in the parameter vector that is 
penalized by the penalty involving \code{S[[i]]}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Basically uses a crude approximation to the estimated degrees of
freedom per model coefficient, to try and find smoothing parameters which
bound these e.d.f.'s away from 0 and 1.

Usally only called by \code{\LinkA{magic}{magic}} and \code{\LinkA{gam}{gam}}.
\end{Details}
\begin{Value}
An array of initial smoothing parameter estimates.
\end{Value}
\begin{Author}\relax
Simon N. Wood \email{simon.wood@r-project.org}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{magic}{magic}},
\code{\LinkA{gam.outer}{gam.outer}},
\code{\LinkA{gam}{gam}},
\end{SeeAlso}

