predict.bs {splines} | R Documentation |
Evaluate a predefined spline basis at given values.
## S3 method for class 'bs'
predict(object, newx, ...)
object |
the result of a call to |
newx |
the |
... |
Optional additional arguments. Presently no additional arguments are used. |
An object just like object
, except evaluated at the new values
of x
.
These are methods for the generic function predict
for
objects inheriting from classes "bs"
or "ns"
. See
predict
for the general behavior of this function.
bs
, ns
, poly
.
data(women)
basis <- ns(women$height, df = 5)
newX <- seq(58, 72, len = 51)
# evaluate the basis at the new data
predict(basis, newX)