\HeaderA{cggd}{Fits Continuous Generalized Gradient Descent models}{cggd}
\keyword{regression}{cggd}
\begin{Description}\relax
These CGGD models all provide the entire sequence of
coefficients and fits, to the least squares fit. This package is based on the lars package.
\end{Description}
\begin{Usage}
\begin{verbatim}
cggd(x, y, beta0 = rep(0,2), kmax = 300, 
                      TRR=FALSE, t0 = 1, TRACE=FALSE,
                      alpha1 = 0, alpha2 = 0, w = 1, 
                      tau = 1, tautil = -1, eps = -1, fctr=1e8)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] matrix of predictors

\item[\code{y}] response 

\item[\code{beta0}] initial coefficient values

\item[\code{kmax}] the maximum number of steps

\item[\code{TRACE}] If TRUE, cggd prints out its progress

\item[\code{TRR}] If TRUE builds a Threshold Ridge Regression (TRR) model.
If FALSE builds a Functional Gradient Descent Kernel model.

\item[\code{t0}] The initial time in the TRR model.

\item[\code{alpha1,alpha2,w}] Values used in kernel generation.

\item[\code{tau,tautil,eps}] Values used in variable selection.

\item[\code{fctr}] Used to tune the search routine. Smaller values tighten the search (more sampling).

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
CGGD is a general method for performing different types of regressions while continuously varying regularization 
and other parameters (similar to LARS but broader). It returns the models fit along the continuous paths of parameter modification.
Note that y is automatically centered and x is centered and normalized.
\end{Details}
\begin{Value}
A "cggd" object is returned, for which plot and predict
methods exist.

Some significant componenets of the object are:
\begin{ldescription}
\item[\code{beta.tk}] The coefficients of the model at the different steps (k).
\item[\code{tk}] The \emph{time} at the different steps (k).
\item[\code{a.set.tk}] The active coefficients of the model at the different steps (k).
\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{SeeAlso}\relax
plot, and predict methods for cggd, and  cv.cggd
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(housing)
attach(housing)
object <- cggd(x,y)
plot(object)
object2 <- cggd(x,y,TRR=TRUE)
plot(object2)
detach(housing)
\end{ExampleCode}
\end{Examples}

