Learn R Programming

WH (version 2.0.0)

predict.WH_2d: Predict new values using a fitted 2D WH model

Description

Extrapolate the model for new observations in a way that is consistent with the fitted values

Usage

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

Value

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

Arguments

object

An object of class "WH_2d" returned by the WH() function

newdata

A list containing two vectors indicating the new observation positions

...

Not used

Examples

Run this code
object <- WH(portfolio_LTC$d, portfolio_LTC$ec)
object_extra <- predict(object, newdata = list(age = 60:109, duration = 0:19))
plot(object_extra)

Run the code above in your browser using DataLab