Learn R Programming

ProfileLadder (version 0.2.2)

plot.profilePredict: Plotting Predicted Run-Off Diagonal

Description

The function provides a graphical visualization of a 1-step-ahead prediction for the functional (development) profiles (so called new running diagonal) obtained by the S3 method predict() applied to the output of the PARALLAX, REACT, or MACRAME algorithm---the R functions parallelReserve() or mcReserve().

Usage

# S3 method for profilePredict
plot(
  x,
  xlab = "Development period",
  ylab = "Cumulative claims",
  main = "",
  trueProfiles = NULL,
  default.legend = TRUE,
  ...
)

Value

A graph with the observed functional development profiles from the input run-off triangle and the predicted new running diagonal (1-step-ahead prediction)

Arguments

x

an object of the class profileLadder which is the output form parallelReserve() or mcReserve()

xlab

label for the x axis

ylab

label for the y axis

main

title of the plot

trueProfiles

optional parameter (set to NULL by default) providing true profiles, if available. In such case, the predicted diagonal is also graphically compared with the true profile developments. The parameter can be a vector (of the same length as the number of rows in the run-off triangle) providing true values of the next running diagonal or it can be a matrix (an object of the class matrix or triangle) with the dimensions n x m (where n x n is the dimension of the run-off triangle and m > n).

default.legend

logical to indicate whether a default plot legend (utilizing the information from the R class profileLadder) should be provided (DEFAULT)

...

other graphical parameters to plot

See Also

[parallelReserve(), mcReserve(), predict.profileLadder()

Examples

Run this code
## new running diagonal provided by PARALLAX
print(CameronMutual)
plot(predict(parallelReserve(CameronMutual)))

## new running diagonal with the true profiles
print(covid19CZ)
plot(predict(mcReserve(covid19CZ[,4:7])), trueProfiles = covid19CZ)

Run the code above in your browser using DataLab