predict.hero_bspline {hero}R Documentation

Predict method for hero_bspline object

Description

Predicted values based on object created by bspline.

Usage

## S3 method for class 'hero_bspline'
predict(object, newx, nderiv = 0L, sparse = TRUE, ...)

Arguments

object

A hero_bspline object created by bspline

newx

A numeric vector of values at which to evaluate the B-spline functions or derivatives.

nderiv

An integer value specifying the derivative order of the B-splines. The default is 0.

sparse

A logical value indicating if the result should be a sparse version of the Matrix-class.

...

Not currently implemented.

Value

An n \times k matrix (or Matrix-class object if sparse = TRUE), where n is the number of values in newx and k is the number of basis functions in object. Each row gives the predicted values of the basis functions for the appropriate value of newx.

See Also

bspline

Examples

b = bspline(nbasis = 10)
p = predict(b, newx = seq(0, 1, len = 101))

[Package hero version 0.6 Index]