Learn R Programming

WH (version 2.0.0)

plot.WH_1d: Plot 1D WH fit

Description

Plot 1D WH fit

Usage

# S3 method for WH_1d
plot(x, what = "fit", trans, ...)

Value

A plot representing the desired element of the fit

Arguments

x

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

what

What should be plotted. Should be one of fit (the default), res for residuals and edf for the effective degrees of freedom.

trans

An (optional) transformation to be applied to the data. By default the identity function

...

Not used

Examples

Run this code
d <- portfolio_mort$d
ec <- portfolio_mort$ec

WH(d, ec) |> plot()
WH(d, ec) |> plot("res")
WH(d, ec) |> plot("edf")

Run the code above in your browser using DataLab