Type: | Package |
Title: | Tool-Box of Chain Ladder Plus Models |
Version: | 1.0.1 |
Description: | Implementation of the age–period–cohort models for claim development presented in Pittarello G, Hiabu M, Villegas A (2025) “Replicating and Extending Chain‑Ladder via an Age–Period–Cohort Structure on the Claim Development in a Run‑Off Triangle” <doi:10.1080/10920277.2025.2496725>. |
URL: | https://github.com/gpitt71/clmplus, https://gpitt71.github.io/clmplus/ |
BugReports: | https://github.com/gpitt71/clmplus/issues |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Imports: | StMoMo, ChainLadder, stats, ggplot2, forecast, gridExtra, reshape2 |
Encoding: | UTF-8 |
LazyData: | true |
Suggests: | knitr, rmarkdown, apc, dplyr, viridis, tidyr |
VignetteBuilder: | knitr, rmarkdown |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | no |
Packaged: | 2025-07-31 09:23:53 UTC; pwt887 |
Author: | Gabriele Pittarello
|
Maintainer: | Gabriele Pittarello <gabriele.pittarello@uniroma1.it> |
Repository: | CRAN |
Date/Publication: | 2025-07-31 14:40:09 UTC |
Pre-process Run-Off Triangles
Description
Pre-process Run-Off Triangles.
Usage
AggregateDataPP(
cumulative.payments.triangle,
entries.weights = NULL,
eta = 1/2
)
Arguments
cumulative.payments.triangle |
|
entries.weights |
|
eta |
|
Value
An object of class AggregateDataPP
. Lists the following elements:
cumulative.payments.triangle |
|
occurrance |
|
exposure |
|
incremental.payments.triangle |
|
fit.w |
|
J |
|
diagonal |
|
eta |
|
References
Pittarello, G., Hiabu, M., & Villegas, A. M. (2023). Replicating and extending chain-ladder via an age-period-cohort structure on the claim development in a run-off triangle. arXiv preprint arXiv:2301.03858.
Examples
data(sifa.mtpl)
sifa.mtpl.rtt <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl)
Amases GTPL
Description
Dataset of cumulative paid claims for a small italian company in the line of business: general third party liability.
Usage
amases.gtpl
Format
Run-off triangle with 12 development periods.
References
Savelli, Nino, and Clemente, Gian Paolo. "Lezioni di matematica attuariale delle assicurazioni danni." EDUCatt-Ente per il diritto allo studio universitario dell'Università Cattolica, 2014
Amases MOD
Description
Dataset of cumulative paid claims for a small italian company in the line of business: motor or damage.
Usage
amases.mod
Format
Run-off triangle with 12 development periods.
References
Savelli, Nino, and Clemente, Gian Paolo. "Lezioni di matematica attuariale delle assicurazioni danni." EDUCatt-Ente per il diritto allo studio universitario dell'Università Cattolica, 2014
Amases MTPL
Description
Dataset of cumulative paid claims for a small italian company in the line of business: motor third party liability.
Usage
amases.mtpl
Format
Run-off triangle with 12 development periods.
References
Savelli, Nino, and Clemente, Gian Paolo. "Lezioni di matematica attuariale delle assicurazioni danni." EDUCatt-Ente per il diritto allo studio universitario dell'Università Cattolica, 2014
Fit Chain Ladder plus on Run-off Triangles.
Description
Method to Estimate Chain Ladder plus models.
Usage
clmplus(
AggregateDataPP,
hazard.model = NULL,
link = c("log", "logit"),
staticAgeFun = TRUE,
periodAgeFun = "NP",
cohortAgeFun = NULL,
effect_log_scale = TRUE,
constFun = function(ax, bx, kt, b0x, gc, wxt, ages) list(ax = ax, bx = bx, kt = kt, b0x
= b0x, gc = gc),
...
)
Arguments
AggregateDataPP |
|
hazard.model |
|
link |
|
staticAgeFun |
|
periodAgeFun |
|
cohortAgeFun |
|
effect_log_scale |
|
constFun |
|
... |
parameters to be passed to clmplus. |
Value
No return value, called to pass method clmplus.AggregateDataPP
. See clmplus.AggregateDataPP
documentation.
References
Pittarello, Gabriele, Munir Hiabu, and Andrés M. Villegas. "Replicating and extending chain ladder via an age-period-cohort structure on the claim development in a run-off triangle." arXiv preprint arXiv:2301.03858 (2023).
Examples
data(sifa.mtpl)
sifa.mtpl.rtt <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl)
hz.chl=clmplus(sifa.mtpl.rtt, 'a')
Fit Chain Ladder Plus to reverse time triangles.
Description
Method to fit Chain Ladder plus models to AggregateDataPP
objects.
Usage
## S3 method for class 'AggregateDataPP'
clmplus(
AggregateDataPP,
hazard.model = NULL,
link = c("log", "logit"),
staticAgeFun = TRUE,
periodAgeFun = "NP",
cohortAgeFun = NULL,
effect_log_scale = TRUE,
constFun = function(ax, bx, kt, b0x, gc, wxt, ages) list(ax = ax, bx = bx, kt = kt, b0x
= b0x, gc = gc),
...
)
Arguments
AggregateDataPP |
|
hazard.model |
|
link |
|
staticAgeFun |
|
periodAgeFun |
|
cohortAgeFun |
|
effect_log_scale |
|
constFun |
|
... |
parameters to be passed to clmplus. |
Value
An object of class clmplusmodel
. A list with the following elements:
model.fit |
|
apc_input |
|
hazard_scaled_deviance_residuals |
|
fitted_development_factors |
|
fitted_effects |
|
References
Pittarello, Gabriele, Munir Hiabu, and Andrés M. Villegas. "Replicating and extending chain ladder via an age-period-cohort structure on the claim development in a run-off triangle." arXiv preprint arXiv:2301.03858 (2023).
Examples
data(sifa.mtpl)
sifa.mtpl.rtt <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl)
hz.chl=clmplus(sifa.mtpl.rtt, 'a')
Fit Chain Ladder Plus to reverse time triangles.
Description
Default method to fit Chain Ladder plus models.
Usage
## Default S3 method:
clmplus(
AggregateDataPP,
hazard.model = NULL,
link = c("log", "logit"),
staticAgeFun = TRUE,
periodAgeFun = "NP",
cohortAgeFun = NULL,
effect_log_scale = TRUE,
constFun = function(ax, bx, kt, b0x, gc, wxt, ages) list(ax = ax, bx = bx, kt = kt, b0x
= b0x, gc = gc),
...
)
Arguments
AggregateDataPP |
|
hazard.model |
|
link |
|
staticAgeFun |
|
periodAgeFun |
|
cohortAgeFun |
|
effect_log_scale |
|
constFun |
|
... |
parameters to be passed to clmplus. |
Value
No return value, called to pass method clmplus.AggregateDataPP
. See clmplus.AggregateDataPP
documentation.
References
Pittarello, Gabriele, Munir Hiabu, and Andrés M. Villegas. "Replicating and extending chain ladder via an age-period-cohort structure on the claim development in a run-off triangle." arXiv preprint arXiv:2301.03858 (2023).
Hiabu, Munir. “On the relationship between classical chain ladder and granular reserving.” Scandinavian Actuarial Journal 2017 (2017): 708 - 729.
Plot the payments behavior
Description
This function allows to define the behavior of the triangle payments.
Usage
## S3 method for class 'AggregateDataPP'
plot(x, ...)
Arguments
x |
AggregateDataPP to be plotted. |
... |
Arguments to be passed to plot. |
Value
No return value, plots the run-off triangle cumulative payments and incremental payments.
References
Pittarello, Gabriele, Munir Hiabu, and Andrés M. Villegas. "Replicating and extending chain ladder via an age-period-cohort structure on the claim development in a run-off triangle." arXiv preprint arXiv:2301.03858 (2023).
Examples
data(sifa.mtpl)
sifa.mtpl.pp <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl)
plot(sifa.mtpl.pp)
Plot the hazard model residuals
Description
This function allows to plot the hazard model residuals on the triangle payments.
Usage
## S3 method for class 'clmplusmodel'
plot(x, heat.lim = c(-2.5, 2.5), ...)
Arguments
x |
|
heat.lim |
limits in the residuals plot. |
... |
Extra arguments to be passed to the plot function. |
Value
No return value, plots the hazard model residuals in triangular form.
References
Pittarello, Gabriele, Munir Hiabu, and Andrés M. Villegas. "Replicating and extending chain ladder via an age-period-cohort structure on the claim development in a run-off triangle." arXiv preprint arXiv:2301.03858 (2023).
Examples
data(sifa.mtpl)
sifa.mtpl.rtt <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl)
clm.fit<-clmplus(sifa.mtpl.rtt, 'a')
plot(clm.fit)
Plot the hazard model fitted and forecasted parameters
Description
This function allows to define the behavior of the triangle payments.
Usage
## S3 method for class 'clmpluspredictions'
plot(x, cy.type = "fe", ...)
Arguments
x |
|
cy.type |
|
... |
Arguments to be passed to plot. |
Value
No return value, plots coefficients of the hazard models.
References
Pittarello, G., Hiabu, M., & Villegas, A. M. (2023). Replicating and extending chain-ladder via an age-period-cohort structure on the claim development in a run-off triangle. arXiv preprint arXiv:2301.03858.
Examples
data(sifa.mtpl)
sifa.mtpl.rtt <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl)
clm.fit<-clmplus(sifa.mtpl.rtt, 'a')
clm <- predict(clm.fit)
plot(clm)
Predict the Reserve using Chain Ladder Plus Models
Description
Predict the lower triangle with a clmplus
model.
Usage
## S3 method for class 'clmplusmodel'
predict(
object,
gk.fc.model = "a",
ckj.fc.model = "a",
gk.order = c(1, 1, 0),
ckj.order = c(0, 1, 0),
forecasting_horizon = NULL,
...
)
Arguments
object |
|
gk.fc.model |
|
ckj.fc.model |
|
gk.order |
|
ckj.order |
|
forecasting_horizon |
|
... |
Extra arguments to be passed to the predict function. |
Value
Returns the following output:
reserve |
|
ultimate_cost |
|
full_triangle |
|
lower_triangle |
|
development_factors_predicted |
|
apc_output |
|
References
Pittarello, Gabriele, Munir Hiabu, and Andrés M. Villegas. "Replicating and extending chain ladder via an age-period-cohort structure on the claim development in a run-off triangle." arXiv preprint arXiv:2301.03858 (2023).
Sifa GTPL
Description
Dataset of cumulative paid claims for a medium italian company in the line of business: general third party liability.
Usage
sifa.gtpl
Format
Run-off triangle with 12 development periods.
References
Savelli, Nino, and Clemente, Gian Paolo. "Lezioni di matematica attuariale delle assicurazioni danni." EDUCatt-Ente per il diritto allo studio universitario dell'Università Cattolica, 2014
Sifa MOD
Description
Dataset of cumulative paid claims for a medium italian company in the line of business: motor or damage.
Usage
sifa.mod
Format
Run-off triangle with 12 development periods.
References
Savelli, Nino, and Clemente, Gian Paolo. "Lezioni di matematica attuariale delle assicurazioni danni." EDUCatt-Ente per il diritto allo studio universitario dell'Università Cattolica, 2014
Sifa MTPL
Description
Dataset of cumulative paid claims for a medium italian company in the line of business: motor third party liability.
Usage
sifa.mtpl
Format
Run-off triangle with 12 development periods.
References
Savelli, Nino, and Clemente, Gian Paolo. "Lezioni di matematica attuariale delle assicurazioni danni." EDUCatt-Ente per il diritto allo studio universitario dell'Università Cattolica, 2014