Learn R Programming

ChainLadder (version 0.2.19)

plot.clark: Plot Clark method residuals

Description

Function to plot the residuals of the Clark LDF and Cape Cod methods.

Usage

# S3 method for clark
plot(x, ...)

Arguments

x

object resulting from a run of the ClarkLDF or ClarkCapeCod functions.

...

not used.

Author

Daniel Murphy

Details

If Clark's model is appropriate for the actual data, then the standardized residuals should appear as independent standard normal random variables. This function creates four plots of standardized residuals on a single page:

  1. By origin

  2. By age

  3. By fitted value

  4. Normal Q-Q plot with results of Shapiro-Wilk test

If the model is appropriate then there should not appear to be any trend in the standardized residuals or any systematic differences in the spread about the line y = 0. The Shapiro-Wilk p-value shown in the fourth plot gives an indication of how closely the standardized residuals can be considered "draws" from a standard normal random variable.

References

Clark, David R., "LDF Curve-Fitting and Stochastic Reserving: A Maximum Likelihood Approach", Casualty Actuarial Society Forum, Fall, 2003

See Also

ClarkLDF, ClarkCapeCod

Examples

Run this code

X <- GenIns
Y <- ClarkLDF(GenIns, maxage=Inf, G="weibull")
plot(Y)  # One obvious outlier, shapiro test flunked
X[4,4] <- NA  # remove the outlier
Z <- ClarkLDF(GenIns, maxage=Inf, G="weibull")
plot(Z)  # Q-Q plot looks good

Run the code above in your browser using DataLab