\HeaderA{predict.bs}{Evaluate a Spline Basis}{predict.bs}
\aliasA{predict.ns}{predict.bs}{predict.ns}
\keyword{smooth}{predict.bs}
\begin{Description}\relax
Evaluate a predefined spline basis at given values.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'bs':
predict(object, newx, ...)

## S3 method for class 'ns':
predict(object, newx, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] the result of a call to \code{\LinkA{bs}{bs}} or
\code{\LinkA{ns}{ns}} having attributes describing \code{knots},
\code{degree}, etc.
\item[\code{newx}] the \code{x} values at which evaluations are required.
\item[\code{...}] Optional additional arguments.  At present no additional
arguments are used.
\end{ldescription}
\end{Arguments}
\begin{Value}
An object just like \code{object}, except evaluated at the new values
of \code{x}.

These are methods for the generic function \code{\LinkA{predict}{predict}} for
objects inheriting from classes \code{"bs"} or \code{"ns"}.  See
\code{\LinkA{predict}{predict}} for the general behavior of this function.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{bs}{bs}}, \code{\LinkA{ns}{ns}}, \code{\LinkA{poly}{poly}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
require(stats)
basis <- ns(women$height, df = 5)
newX <- seq(58, 72, len = 51)
# evaluate the basis at the new data
predict(basis, newX)
\end{ExampleCode}
\end{Examples}

