predict.WH_1d {WH} | R Documentation |
Prediction for a Whittaker-Henderson Fit
Description
Extrapolate the Whittaker-Henderson fit for new observations.
Usage
## S3 method for class 'WH_1d'
predict(object, newdata = NULL, ...)
Arguments
object |
An object of class |
newdata |
A vector containing the position of new observations. Observations from the fit will automatically be added to this, in the adequate order |
... |
Not used |
Value
An object of class "WH_1d"
with additional components y_pred
and
std_y_pred
corresponding to the model predictions and associated standard
deviations.
Examples
d <- portfolio_mort$d
ec <- portfolio_mort$ec
fit <- WH_1d(d, ec)
newdata = 18:99
pred <- predict(fit, newdata)
plot(pred)
[Package WH version 1.1.1 Index]