predict.WH_1d: Prediction for a Whittaker-Henderson Fit

View source: R/main.R

predict.WH_1dR 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 "WH_1d" returned by the WH_1d() function

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)


WH documentation built on Sept. 11, 2024, 9:12 p.m.