Rev 7231 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{predict.bs}\title{Evaluate a Spline Basis}\alias{predict.bs}\alias{predict.ns}\description{Evaluate a predefined spline basis at given values.}\usage{predict.bs(object, newx, \dots)predict.ns(object, newx, \dots)}\arguments{\item{object}{the result of a call to \code{\link{bs}()} or\code{\link{ns}()} having attributes describing \code{knots},\code{degree}, etc.}\item{newx}{the \code{x} values at which evaluations are required.}\item{\dots}{Optional additional arguments. Presently no additionalarguments are used.}}\value{An object just like \code{basis}, except evaluated at the new valuesof \code{x}.These are methods for the generic function \code{\link{predict}()} forobjects inheriting from classes \code{bs} or \code{ns}. See\code{\link{predict}} for the general behavior of this function.}\seealso{\code{bs}, \code{ns}, \code{poly}, \code{lo}, \code{s}}\examples{library(splines)data(women)basis <- ns(women$height, df = 5)newX <- seq(58, 72, len = 51)# evaluate the basis at the new datapredict(basis, newX)}\keyword{smooth}