predict.bs(basis, newx) predict.ns(basis, newx)
basis
|
the result of a call to bs() or ns() , in
particular, having attributes describing knots , degree
etc.
|
newx
|
the x values at which evaluations are required.
|
basis
, except evaluated at the new values
of x
.
These are methods for the function predict()
for objects
inheriting from classes bs
or ns
. See predict
for the general behavior of this function.
bs
, ns
, poly
, lo
, s
basis <- ns(x, knots=c(3,6), B=c(0,5)) #generate a basis basis.eval <- predict(basis, newx)