Learn R Programming

WH (version 2.0.0)

predict.WH_1d: Predict new values using a fitted 1D WH model

Description

Extrapolate the model for new observations.

Usage

# S3 method for WH_1d
predict(object, newdata = NULL, ...)

Value

An object of class "WH_1d" with additional components for model prediction.

Arguments

object

An object of class "WH_1d" returned by the WH() 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

Examples

Run this code

object <- WH(portfolio_mort$d, portfolio_mort$ec)
object_extra <- predict(object, newdata = 40:99)
plot(object_extra)

Run the code above in your browser using DataLab