Learn R Programming

spBayesSurv (version 1.1.8)

predict.bspline: Evaluate a Cubic Spline Basis

Description

Evaluate a predefined spline basis at given values.

Usage

# S3 method for bspline
predict(object, newx, ...)

Arguments

object

the result of a call to bspline having attributes describing knots, df, etc..

newx

the x values at which evaluations are required.

...

Optional additional arguments. At present no additional arguments are used.

Author

Haiming Zhou and Timothy Hanson

See Also

bspline

Examples

Run this code
require(stats)
basis <- bspline(women$height, df = 5)
newX <- seq(58, 72, length.out = 51)
# evaluate the basis at the new data
predict(basis, newX)

Run the code above in your browser using DataLab