predict.bSpline
Evaluate a Spline at New Values of x

Description

Generic methods to evaluate a spline at new values of x for class spline.

Usage

predict.bSpline(object, x, nseg = 50, deriv = 0, ...)
## S3 method for class 'bSpline':
predict(object, x, nseg = 50, deriv = 0, ...) 
## S3 method for class 'nbSpline':
predict(object, x, nseg = 50, deriv = 0, ...) 
## S3 method for class 'pbSpline':
predict(object, x, nseg = 50, deriv = 0, ...) 
## S3 method for class 'npolySpline':
predict(object, x, nseg = 50, deriv = 0, ...) 
## S3 method for class 'ppolySpline':
predict(object, x, nseg = 50, deriv = 0, ...) 

Arguments

object an object that inherits from class spline.
x a numeric vector, or any object that can be coerced to a numeric vector, at which to evaluate the spline. If this argument is missing, a sequence of length nseg+1 covering the range of the knots, excluding the outer knots created for the B-spline representation, is generated.
nseg an integer used when x is missing. Indicates the number of segments for the default value x.
deriv a positive integer indicating the order of derivative required. By default, derive is 0. Must be smaller than splineOrder(object).
... additional arguments to be passed to or from future functions.

Details

When predict.bSpline is used to make predictions outside of the range of x, the values predict.npolySpline and predict.nbSpline, which are used to create the spline, linearly extrapolate, using the values and derivatives of the spline at its edges.
Value
returns a list of objects of class "xyVector", with x and y vector components.
xthe supplied value of x, or the inferred value from object.
ythe values of the spline evaluated at x.
See Also
predict, xyVector, splineKnots, splineOrder.
Examples
i <- interpSpline(c(1,2,3,4),c(5,9,11,12))
predict(i, x=seq(1,4,by=1/4))
Package splines version 6.1.1-7
Package Index