plot.WH_2d {WH}R Documentation

Plot Method for a Whittaker-Henderson Fit

Description

Plot Method for a Whittaker-Henderson Fit

Usage

## S3 method for class 'WH_2d'
plot(x, what = "y_hat", trans, ...)

Arguments

x

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

what

Should be one of y_hat (the default) for model fit, std_y_hat for the associated standard deviation, 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

Value

A plot representing the desired element from the fit...

Examples

keep_age <- which(rowSums(portfolio_LTC$ec) > 5e2)
keep_duration <- which(colSums(portfolio_LTC$ec) > 1e3)

d  <- portfolio_LTC$d[keep_age, keep_duration]
ec <- portfolio_LTC$ec[keep_age, keep_duration]

fit <- WH_2d(d, ec)
plot(fit)
plot(fit, "std_y_hat")


[Package WH version 1.1.1 Index]