Predict from Smoothing Spline Fit
Usage
predict.smooth.spline(object, x, deriv=0)
Arguments
object
|
a fit from smooth.spline .
|
x
|
the new values of x.
|
deriv
|
the order of the derivative required.
|
Description
Predict a smoothing spline fit at new points, return the derivative if
desired. The predicted fit is linear beyond the original data.Value
A list with components
x
|
The input x.
|
y
|
The fitted values or derivatives at x .
|
Author(s)
B.D. RipleySee Also
smooth.spline
Examples
data(cars)
attach(cars)
plot(speed, dist)
cars.spl <- smooth.spline(speed, dist, df=5)
lines(predict(cars.spl,seq(0,25, 0.5)))
detach()