Learn R Programming

spBayesSurv (version 1.1.1)

predict.b_spline: Evaluate a Cubic Spline Basis

Description

Evaluate a predefined spline basis at given values.

Usage

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

Arguments

object

the result of a call to b_spline having attributes describing knots, degree, etc..

newx

the x values at which evaluations are required.

...

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

Examples

Run this code
# NOT RUN {
require(stats)
basis <- b_spline(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