predict.smooth.spline
Smoothing Spline at New Data
Description
Uses a fitted spline to predict behavior at new data points.
Usage
## S3 method for class 'smooth.spline':
predict(object, x, deriv)
Arguments
object |
a smooth.spline object, as created by the smooth.spline function.
|
x |
the new values of x. The fit is linear beyond the range of the original x values.
|
deriv |
the order of derivative required. The default is 0 (the spline function itself).
|
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 x of class smooth.spline or a subclass thereof. It cannot be called directly.
Value
returns a list with the components
x and
y.
- The x component is identical to the input x sequence.
- The y component is the derivative of order deriv
of the fitted spline function at the values in x.
See Also
Examples
ss <- with(Sdatasets::ethanol, smooth.spline(NOx ~ E))
predict(ss, pretty(range(Sdatasets::ethanol$E), 20), deriv = 1)