\Header{Predict.matrix}{Prediction methods for smooth terms in a GAM}
\alias{Predict.matrix.cr.smooth}{Predict.matrix}
\alias{Predict.matrix.cyclic.smooth}{Predict.matrix}
\alias{Predict.matrix.tensor.smooth}{Predict.matrix}
\alias{Predict.matrix.tprs.smooth}{Predict.matrix}
\keyword{models}{Predict.matrix}
\keyword{smooth}{Predict.matrix}
\keyword{regression}{Predict.matrix}
\begin{Description}\relax
Takes \code{smooth} objects produced by \code{smooth.construct} methods and obtains the matrix mapping 
the parameters associated with such a smooth to the predicted values of the smooth at a set of new covariate values.
\end{Description}
\begin{Usage}
\begin{verbatim}
Predict.matrix(object,data)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] is a smooth object produced by a \code{smooth.construct} method function. The object 
contains all the information required to specify the basis for a term of its class, and this information is
used by the appropriate \code{Predict.matrix} function to produce a prediction matrix for new covariate values.
Further details are given in \code{\Link{smooth.construct}}.
\item[\code{data}] A data frame containing the values of the (named) covariates at which the smooth term is to be 
evaluated.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Smooth terms in a GAM formula are turned into smooth specification objects of 
class \code{xx.smooth.spec} during processing of the formula. Each of these objects is
converted to a smooth object using an appropriate \code{smooth.construct} function. The \code{Predict.matrix} 
functions are used to obtain the matrix that will map the parameters associated with a smooth term to
the predicted values for the term at new covariate values.

Note that new smooth classes can be added by writing a new \code{smooth.construct} method function and a 
corresponding \code{\Link{Predict.matrix}} method function: see the example code provided for 
\code{\Link{smooth.construct}} for details.
\end{Details}
\begin{Value}
A matrix which will map the parameters associated with the smooth to the vector of values of the smooth 
evaluated at the covariate values given in \code{object}.
\end{Value}
\begin{Author}\relax
Simon N. Wood \email{simon@stats.gla.ac.uk}
\end{Author}
\begin{References}\relax
Wood, S.N. (2000)  Modelling and Smoothing Parameter Estimation
with Multiple  Quadratic Penalties. J.R.Statist.Soc.B 62(2):413-428

Wood, S.N. (2003) Thin plate regression splines. J.R.Statist.Soc.B 65(1):95-114

Wood, S.N. (in press) Stable and efficient multiple smoothing parameter estimation for
generalized additive models. J. Amer. Statist. Ass.


\url{http://www.stats.gla.ac.uk/~simon/}
\end{References}
\begin{SeeAlso}\relax
\code{\Link{gam}},\code{\Link{gamm}}, \code{\Link{smooth.construct}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}# See smooth.construct examples
\end{ExampleCode}
\end{Examples}

