Extends a fitted spline to predict behavior at new data points.
USAGE:
predict.smooth.spline(object, x, deriv)
REQUIRED ARGUMENTS:
object:
a fitted smooth.spline object.
OPTIONAL ARGUMENTS:
x:
the new values of x; the fit is linear beyond the range of the original x values.
deriv:
the order of derivative required---default is 0, or the function itself.
VALUE:
a list with components x and y; the x component is identical to the input x sequence, the y component is the fitted derivative of order deriv.
DETAILS:
This function is a method for the generic function
predict
for class
"smooth.spline".
It can be invoked by calling
predict
for an object of the appropriate class, or directly by calling
predict.smooth.spline
regardless of the class of the object.
fit <- smooth.spline(x, y) # smooth.spline fit
x2 <- seq(from=-100, to=100, length=1000) # a fine grid of points
fit2 <- predict(fit, x2) # evaluate fit at x2