\HeaderA{cv.cggd}{Computes K-fold cross-validated error curve for cggd}{cv.cggd}
\keyword{regression}{cv.cggd}
\begin{Description}\relax
Computes the K-fold cross-validated mean squared prediction error for
cggd.
\end{Description}
\begin{Usage}
\begin{verbatim}
cv.cggd(x, y, nfolds = 6, kmax=40 , 
           trace = FALSE, plot.it = TRUE, se=TRUE, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] Input to cggd
\item[\code{y}] Input to cggd
\item[\code{nfolds}] Number of folds
\item[\code{kmax}] Max number of iterations per model
\item[\code{trace}] Show computations
\item[\code{plot.it}] Plot it
\item[\code{se}] Include standard error bands
\item[\code{...}] Additional arguments to \code{cggd}
\end{ldescription}
\end{Arguments}
\begin{Value}
\begin{ldescription}
\item[\code{cv}] The CV loss curve at each value of k
\item[\code{cv.error}] The standard error of the CV curve
\end{ldescription}
\end{Value}
\begin{Author}\relax
Cun-Hui Zhang and Ofer Melnik
\end{Author}
\begin{References}\relax
Cun-Hui Zhang (2007) "Continuous Generalized Gradient Descent" \emph{Journal of Computational and Graphical Statistics}
; see also \url{http://stat.rutgers.edu/~cunhui/software/CGGD.html}.
\end{References}
\begin{Examples}
\begin{ExampleCode}
data(Wine)
attach(Wine)
cv.cggd(x.learning,y.learning,kmax=40,fctr=1e3)
detach(Wine)
\end{ExampleCode}
\end{Examples}

