From 196e81f24d54acec67faa115a3b190e524b1604e Mon Sep 17 00:00:00 2001 From: Gabriele Pittarello Date: Fri, 19 Jun 2026 11:38:04 +0200 Subject: [PATCH 01/11] predictReserve added --- .Rbuildignore | 2 + .gitignore | 1 + DESCRIPTION | 2 +- NAMESPACE | 3 + R/predictReserve.R | 133 +++++++++++++++++++++++++++++ man/predictReserve.Rd | 16 ++++ man/predictReserve.clmplusmodel.Rd | 34 ++++++++ 7 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 R/predictReserve.R create mode 100644 man/predictReserve.Rd create mode 100644 man/predictReserve.clmplusmodel.Rd diff --git a/.Rbuildignore b/.Rbuildignore index 6bba28a..653cfb3 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,3 +7,5 @@ ^pkgdown$ ^doc$ ^Meta$ +^\.positai$ +^\.claude$ diff --git a/.gitignore b/.gitignore index ac41711..324b951 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .Ruserdata /doc/ /Meta/ +.positai diff --git a/DESCRIPTION b/DESCRIPTION index 44fe477..953b340 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: clmplus Type: Package Title: Tool-Box of Chain Ladder Plus Models -Version: 1.0.1 +Version: 1.0.2 Authors@R: c(person(given = "Gabriele", family = "Pittarello", diff --git a/NAMESPACE b/NAMESPACE index 489b868..0ddbeae 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -6,7 +6,10 @@ S3method(plot,AggregateDataPP) S3method(plot,clmplusmodel) S3method(plot,clmpluspredictions) S3method(predict,clmplusmodel) +S3method(predictReserve,clmplusmodel) +S3method(predictReserve,clmpluspredictions) export(AggregateDataPP) export(clmplus) +export(predictReserve) importFrom(forecast,Arima) importFrom(forecast,forecast) diff --git a/R/predictReserve.R b/R/predictReserve.R new file mode 100644 index 0000000..cb3beb1 --- /dev/null +++ b/R/predictReserve.R @@ -0,0 +1,133 @@ +#' Predict reserve cells +#' +#' Generic for reserve-cell predictions. +#' +#' @param object A fitted reserving model. +#' @param ... Additional arguments. +#' +#' @export +predictReserve <- function(object, ...) { + UseMethod("predictReserve") +} + + +#' Predict reserve cells from a clmplus model +#' +#' Converts a fitted \code{clmplusmodel} or a \code{clmpluspredictions} +#' object into the reserving interface used by ReSurv: +#' \code{AP}, \code{DP}, \code{CP}, \code{IBNR}. +#' +#' The returned \code{IBNR} values are incremental lower-triangle predictions. +#' +#' @param object A \code{clmplusmodel} or \code{clmpluspredictions} object. +#' @param granularity Ignored. Included for compatibility with ReSurv's +#' \code{predictReserve()} interface. +#' @param lower_triangle_only Logical. If \code{TRUE}, return only cells in the +#' predicted lower triangle. +#' @param ... Arguments passed to \code{predict.clmplusmodel()} when +#' \code{object} is a fitted \code{clmplusmodel}. +#' +#' @return A data frame with columns \code{AP}, \code{DP}, \code{CP}, \code{IBNR}. +#' +#' @export +predictReserve.clmplusmodel <- function(object, + granularity = NULL, + lower_triangle_only = TRUE, + ...) { + + if (!inherits(object, "clmplusmodel")) { + stop("`object` must be a `clmplusmodel` object.", call. = FALSE) + } + + pred <- predict(object, ...) + + predictReserve.clmpluspredictions( + object = pred, + granularity = granularity, + lower_triangle_only = lower_triangle_only + ) +} + + +#' @rdname predictReserve.clmplusmodel +#' @export +predictReserve.clmpluspredictions <- function(object, + granularity = NULL, + lower_triangle_only = TRUE, + ...) { + + if (!inherits(object, "clmpluspredictions")) { + stop("`object` must be a `clmpluspredictions` object.", call. = FALSE) + } + + if (is.null(object$full_triangle)) { + stop("`object$full_triangle` is missing.", call. = FALSE) + } + + if (is.null(object$lower_triangle)) { + stop("`object$lower_triangle` is missing.", call. = FALSE) + } + + full_triangle <- as.matrix(object$full_triangle) + lower_triangle <- as.matrix(object$lower_triangle) + + if (!all(dim(full_triangle) == dim(lower_triangle))) { + stop( + "`full_triangle` and `lower_triangle` must have the same dimensions.", + call. = FALSE + ) + } + + J <- nrow(full_triangle) + + if (ncol(full_triangle) != J) { + stop( + "`full_triangle` must be a square cumulative triangle.", + call. = FALSE + ) + } + + ## Convert cumulative full triangle to incremental full triangle. + incremental_full <- full_triangle + + if (J >= 1L) { + incremental_full[, 1L] <- full_triangle[, 1L] + } + + if (J >= 2L) { + for (jj in 2:J) { + incremental_full[, jj] <- full_triangle[, jj] - full_triangle[, jj - 1L] + } + } + + ## The clmplus lower triangle is cumulative. Its non-NA cells identify + ## the predicted lower-triangle cells, also when forecasting_horizon is used. + lower_mask <- !is.na(lower_triangle) + + if (!isTRUE(lower_triangle_only)) { + lower_mask <- matrix(TRUE, nrow = J, ncol = J) + } + + AP <- rep(seq_len(J), times = J) + DP <- rep(seq_len(J), each = J) + + out <- data.frame( + AP = AP, + DP = DP, + CP = AP + DP - 1L, + IBNR = as.numeric(incremental_full[cbind(AP, DP)]) + ) + + out <- out[as.vector(lower_mask), , drop = FALSE] + + out <- out[order(out$AP, out$DP), , drop = FALSE] + + rownames(out) <- NULL + + out$AP <- as.integer(out$AP) + out$DP <- as.integer(out$DP) + out$CP <- as.integer(out$CP) + out$IBNR <- as.numeric(out$IBNR) + + out +} \ No newline at end of file diff --git a/man/predictReserve.Rd b/man/predictReserve.Rd new file mode 100644 index 0000000..bb1d974 --- /dev/null +++ b/man/predictReserve.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/predictReserve.R +\name{predictReserve} +\alias{predictReserve} +\title{Predict reserve cells} +\usage{ +predictReserve(object, ...) +} +\arguments{ +\item{object}{A fitted reserving model.} + +\item{...}{Additional arguments.} +} +\description{ +Generic for reserve-cell predictions. +} diff --git a/man/predictReserve.clmplusmodel.Rd b/man/predictReserve.clmplusmodel.Rd new file mode 100644 index 0000000..45bbe40 --- /dev/null +++ b/man/predictReserve.clmplusmodel.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/predictReserve.R +\name{predictReserve.clmplusmodel} +\alias{predictReserve.clmplusmodel} +\alias{predictReserve.clmpluspredictions} +\title{Predict reserve cells from a clmplus model} +\usage{ +\method{predictReserve}{clmplusmodel}(object, granularity = NULL, lower_triangle_only = TRUE, ...) + +\method{predictReserve}{clmpluspredictions}(object, granularity = NULL, lower_triangle_only = TRUE, ...) +} +\arguments{ +\item{object}{A \code{clmplusmodel} or \code{clmpluspredictions} object.} + +\item{granularity}{Ignored. Included for compatibility with ReSurv's +\code{predictReserve()} interface.} + +\item{lower_triangle_only}{Logical. If \code{TRUE}, return only cells in the +predicted lower triangle.} + +\item{...}{Arguments passed to \code{predict.clmplusmodel()} when +\code{object} is a fitted \code{clmplusmodel}.} +} +\value{ +A data frame with columns \code{AP}, \code{DP}, \code{CP}, \code{IBNR}. +} +\description{ +Converts a fitted \code{clmplusmodel} or a \code{clmpluspredictions} +object into the reserving interface used by ReSurv: +\code{AP}, \code{DP}, \code{CP}, \code{IBNR}. +} +\details{ +The returned \code{IBNR} values are incremental lower-triangle predictions. +} From 06d7f565ec4073bca4959579594ea50f387a3a16 Mon Sep 17 00:00:00 2001 From: Gabriele Pittarello Date: Fri, 19 Jun 2026 11:47:15 +0200 Subject: [PATCH 02/11] namespace fixes --- DESCRIPTION | 1 + R/predictReserve.R | 57 ++++++++++++++-------------------------------- 2 files changed, 18 insertions(+), 40 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 953b340..aa6adff 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -24,6 +24,7 @@ BugReports: https://github.com/gpitt71/clmplus/issues License: GPL (>= 2) Imports: StMoMo, + ReSurv, ChainLadder, stats, ggplot2, diff --git a/R/predictReserve.R b/R/predictReserve.R index cb3beb1..5a0a310 100644 --- a/R/predictReserve.R +++ b/R/predictReserve.R @@ -1,35 +1,18 @@ -#' Predict reserve cells -#' -#' Generic for reserve-cell predictions. -#' -#' @param object A fitted reserving model. -#' @param ... Additional arguments. -#' -#' @export -predictReserve <- function(object, ...) { - UseMethod("predictReserve") -} - - #' Predict reserve cells from a clmplus model #' -#' Converts a fitted \code{clmplusmodel} or a \code{clmpluspredictions} -#' object into the reserving interface used by ReSurv: -#' \code{AP}, \code{DP}, \code{CP}, \code{IBNR}. -#' -#' The returned \code{IBNR} values are incremental lower-triangle predictions. +#' Converts a fitted clmplus model, or its prediction object, into the +#' ReSurv reserving interface: AP, DP, CP, IBNR. #' -#' @param object A \code{clmplusmodel} or \code{clmpluspredictions} object. -#' @param granularity Ignored. Included for compatibility with ReSurv's -#' \code{predictReserve()} interface. -#' @param lower_triangle_only Logical. If \code{TRUE}, return only cells in the -#' predicted lower triangle. -#' @param ... Arguments passed to \code{predict.clmplusmodel()} when -#' \code{object} is a fitted \code{clmplusmodel}. +#' @param object A clmplusmodel or clmpluspredictions object. +#' @param granularity Ignored. Included for compatibility with ReSurv. +#' @param lower_triangle_only Logical. If TRUE, return only predicted lower-triangle cells. +#' @param ... Passed to predict.clmplusmodel(). #' -#' @return A data frame with columns \code{AP}, \code{DP}, \code{CP}, \code{IBNR}. +#' @return A data.frame with AP, DP, CP, IBNR. #' +#' @importFrom ReSurv predictReserve #' @export +#' @method predictReserve clmplusmodel predictReserve.clmplusmodel <- function(object, granularity = NULL, lower_triangle_only = TRUE, @@ -51,6 +34,7 @@ predictReserve.clmplusmodel <- function(object, #' @rdname predictReserve.clmplusmodel #' @export +#' @method predictReserve clmpluspredictions predictReserve.clmpluspredictions <- function(object, granularity = NULL, lower_triangle_only = TRUE, @@ -81,18 +65,12 @@ predictReserve.clmpluspredictions <- function(object, J <- nrow(full_triangle) if (ncol(full_triangle) != J) { - stop( - "`full_triangle` must be a square cumulative triangle.", - call. = FALSE - ) + stop("`full_triangle` must be square.", call. = FALSE) } - ## Convert cumulative full triangle to incremental full triangle. incremental_full <- full_triangle - if (J >= 1L) { - incremental_full[, 1L] <- full_triangle[, 1L] - } + incremental_full[, 1L] <- full_triangle[, 1L] if (J >= 2L) { for (jj in 2:J) { @@ -100,8 +78,6 @@ predictReserve.clmpluspredictions <- function(object, } } - ## The clmplus lower triangle is cumulative. Its non-NA cells identify - ## the predicted lower-triangle cells, also when forecasting_horizon is used. lower_mask <- !is.na(lower_triangle) if (!isTRUE(lower_triangle_only)) { @@ -120,14 +96,15 @@ predictReserve.clmpluspredictions <- function(object, out <- out[as.vector(lower_mask), , drop = FALSE] - out <- out[order(out$AP, out$DP), , drop = FALSE] - - rownames(out) <- NULL - out$AP <- as.integer(out$AP) out$DP <- as.integer(out$DP) out$CP <- as.integer(out$CP) out$IBNR <- as.numeric(out$IBNR) + out <- out[is.finite(out$IBNR), , drop = FALSE] + out <- out[order(out$AP, out$DP), , drop = FALSE] + + rownames(out) <- NULL + out } \ No newline at end of file From c6c1528d98a0723504b63c8baf02138e4a0f9fc9 Mon Sep 17 00:00:00 2001 From: Gabriele Pittarello Date: Thu, 23 Jul 2026 17:33:31 +0200 Subject: [PATCH 03/11] updated package --- .Rbuildignore | 1 + .github/workflows/r-checkrelease.yml | 13 +- .gitignore | 2 +- DESCRIPTION | 6 +- NAMESPACE | 1 + R/AggregateDataPP.R | 17 +- R/clmplusAggregateDataPP.R | 85 +-- R/fitted-effects.R | 30 + R/forecasting.R | 57 ++ R/globalVariables.R | 713 ------------------ R/model-definitions.R | 28 + R/plotclmplusmodel.R | 48 +- R/plotclmpluspredictions.R | 9 +- R/predictReserve.R | 115 +-- R/predictclmplusmodel.R | 152 ++-- R/properties.R | 18 - R/triangle-transformations.R | 38 + R/validation.R | 31 + data-raw/amases.gtpl.R | 1 + data-raw/amases.mod.R | 1 + data-raw/amases.mtpl.R | 1 + data-raw/sifa.gtpl.R | 1 + data-raw/sifa.mod.R | 1 + data-raw/sifa.mtpl.R | 1 + data/amases.gtpl.R | 1 - data/{amases.gtpl.RDa => amases.gtpl.rda} | Bin data/amases.mod.R | 1 - data/{amases.mod.RDa => amases.mod.rda} | Bin data/amases.mtpl.R | 1 - data/{amases.mtpl.RDa => amases.mtpl.rda} | Bin data/amasesgtpl.RDa | Bin 494 -> 0 bytes data/amasesmod.RDa | Bin 473 -> 0 bytes data/amasesmtpl.RDa | Bin 506 -> 0 bytes data/sifa.gtpl.R | 1 - data/{sifa.gtpl.RDa => sifa.gtpl.rda} | Bin data/sifa.mod.R | 1 - data/{sifa.mod.RDa => sifa.mod.rda} | Bin data/sifa.mtpl.R | 1 - data/{sifa.mtpl.RDa => sifa.mtpl.rda} | Bin data/sifagtpl.RDa | Bin 440 -> 0 bytes data/sifamod.RDa | Bin 444 -> 0 bytes data/sifamtpl.RDa | Bin 905 -> 0 bytes man/predict.clmplusmodel.Rd | 4 +- man/predictReserve.Rd | 8 +- man/predictReserve.clmplusmodel.Rd | 22 +- tests/testthat.R | 4 + tests/testthat/Rplots.pdf | Bin 0 -> 6198 bytes tests/testthat/helper-fixtures.R | 9 + tests/testthat/test-age-regression.R | 50 ++ tests/testthat/test-aggregate-validation.R | 24 + .../testthat/test-predict-reserve-and-plots.R | 16 + tests/testthat/test-supported-models.R | 13 + tests/testthat/test-transformations.R | 30 + 53 files changed, 478 insertions(+), 1078 deletions(-) create mode 100644 R/fitted-effects.R create mode 100644 R/forecasting.R delete mode 100644 R/globalVariables.R create mode 100644 R/model-definitions.R delete mode 100644 R/properties.R create mode 100644 R/triangle-transformations.R create mode 100644 R/validation.R create mode 100644 data-raw/amases.gtpl.R create mode 100644 data-raw/amases.mod.R create mode 100644 data-raw/amases.mtpl.R create mode 100644 data-raw/sifa.gtpl.R create mode 100644 data-raw/sifa.mod.R create mode 100644 data-raw/sifa.mtpl.R delete mode 100644 data/amases.gtpl.R rename data/{amases.gtpl.RDa => amases.gtpl.rda} (100%) delete mode 100644 data/amases.mod.R rename data/{amases.mod.RDa => amases.mod.rda} (100%) delete mode 100644 data/amases.mtpl.R rename data/{amases.mtpl.RDa => amases.mtpl.rda} (100%) delete mode 100644 data/amasesgtpl.RDa delete mode 100644 data/amasesmod.RDa delete mode 100644 data/amasesmtpl.RDa delete mode 100644 data/sifa.gtpl.R rename data/{sifa.gtpl.RDa => sifa.gtpl.rda} (100%) delete mode 100644 data/sifa.mod.R rename data/{sifa.mod.RDa => sifa.mod.rda} (100%) delete mode 100644 data/sifa.mtpl.R rename data/{sifa.mtpl.RDa => sifa.mtpl.rda} (100%) delete mode 100644 data/sifagtpl.RDa delete mode 100644 data/sifamod.RDa delete mode 100644 data/sifamtpl.RDa create mode 100644 tests/testthat.R create mode 100644 tests/testthat/Rplots.pdf create mode 100644 tests/testthat/helper-fixtures.R create mode 100644 tests/testthat/test-age-regression.R create mode 100644 tests/testthat/test-aggregate-validation.R create mode 100644 tests/testthat/test-predict-reserve-and-plots.R create mode 100644 tests/testthat/test-supported-models.R create mode 100644 tests/testthat/test-transformations.R diff --git a/.Rbuildignore b/.Rbuildignore index 653cfb3..5a3bf74 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,3 +9,4 @@ ^Meta$ ^\.positai$ ^\.claude$ +^data-raw$ diff --git a/.github/workflows/r-checkrelease.yml b/.github/workflows/r-checkrelease.yml index 1b5e463..7da532b 100644 --- a/.github/workflows/r-checkrelease.yml +++ b/.github/workflows/r-checkrelease.yml @@ -23,9 +23,20 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::rcmdcheck + extra-packages: any::rcmdcheck, any::testthat, any::devtools, any::viridis, github::cran/apc needs: check + - name: Run testthat suite + run: testthat::test_local(stop_on_failure = TRUE) + shell: Rscript {0} + + - name: Render vignettes + run: devtools::build_vignettes() + shell: Rscript {0} + + - name: Build source package + run: R CMD build --no-manual . + - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true diff --git a/.gitignore b/.gitignore index 324b951..1c78fef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .Rproj.user .Rhistory -.RData +/.RData .Ruserdata /doc/ /Meta/ diff --git a/DESCRIPTION b/DESCRIPTION index aa6adff..f0acd80 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,12 +1,14 @@ Package: clmplus Type: Package +Depends: + R (>= 3.5.0) Title: Tool-Box of Chain Ladder Plus Models Version: 1.0.2 Authors@R: c(person(given = "Gabriele", family = "Pittarello", role = c("aut", "cre", "cph"), - email = "gabriele.pittarello@uniroma1.it", + email = "gabriele.pittarello@sund.ku.dk", comment = c(ORCID = "0000-0003-3360-5826")), person(given = "Munir", family = "Hiabu", @@ -34,6 +36,7 @@ Imports: Encoding: UTF-8 LazyData: true Suggests: + testthat (>= 3.0.0), knitr, rmarkdown, apc, @@ -41,4 +44,5 @@ Suggests: viridis, tidyr VignetteBuilder: knitr, rmarkdown +Config/testthat/edition: 3 RoxygenNote: 7.3.3 diff --git a/NAMESPACE b/NAMESPACE index 0ddbeae..dbde3b2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,5 +11,6 @@ S3method(predictReserve,clmpluspredictions) export(AggregateDataPP) export(clmplus) export(predictReserve) +importFrom(ReSurv,predictReserve) importFrom(forecast,Arima) importFrom(forecast,forecast) diff --git a/R/AggregateDataPP.R b/R/AggregateDataPP.R index 973a1e1..d12e85b 100644 --- a/R/AggregateDataPP.R +++ b/R/AggregateDataPP.R @@ -33,16 +33,13 @@ #' @export AggregateDataPP <- function(cumulative.payments.triangle, entries.weights=NULL, eta=1/2) { - - rtt.input.env$properties.cpt(cumulative.payments.triangle) - - incrementals = ChainLadder::cum2incr(cumulative.payments.triangle) - J=dim(cumulative.payments.triangle)[2] + incrementals <- validate_triangle(cumulative.payments.triangle, entries.weights, eta) + J <- ncol(cumulative.payments.triangle) # find out occurrance and exposure - occurrance=pkg.env$t2c(incrementals) - drop=1-eta - exposure=pkg.env$t2c(cumulative.payments.triangle-drop*incrementals) + occurrance <- triangle_to_calendar(incrementals) + calendar_cumulative <- triangle_to_calendar(cumulative.payments.triangle) + exposure <- calendar_cumulative - (1 - eta) * occurrance # find out the weights @@ -59,7 +56,7 @@ AggregateDataPP <- function(cumulative.payments.triangle, entries.weights=NULL, } fit.w[,1]=0 - fit.w=pkg.env$t2c(fit.w) + fit.w=triangle_to_calendar(fit.w) fit.w[is.na(fit.w)]=0 @@ -70,7 +67,7 @@ AggregateDataPP <- function(cumulative.payments.triangle, entries.weights=NULL, fit.w=fit.w, incremental.payments.triangle = incrementals, J=J, - diagonal=pkg.env$t2c(cumulative.payments.triangle)[,J], + diagonal=calendar_cumulative[,J], eta=eta ) diff --git a/R/clmplusAggregateDataPP.R b/R/clmplusAggregateDataPP.R index a234c83..6359e1b 100644 --- a/R/clmplusAggregateDataPP.R +++ b/R/clmplusAggregateDataPP.R @@ -127,7 +127,7 @@ clmplus.default <- function(AggregateDataPP, 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), - ...){message('The object provided must be of class AggregateDataPP')} + ...){stop("`AggregateDataPP` must inherit from class \"AggregateDataPP\".", call. = FALSE)} #' Fit Chain Ladder Plus to reverse time triangles. #' @@ -207,60 +207,11 @@ clmplus.AggregateDataPP <- function(AggregateDataPP, ...){ - stopifnot(is.null(hazard.model) | typeof(hazard.model)=="character") - # - # if(is.null(hazard.model)){ - # - # - # stmomo.model = StMoMo::StMoMo(link = link, - # staticAgeFun = staticAgeFun, - # periodAgeFun = periodAgeFun, - # cohortAgeFun = cohortAgeFun, - # constFun = constFun) - # - # model <- StMoMo::fit(stmomo.model, - # Dxt = AggregateDataPP$occurrance, - # Ext = AggregateDataPP$exposure, - # wxt = AggregateDataPP$fit.w, - # iterMax=as.integer(1e+05)) - # - # #forecasting horizon - # J=dim(AggregateDataPP$cumulative.payments.triangle)[2] - # #compute the development factors - # alphaij <- forecast::forecast(model, h = J) - # # fij=(2+alphaij$rates)/(2-alphaij$rates) - # fij=(1+(1-AggregateDataPP$eta)*alphaij$rates)/(1-(AggregateDataPP$eta*alphaij$rates)) - # # pick the last diagonal - # d=AggregateDataPP$diagonal[1:(J-1)] - # # extrapolate the results - # lt=array(0.,c(J,J)) - # lt[,1]=c(0.,d)*fij[,1] - # for(j in 2:J){lt[,j]=c(0.,lt[1:(J-1),(j-1)])*fij[,j]} - # - # ot_=pkg.env$t2c(AggregateDataPP$cumulative.payments.triangle) - # ultimate_cost=c(rev(lt[J,1:(J-1)]),ot_[J,J]) - # reserve=rev(ultimate_cost-ot_[,J]) - # ultimate_cost=rev(ultimate_cost) - # converged=TRUE - # citer=NULL - # - # - # out <- list(model.fit=model, - # hazard.model='user.defined', - # ultimate.cost=ultimate_cost, - # reserve=reserve, - # model.fcst = alphaij, - # converged=converged, - # citer=citer) - # - # class(out) <- c('clmplusmodel') - # - # out} - # - - if(hazard.model %in% names(pkg.env$models)){ - - model <- StMoMo::fit(pkg.env$models[[hazard.model]], + if (length(hazard.model) != 1L || !is.character(hazard.model) || + !hazard.model %in% names(supported_models)) { + stop("`hazard.model` must be one of: ", paste(names(supported_models), collapse = ", "), ".", call. = FALSE) + } + model <- StMoMo::fit(supported_models[[hazard.model]], Dxt = AggregateDataPP$occurrance, Ext = AggregateDataPP$exposure, wxt=AggregateDataPP$fit.w, @@ -272,22 +223,18 @@ clmplus.AggregateDataPP <- function(AggregateDataPP, J=dim(AggregateDataPP$cumulative.payments.triangle)[2] # Find fitted development factors - fij.fit <- pkg.env$find.development.factors(J, - age.eff= model$ax, - cohort.eff= model$gc, - period.eff=model$kt, - eta=AggregateDataPP$eta) + fij.fit <- fitted_development_factors( + J, age = model$ax, cohort = model$gc, period = model$kt, + eta = AggregateDataPP$eta + ) - res.m = stats::residuals(model) - res.tr=pkg.env$c2t(res.m$residuals) + res.m <- stats::residuals(model) + res.tr <- calendar_to_triangle(res.m$residuals) - fitted_effects <- pkg.env$find.fitted.effects(J, - age.eff= model$ax, - cohort.eff= model$gc, - period.eff=model$kt, - effect_log_scale=effect_log_scale) - - } + fitted_effects <- extract_fitted_effects( + age = model$ax, cohort = model$gc, period = model$kt, + log_scale = effect_log_scale + ) diff --git a/R/fitted-effects.R b/R/fitted-effects.R new file mode 100644 index 0000000..577f4d9 --- /dev/null +++ b/R/fitted-effects.R @@ -0,0 +1,30 @@ +fitted_development_factors <- function(size, age, period, cohort, eta) { + age <- c(NA_real_, age[!is.na(age)]) + cohort <- if (is.null(cohort)) rep(0, size) else c(cohort[!is.na(cohort)], NA_real_) + period <- if (is.null(period)) rep(0, size) else c(NA_real_, period[!is.na(period)]) + out <- matrix(NA_real_, size, size) + index <- which(row(out) + col(out) <= size + 1L, arr.ind = TRUE) + linear <- age[index[, 2L]] + cohort[index[, 1L]] + period[rowSums(index) - 1L] + out[index] <- (1 + (1 - eta) * exp(linear)) / (1 - eta * exp(linear)) + out +} + +extract_fitted_effects <- function(age, period, cohort, log_scale) { + age <- c(NA_real_, age[!is.na(age)]) + names(age) <- seq_along(age) - 1L + if (!is.null(period)) { + period <- c(NA_real_, period[!is.na(period)]) + names(period) <- seq_along(period) - 1L + } + if (!is.null(cohort)) { + cohort <- c(cohort[!is.na(cohort)], NA_real_) + names(cohort) <- seq_along(cohort) - 1L + } + out <- list( + fitted_development_effect = age, + fitted_calendar_effect = period, + fitted_accident_effect = cohort + ) + if (!log_scale) out <- lapply(out, exp) + out +} diff --git a/R/forecasting.R b/R/forecasting.R new file mode 100644 index 0000000..e65dd44 --- /dev/null +++ b/R/forecasting.R @@ -0,0 +1,57 @@ +forecast_hazard_rates <- function(object, model_name, gk.fc.model = "a", + ckj.fc.model = "a", gk.order = c(1, 1, 0), + ckj.order = c(0, 1, 0)) { + size <- ncol(object$Dxt) + rates <- matrix(0, size, size) + components <- model_components[[model_name]] + kt.f <- gc.f <- NULL + + if (isTRUE(components[["cohort"]])) { + last <- max(which(!is.na(object$gc))) + if (gk.fc.model == "a") { + fitted <- forecast::Arima(object$gc[seq_len(last)], order = gk.order, + include.constant = TRUE) + gc.f <- forecast::forecast(fitted, h = length(object$cohorts) - last) + } else if (gk.fc.model == "l") { + fitted <- stats::lm(y ~ x, data = data.frame( + y = object$gc[seq_len(last)], x = object$cohorts[seq_len(last)] + )) + gc.f <- forecast::forecast(fitted, newdata = data.frame( + x = object$cohorts[(last + 1L):length(object$cohorts)] + )) + } else { + stop("`gk.fc.model` must be either \"a\" or \"l\".", call. = FALSE) + } + cohort <- c(object$gc[!is.na(object$gc)], unname(gc.f$mean)) + cohort_matrix <- matrix(cohort, nrow = size, ncol = size) + cohort_matrix <- triangle_to_full_calendar(cohort_matrix) + cohort_matrix[is.na(cohort_matrix)] <- 0 + rates <- rates + cohort_matrix[, (size + 1L):(2L * size), drop = FALSE] + } + + if (isTRUE(components[["period"]])) { + period <- as.vector(object$kt[1L, ]) + last <- max(which(!is.na(period))) + if (ckj.fc.model == "a") { + fitted <- forecast::Arima(period[seq_len(last)], order = ckj.order, + include.constant = TRUE) + kt.f <- forecast::forecast(fitted, h = size) + } else if (ckj.fc.model == "l") { + fitted <- stats::lm(y ~ x, data = data.frame( + y = period[seq_len(last)], x = object$years[seq_len(last)] + )) + kt.f <- forecast::forecast(fitted, newdata = data.frame(x = seq.int(size + 1L, 2L * size))) + } else { + stop("`ckj.fc.model` must be either \"a\" or \"l\".", call. = FALSE) + } + rates <- sweep(rates, 2L, unname(kt.f$mean), `+`) + } + + if (isTRUE(components[["age"]])) { + age <- unname(object$ax) + age[is.na(age)] <- 0 + rates <- sweep(rates, 1L, age, `+`) + } + + list(rates = exp(rates), kt.f = kt.f, gc.f = gc.f) +} diff --git a/R/globalVariables.R b/R/globalVariables.R deleted file mode 100644 index 09d5204..0000000 --- a/R/globalVariables.R +++ /dev/null @@ -1,713 +0,0 @@ -#' @importFrom forecast Arima -#' @importFrom forecast forecast - - -# Create environment ---- -pkg.env <- new.env() - - -#Supported models ---- - -pkg.env$models=list( - - ## a model - a = StMoMo::StMoMo(link="log", - staticAgeFun = TRUE, - periodAgeFun = NULL, - cohortAgeFun = NULL), - ## p model - - p = StMoMo::StMoMo(link="log", - staticAgeFun = FALSE, - periodAgeFun = c("1"), - cohortAgeFun = NULL), - ## c model - c = StMoMo::StMoMo(link="log", - staticAgeFun = FALSE, - periodAgeFun = NULL, - cohortAgeFun = c("1")), - ## ac model - - ac = StMoMo::StMoMo(link="log", - staticAgeFun = TRUE, - periodAgeFun = NULL, - cohortAgeFun = c("1")), - - ## ap model - - ap = StMoMo::StMoMo(link="log", - staticAgeFun = TRUE, - periodAgeFun = c("1"), - cohortAgeFun = NULL), - - - ## pc model - - pc = StMoMo::StMoMo(link="log", - staticAgeFun = FALSE, - periodAgeFun = c("1"), - cohortAgeFun = c("1")), - - ## apc model - - apc = StMoMo::apc(), - - ## cbd model - - cbd = StMoMo::cbd(link = c("log")), - - ## m6 model - - m6 = StMoMo::m6(link = c("log")), - - ## m7 model - - m7 = StMoMo::m7(link = c("log")) - - - ) - - - -# Utils ---- -## Transform the upper run-off triangle to the life-table representation. -pkg.env$t2c <- function(x){ - " - Transform the upper run-off triangle to the life-table representation. - " - I= dim(x)[1] - J= dim(x)[2] - - mx=matrix(NA,nrow=I,ncol=J) - for(i in 1:(I)){ - for(j in 1:(J)){ - if(i+j<=J+1){ - mx[j,(i+j-1)]=x[i,j] - } - } - } - return(mx) -} - -## Rotate a matrix -pkg.env$rotate <- function(x){ - " - It rotates a matrix by 90 degrees. - " - - - t(apply(x, 2, rev))} - -pkg.env$c2t <- function(x){ - I= dim(x)[1] - J= dim(x)[2] - - mx=matrix(NA,nrow=I,ncol=J) - for(i in 1:(I)){ - for(j in 1:(J)){ - if(i+j<=J+1){ - mx[i,j]=x[j,(i+j-1)] - } - } - } - return(mx) -} - - -pkg.env$t2c.full.square <- function(x){ - " - Function to transform a full run-off triangle into a square. - - This function takes a run-off triangle as input. - - It returns a square. - " - - I= dim(x)[1] - J= dim(x)[2] - - mx = matrix(NA, nrow = I, ncol = 2 * J) - for (i in 1:(I)) { - for (j in 1:(J)) { - mx[j,(i+j-1)]=x[i,j] - - } - } - return(mx) - } - - -# lee-carter models -pkg.env$fit.lc.nr <- function(data.T, - iter.max=1e+04, - tolerance.max=1e-06){ - " - Fits the LC model via a Netwon-Rhapson from scratch implementation to the data. - - " - - data.O <- data.T$occurrance - data.E <- data.T$exposure - - wxc <- data.T$fit.w - - # wxc <- matrix(1, - # nrow = dim(data.O)[1], - # ncol=dim(data.O)[2]) - # wxc[is.na(data.E)]<-0 - - - ## parameters initial values - ax = runif(dim(data.O)[1]) - bx = rep(1/dim(data.O)[1],dim(data.O)[1]) - kt = rep(0,dim(data.O)[2]) - - #create matrices to compute the linear predictor - ax.mx = matrix(rep(ax,dim(data.O)[2]), - byrow = F, - ncol=dim(data.O)[2]) - - bx.mx = matrix(rep(bx, - dim(data.O)[2]), - byrow = F, - ncol=dim(data.O)[2]) - - kt.mx = matrix(rep(kt, - dim(data.O)[1]), - byrow = T, - nrow=dim(data.O)[1]) - - - mu.mx = exp(ax.mx+bx.mx*kt.mx) - - dhat = data.E*mu.mx - - dxt0=1000 - niter=1000 - - deltaax=100 - deltabx=100 - deltakt=100 - - deltadxt=100 - - kt0=(abs(kt)) - ax0=(abs(ax)) - bx0=(abs(bx)) - - citer=0 - - dxt.v=NULL - - deltakt.v=NULL - deltaax.v=NULL - deltabx.v=NULL - - deltadxt.v=NULL - - kt1.v=NULL - - converged=TRUE - - while((abs(deltaax)>tolerance.max|abs(deltabx)>tolerance.max|abs(deltakt)>tolerance.max)&citertolerance.max|abs(deltabx)>tolerance.max|abs(deltakt)>tolerance.max)){ - warning('The Newton-Rhapson algorithm for the lee-carter may have not converged') - converged=FALSE - } - - return(list(ax=ax, - bx=bx, - kt=kt, - citer=citer, - data.T=data.T, - converged=converged, - deltaax=deltaax, - deltabx=deltabx, - deltakt=deltakt, - dxt0=dxt0, - deltadxt=deltadxt, - converged=converged - )) - -} - - -pkg.env$fit.aac.nr <- function(data.T, - iter.max=1e+04, - tolerance.max=1e-06, - ax.start=NULL, - gc.start=NULL){ - " - Fits the AAC model via a Netwon-Rhapson from scratch implementation to the data. - - " - data.O <- pkg.env$rotate(pkg.env$c2t(data.T$occurrance)) - data.E <- pkg.env$rotate(pkg.env$c2t(data.T$exposure)) - - wxc <- matrix(1, - nrow = dim(data.O)[1], - ncol=dim(data.O)[2]) - wxc[is.na(data.E)]<-0 - - - ## parameters initial values - ax = ax.start - bx = rep(1/dim(data.O)[1],dim(data.O)[1]) - gc = gc.start - - #create matrices to compute the linear predictor - ax.mx = matrix(rep(ax,dim(data.O)[2]), - byrow = F, - ncol=dim(data.O)[2]) - - bx.mx = matrix(rep(bx, - dim(data.O)[2]), - byrow = F, - ncol=dim(data.O)[2]) - - gc.mx = matrix(rep(gc, - dim(data.O)[1]), - byrow = T, - nrow=dim(data.O)[1]) - - - mu.mx = exp(ax.mx+bx.mx*gc.mx) - - dhat = data.E*mu.mx - - dxt0=1000 - niter=1000 - - deltaax=100 - deltabx=100 - deltagc=100 - - deltadxt=100 - - gc0=(abs(gc)) - ax0=(abs(ax)) - bx0=(abs(bx)) - - citer=0 - - dxt.v=NULL - - deltagc.v=NULL - deltaax.v=NULL - deltabx.v=NULL - - deltadxt.v=NULL - - gc1.v=NULL - - converged=TRUE - - while((abs(deltaax)>tolerance.max|abs(deltabx)>tolerance.max|abs(deltagc)>tolerance.max)&citertolerance.max|abs(deltabx)>tolerance.max|abs(deltagc)>tolerance.max)){ - warning('The Newton-Rhapson algorithm for the lee-carter may have not converged') - converged=FALSE - } - - return(list(ax=ax, - bx=bx, - gc=rev(gc), #reverse it as you read the data in the opposite direction - citer=citer, - converged=converged, - deltaax=deltaax, - deltabx=deltabx, - deltagc=deltagc, - dxt0=dxt0, - deltadxt=deltadxt, - converged=converged - )) - -} - -# forecasting with linear trend - - -pkg.env$fcst <- function(object, - hazard.model, - gk.fc.model='a', - ckj.fc.model='a', - gk.order=c(1,1,0), - ckj.order=c(0,1,0)){ - - - J=dim(object$Dxt)[2] - - rates=array(.0,dim=c(J,J)) - - if(!is.null(hazard.model)){ - - a.tf <- grepl('a',hazard.model) - c.tf <- grepl('c',hazard.model) - p.tf <- grepl('p',hazard.model) - kt.f=NULL - gc.f=NULL - - } - - ## cohorts model - if(c.tf){ - # c.model <- substr(fc.model,1,1) - gc.nNA <- max(which(!is.na(object$gc))) - - if(gk.fc.model=='a'){ - - gc.model <- Arima(object$gc[1:gc.nNA], - order = gk.order, - include.constant = T) - gc.f <- forecast(gc.model,h=(length(object$cohorts)-gc.nNA)) - - - }else{ - - gc.data=data.frame(y=object$gc[1:gc.nNA], - x=object$cohorts[1:gc.nNA]) - new.gc.data <- data.frame(x=object$cohorts[(gc.nNA+1):length(object$cohorts)]) - - gc.model <- lm('y~x', - data=gc.data) - - gc.f <- forecast::forecast(gc.model, - newdata=new.gc.data) - - - } - - #forecasting rates - cond = !is.na(object$gc) - gc.2.add = c(object$gc[cond],gc.f$mean) - gc.mx= matrix(rep(unname(gc.2.add), - J), - byrow = F, - nrow=J) - rates <- gc.mx+rates - rates <- pkg.env$t2c.full.square(rates) - rates[is.na(rates)]=.0 - rates <- rates[,(J+1):(2*J)] - - - - } - - ## period model - if(p.tf){ - # p.model <- substr(fc.model,2,2) - kt.nNA <- max(which(!is.na(object$kt[1, ]))) - - if(ckj.fc.model=='a'){ - - kt.model=forecast::Arima(as.vector(object$kt[1:kt.nNA]),ckj.order,include.constant = T) - kt.f <- forecast::forecast(kt.model,h=J) - - }else{ - - kt.data=data.frame(y=object$kt[1:kt.nNA], - x=object$years[1:kt.nNA]) - new.kt.data <- data.frame(x=seq(J+1,2*J)) - - kt.model <- lm('y~x', - data=kt.data) - - kt.f <- forecast::forecast(kt.model,newdata=new.kt.data) - - } - #forecasting rates - kt.mx = matrix(rep(unname(kt.f$mean), - J), - byrow = T, - nrow=J) - - rates=kt.mx+rates - - } - - # projecting age - if(a.tf){ - - ax.mx = matrix(rep(unname(object$ax), - J), - byrow = F, - nrow=J) - ax.mx[is.na(ax.mx)]=.0 - rates=ax.mx+rates - } - - output<- list(rates=exp(rates), - kt.f=kt.f, - gc.f=gc.f) - - return(output) - -} - - -pkg.env$create_lower_triangle <- function(lt){ - - J <- dim(lt)[1] - J.stop <- dim(lt)[2] - out <- array(NA,c(J,J)) - - for(age in 1:J){ - - for(calendar in 1:J.stop){ - - tmp.ix <- J+calendar - if(tmp.ix-age+1<=J & age<=J){ - out[tmp.ix-age+1,age] <- lt[age,calendar]} - - - } - - } - - return(out) - - -} - -pkg.env$create_full_triangle <- function(cumulative.payments.triangle, lt){ - - J <- dim(lt)[1] - J.stop <- dim(lt)[2] - out <- cumulative.payments.triangle - - for(age in 1:J){ - - for(calendar in 1:J.stop){ - - tmp.ix <- J+calendar - if(tmp.ix-age+1<=J & age<=J){ - out[tmp.ix-age+1,age] <- lt[age,calendar]} - - - } - - } - - return(out) - - -} - - -pkg.env$find.development.factors <- function(J, - age.eff, - period.eff, - cohort.eff, - eta){ - - # Function that finds the development factors on the upper triangle. - - out <- array(NA,dim=c(J,J)) - - ax <- c(NA,age.eff[!is.na(age.eff)]) - - if(!is.null(cohort.eff)){ - gc <- c(cohort.eff[!is.na(cohort.eff)],NA) #last cohort effect will be extrapolated - - - }else{gc<-rep(0,J)} - - if(!is.null(period.eff)){ - - kt <- c(NA,period.eff[!is.na(period.eff)]) #the first period is disregarded - - - }else{kt<-rep(0,J)} - - - for(i in 1:J){ - for(j in 1:J){ - - if((i+j-1)<=J){out[i,j] <- ax[j]+gc[i]+kt[i+j-1]} - - } - - } - - out <- (1+(1-eta)*exp(out))/(1-(eta*exp(out))) - - return(out) - - } - - -pkg.env$find.fitted.effects <- function(J, - age.eff, - period.eff, - cohort.eff, - effect_log_scale){ - - # Function that finds the fitted effects. - - ax <- c(NA,age.eff[!is.na(age.eff)]) - names(ax) <- c(0:(length(ax)-1)) - - if(!is.null(cohort.eff)){ - gc <- c(cohort.eff[!is.na(cohort.eff)],NA) #last cohort effect will be extrapolated - names(gc) <- c(0:(length(gc)-1)) - - }else{gc<-NULL} - - if(!is.null(period.eff)){ - - kt <- c(NA,period.eff[!is.na(period.eff)]) #the first period is disregarded - names(kt) <- c(0:(length(kt)-1)) - - }else{kt<-NULL} - - out <- list( - fitted_development_effect= ax, - fitted_calendar_effect=kt, - fitted_accident_effect= gc - ) - - if(effect_log_scale==FALSE){out<-lapply(out,exp)} - - return(out) - - - } - diff --git a/R/model-definitions.R b/R/model-definitions.R new file mode 100644 index 0000000..26e6ba2 --- /dev/null +++ b/R/model-definitions.R @@ -0,0 +1,28 @@ +#' @importFrom forecast Arima forecast +NULL + +supported_models <- list( + a = StMoMo::StMoMo("log", TRUE, NULL, NULL), + p = StMoMo::StMoMo("log", FALSE, "1", NULL), + c = StMoMo::StMoMo("log", FALSE, NULL, "1"), + ac = StMoMo::StMoMo("log", TRUE, NULL, "1"), + ap = StMoMo::StMoMo("log", TRUE, "1", NULL), + pc = StMoMo::StMoMo("log", FALSE, "1", "1"), + apc = StMoMo::apc(), + cbd = StMoMo::cbd(link = "log"), + m6 = StMoMo::m6(link = "log"), + m7 = StMoMo::m7(link = "log") +) + +model_components <- list( + a = c(age = TRUE, period = FALSE, cohort = FALSE), + p = c(age = FALSE, period = TRUE, cohort = FALSE), + c = c(age = FALSE, period = FALSE, cohort = TRUE), + ac = c(age = TRUE, period = FALSE, cohort = TRUE), + ap = c(age = TRUE, period = TRUE, cohort = FALSE), + pc = c(age = FALSE, period = TRUE, cohort = TRUE), + apc = c(age = TRUE, period = TRUE, cohort = TRUE), + cbd = c(age = TRUE, period = TRUE, cohort = FALSE), + m6 = c(age = TRUE, period = TRUE, cohort = TRUE), + m7 = c(age = TRUE, period = TRUE, cohort = TRUE) +) diff --git a/R/plotclmplusmodel.R b/R/plotclmplusmodel.R index 4d6264d..c9046ad 100644 --- a/R/plotclmplusmodel.R +++ b/R/plotclmplusmodel.R @@ -24,57 +24,13 @@ plot.clmplusmodel <- function(x, heat.lim=c(-2.5,2.5), ...){ - if((x$apc_input$hazard.model %in% names(pkg.env$models))|(x$apc_input$hazard.model=="user.defined")){ - - res.m = stats::residuals(x$model.fit) - res.tr=pkg.env$c2t(res.m$residuals) + if (x$apc_input$hazard.model %in% names(supported_models)) { + res.tr <- x$hazard_scaled_deviance_residuals colnames(res.tr) <- rownames(res.tr) <- c(0:(dim(res.tr)[2]-1)) longdf.no.0 = ChainLadder::as.LongTriangle(res.tr) } - # if(x$apc_input$hazard.model == 'lc'){ - # - # data.O= x$model.fit$data.T$occurrance - # data.E= x$model.fit$data.T$exposure - # ind <- is.na(data.E) - # W = matrix(1,nrow=dim(data.O)[1],ncol=dim(data.E)[2]) - # W[ind]=0 - # - # ax.mx = matrix(rep(x$model.fit$ax,dim(data.O)[2]), - # byrow = F, - # ncol=dim(data.O)[2]) - # - # bx.mx = matrix(rep(x$model.fit$bx, - # dim(data.O)[2]), - # byrow = F, - # ncol=dim(data.O)[2]) - # - # kt.mx = matrix(rep(x$model.fit$kt, - # dim(data.O)[1]), - # byrow = T, - # nrow=dim(data.O)[1]) - # - # - # mu.mx = exp(ax.mx+bx.mx*kt.mx) - # - # data.O.h = data.E*mu.mx - # - # res <- array(NA, dim(W)) - # - # res[!ind] <- 2 * W[!ind] * (data.O[!ind] * log(data.O[!ind] / data.O.h[!ind]) - (data.O[!ind] - data.O.h[!ind])) - # signRes <- sign(data.O - data.O.h) - # - # phi <- sum(res[!ind]) / ((dim(data.O)[1]*(dim(data.O)[1]+1))/2 - 3*dim(data.O)[1]) - # res.m <- signRes * sqrt(abs(res) / phi) - # - # res.tr=pkg.env$c2t(res.m) - # colnames(res.tr) <- rownames(res.tr) <- c(0:(dim(res.tr)[2]-1)) - # longdf.no.0 = ChainLadder::as.LongTriangle(res.tr) - # - # } - # - # p_hm <- ggplot2::ggplot(data=longdf.no.0, ggplot2::aes(x=as.integer(dev)-1, y=as.integer(origin)-1)) + ggplot2::geom_tile(ggplot2::aes(fill = value))+ggplot2::scale_y_reverse()+ ggplot2::scale_fill_gradient2(name="model residuals", diff --git a/R/plotclmpluspredictions.R b/R/plotclmpluspredictions.R index e981791..35956e3 100644 --- a/R/plotclmpluspredictions.R +++ b/R/plotclmpluspredictions.R @@ -26,10 +26,11 @@ plot.clmpluspredictions <- function(x, if(!is.null(x$apc_output$hazard.model)){ - a.tp <- grepl('a',x$apc_output$hazard.model) - c.tp <- grepl('c',x$apc_output$hazard.model) - p.tp <- grepl('p',x$apc_output$hazard.model) - lc.tp <- grepl('lc',x$apc_output$hazard.model) + components <- model_components[[x$apc_output$hazard.model]] + a.tp <- isTRUE(components[["age"]]) + c.tp <- isTRUE(components[["cohort"]]) + p.tp <- isTRUE(components[["period"]]) + lc.tp <- FALSE if(lc.tp){ diff --git a/R/predictReserve.R b/R/predictReserve.R index 5a0a310..90d4d6e 100644 --- a/R/predictReserve.R +++ b/R/predictReserve.R @@ -1,110 +1,57 @@ -#' Predict reserve cells from a clmplus model +#' Predict reserves #' -#' Converts a fitted clmplus model, or its prediction object, into the -#' ReSurv reserving interface: AP, DP, CP, IBNR. -#' -#' @param object A clmplusmodel or clmpluspredictions object. -#' @param granularity Ignored. Included for compatibility with ReSurv. -#' @param lower_triangle_only Logical. If TRUE, return only predicted lower-triangle cells. -#' @param ... Passed to predict.clmplusmodel(). -#' -#' @return A data.frame with AP, DP, CP, IBNR. +#' Re-export of [ReSurv::predictReserve()]. +#' @param object A fitted model or prediction object. +#' @param ... Additional arguments passed to a method. +#' @export +predictReserve <- ReSurv::predictReserve + +#' Convert clmplus predictions to the ReSurv reserving interface #' +#' @param object A `clmplusmodel` or `clmpluspredictions` object. +#' @param granularity Ignored; retained for ReSurv compatibility. +#' @param lower_triangle_only Return only forecast lower-triangle cells. +#' @param ... Arguments passed to [predict.clmplusmodel()]. +#' @return A data frame containing `AP`, `DP`, `CP`, and `IBNR`. #' @importFrom ReSurv predictReserve #' @export #' @method predictReserve clmplusmodel -predictReserve.clmplusmodel <- function(object, - granularity = NULL, - lower_triangle_only = TRUE, - ...) { - +predictReserve.clmplusmodel <- function(object, granularity = NULL, + lower_triangle_only = TRUE, ...) { if (!inherits(object, "clmplusmodel")) { stop("`object` must be a `clmplusmodel` object.", call. = FALSE) } - - pred <- predict(object, ...) - predictReserve.clmpluspredictions( - object = pred, - granularity = granularity, + stats::predict(object, ...), granularity = granularity, lower_triangle_only = lower_triangle_only ) } - #' @rdname predictReserve.clmplusmodel #' @export #' @method predictReserve clmpluspredictions -predictReserve.clmpluspredictions <- function(object, - granularity = NULL, - lower_triangle_only = TRUE, - ...) { - +predictReserve.clmpluspredictions <- function(object, granularity = NULL, + lower_triangle_only = TRUE, ...) { if (!inherits(object, "clmpluspredictions")) { stop("`object` must be a `clmpluspredictions` object.", call. = FALSE) } - - if (is.null(object$full_triangle)) { - stop("`object$full_triangle` is missing.", call. = FALSE) - } - - if (is.null(object$lower_triangle)) { - stop("`object$lower_triangle` is missing.", call. = FALSE) + full <- as.matrix(object$full_triangle) + lower <- as.matrix(object$lower_triangle) + if (!identical(dim(full), dim(lower)) || nrow(full) != ncol(full)) { + stop("Prediction triangles must be square matrices of equal dimensions.", call. = FALSE) } - - full_triangle <- as.matrix(object$full_triangle) - lower_triangle <- as.matrix(object$lower_triangle) - - if (!all(dim(full_triangle) == dim(lower_triangle))) { - stop( - "`full_triangle` and `lower_triangle` must have the same dimensions.", - call. = FALSE - ) - } - - J <- nrow(full_triangle) - - if (ncol(full_triangle) != J) { - stop("`full_triangle` must be square.", call. = FALSE) - } - - incremental_full <- full_triangle - - incremental_full[, 1L] <- full_triangle[, 1L] - - if (J >= 2L) { - for (jj in 2:J) { - incremental_full[, jj] <- full_triangle[, jj] - full_triangle[, jj - 1L] - } - } - - lower_mask <- !is.na(lower_triangle) - - if (!isTRUE(lower_triangle_only)) { - lower_mask <- matrix(TRUE, nrow = J, ncol = J) - } - - AP <- rep(seq_len(J), times = J) - DP <- rep(seq_len(J), each = J) - + incremental <- full + incremental[, -1L] <- full[, -1L, drop = FALSE] - full[, -ncol(full), drop = FALSE] + index <- which(if (isTRUE(lower_triangle_only)) !is.na(lower) else !is.na(incremental), + arr.ind = TRUE) out <- data.frame( - AP = AP, - DP = DP, - CP = AP + DP - 1L, - IBNR = as.numeric(incremental_full[cbind(AP, DP)]) + AP = as.integer(index[, 1L]), + DP = as.integer(index[, 2L]), + CP = as.integer(rowSums(index) - 1L), + IBNR = as.numeric(incremental[index]) ) - - out <- out[as.vector(lower_mask), , drop = FALSE] - - out$AP <- as.integer(out$AP) - out$DP <- as.integer(out$DP) - out$CP <- as.integer(out$CP) - out$IBNR <- as.numeric(out$IBNR) - out <- out[is.finite(out$IBNR), , drop = FALSE] out <- out[order(out$AP, out$DP), , drop = FALSE] - rownames(out) <- NULL - out -} \ No newline at end of file +} diff --git a/R/predictclmplusmodel.R b/R/predictclmplusmodel.R index 6cbcfdd..33304bd 100644 --- a/R/predictclmplusmodel.R +++ b/R/predictclmplusmodel.R @@ -8,7 +8,7 @@ #' @param gk.order \code{integer}, order of the arima model with drift for the accident year effect extrapolation. Default to (1,1,0). #' @param ckj.order \code{integer}, order of the arima model with drift for the calendar year effect extrapolation. Default to (0,1,0). #' @param forecasting_horizon \code{integer}, between 1 and the triangle width. Calendar periods ahead for the predictions. Default predictions are to run-off. -#' @param constrained_development_factor \code{logical}, if \code{TRUE} the predict function will set negative development factors to 1. +#' @param constrained_development_factors \code{logical}, if \code{TRUE} the predict function will set negative development factors to 1. #' @param ... Extra arguments to be passed to the predict function. #' #' @return Returns the following output: @@ -42,115 +42,59 @@ predict.clmplusmodel <- function(object, forecasting_horizon=NULL, constrained_development_factors=FALSE, ...){ - - # forecasting horizon - J <- object$apc_input$J - # fitted model + if (!inherits(object, "clmplusmodel")) { + stop("`object` must be a `clmplusmodel` object.", call. = FALSE) + } + size <- object$apc_input$J + horizon <- validate_horizon(forecasting_horizon, size) model <- object$model.fit - # occurrences distribution eta <- object$apc_input$eta - # hazard model - hazard.model <- object$apc_input$hazard.model - # diagonal - d <- object$apc_input$diagonal[1:J-1] - # cumulative payments - cumulative.payments.triangle <- object$apc_input$cumulative.payments.triangle - - if(hazard.model %in% names(pkg.env$models)){ - - alphaij <- pkg.env$fcst(model, - hazard.model = hazard.model, - gk.fc.model=gk.fc.model, - ckj.fc.model=ckj.fc.model, - gk.order=gk.order, - ckj.order=ckj.order + model_name <- object$apc_input$hazard.model + if (!model_name %in% names(supported_models)) { + stop("The fitted object's hazard model is not supported.", call. = FALSE) + } + + alphaij <- forecast_hazard_rates( + model, model_name, gk.fc.model, ckj.fc.model, gk.order, ckj.order ) - - fij=(1+(1-eta)*alphaij$rates)/(1-(eta*alphaij$rates)) - - if(constrained_development_factors){fij=apply(fij,MARGIN = 2,function(x) pmax(1,x))} - - # browser() - - # d=AggregateDataPP$diagonal[1:(J-1)] - if(is.null(forecasting_horizon)){ - J.stop=J - }else{ - J.stop=forecasting_horizon + factors <- (1 + (1 - eta) * alphaij$rates) / (1 - eta * alphaij$rates) + if (isTRUE(constrained_development_factors)) factors <- pmax(1, factors) + + forecast <- matrix(0, size, horizon) + forecast[, 1L] <- c(0, object$apc_input$diagonal[seq_len(size - 1L)]) * factors[, 1L] + if (horizon >= 2L) { + for (calendar in 2L:horizon) { + forecast[, calendar] <- c(0, forecast[seq_len(size - 1L), calendar - 1L]) * + factors[, calendar] } - - - lt=array(0.,c(J,J.stop)) - - if(!is.null(forecasting_horizon)){ - # plus one is added artificially to make indexing consistent - J.stop=J.stop+1 } - - lt[,1]=c(0.,d)*fij[,1] - - if(J.stop>2){ - for(j in 2:J.stop){lt[,j]=c(0.,lt[1:(J-1),(j-1)])*fij[,j]} - } - - # ot_=pkg.env$t2c(AggregateDataPP$cumulative.payments.triangle) + factors <- factors[, seq_len(horizon), drop = FALSE] + observed_calendar <- triangle_to_calendar(object$apc_input$cumulative.payments.triangle) - ot_=pkg.env$t2c(cumulative.payments.triangle) - - if(is.null(forecasting_horizon)){ - - - ultimate_cost=c(rev(lt[J,1:(J-1)]),ot_[J,J]) - reserve=rev(ultimate_cost-ot_[,J]) - ultimate_cost=rev(ultimate_cost) - #remove last column (not necessary) - lt <- lt[,1:(dim(lt)[2]-1)] - fij <- fij[,1:(dim(fij)[2]-1)] - - }else{ - - ultimate_cost=rev(lt[,J.stop-1]) - ultimate_cost<-c(ultimate_cost[ultimate_cost==0],ultimate_cost[ultimate_cost!=0]) - ultimate_cost[1]=c(ot_[J,J]) - - fij <- fij[1:dim(lt)[1],1:dim(lt)[2],drop=FALSE] - - if(J.stop>2){ - - for(cohort in 2:(J.stop-1)){ - - ultimate_cost[cohort] <- lt[J,cohort-1] - - } - - } - - reserve=ultimate_cost-rev(ot_[,J]) - - } - - - names(reserve) <- 0:(length(reserve)-1) - names(ultimate_cost) <- 0:(length(ultimate_cost)-1) - - out <- list(reserve=reserve, - ultimate_cost=ultimate_cost, - full_triangle= pkg.env$create_full_triangle(cumulative.payments.triangle=cumulative.payments.triangle, - lt), - lower_triangle = pkg.env$create_lower_triangle(lt), - development_factors_predicted = pkg.env$create_lower_triangle(fij), - apc_output=list(model.fit=model, - hazard.model=hazard.model, - alphaij=alphaij, - lower_triangle_apc=lt, - development_factors_apc=fij)) - - class(out) <- 'clmpluspredictions' - - return(out) - - - + if (is.null(forecasting_horizon)) { + ultimate_cost <- rev(c(rev(forecast[size, ]), observed_calendar[size, size])) + } else { + ultimate_cost <- rev(forecast[, horizon]) + ultimate_cost <- c(ultimate_cost[ultimate_cost == 0], ultimate_cost[ultimate_cost != 0]) + ultimate_cost[1L] <- observed_calendar[size, size] + if (horizon >= 2L) ultimate_cost[2L:horizon] <- forecast[size, seq_len(horizon - 1L)] } + reserve <- ultimate_cost - rev(observed_calendar[, size]) + names(reserve) <- names(ultimate_cost) <- seq_along(reserve) - 1L + + lower <- place_forecast_triangle(forecast) + out <- list( + reserve = reserve, + ultimate_cost = ultimate_cost, + full_triangle = place_forecast_triangle(forecast, object$apc_input$cumulative.payments.triangle), + lower_triangle = lower, + development_factors_predicted = place_forecast_triangle(factors), + apc_output = list( + model.fit = model, hazard.model = model_name, alphaij = alphaij, + lower_triangle_apc = forecast, development_factors_apc = factors + ) + ) + class(out) <- "clmpluspredictions" + out } diff --git a/R/properties.R b/R/properties.R deleted file mode 100644 index f42c1e6..0000000 --- a/R/properties.R +++ /dev/null @@ -1,18 +0,0 @@ -rtt.input.env <- new.env() - -# Input checks ---- - -rtt.input.env$properties.cpt <- function(cumulative.payments.triangle){ - - if(sum(cumulative.payments.triangle<0, na.rm = T) !=0 ){ - stop('Please provide an input triangle without negative values') - } - - temp = ChainLadder::cum2incr(cumulative.payments.triangle) - - if(sum(temp<0, na.rm = T) !=0 ){ - stop('Please provide an input triangle of cumulative payments.\n Payments recoveries are not allowed in our model framework.') - } - -} - diff --git a/R/triangle-transformations.R b/R/triangle-transformations.R new file mode 100644 index 0000000..80aee10 --- /dev/null +++ b/R/triangle-transformations.R @@ -0,0 +1,38 @@ +triangle_to_calendar <- function(x) { + nr <- nrow(x) + nc <- ncol(x) + out <- matrix(NA_real_, nr, nc) + index <- which(row(x) + col(x) <= nc + 1L, arr.ind = TRUE) + out[cbind(index[, 2L], rowSums(index) - 1L)] <- x[index] + out +} + +calendar_to_triangle <- function(x) { + nr <- nrow(x) + nc <- ncol(x) + out <- matrix(NA_real_, nr, nc) + index <- which(row(out) + col(out) <= nc + 1L, arr.ind = TRUE) + out[index] <- x[cbind(index[, 2L], rowSums(index) - 1L)] + out +} + +triangle_to_full_calendar <- function(x) { + nr <- nrow(x) + nc <- ncol(x) + out <- matrix(NA_real_, nr, 2L * nc) + index <- which(matrix(TRUE, nr, nc), arr.ind = TRUE) + out[cbind(index[, 2L], rowSums(index) - 1L)] <- x[index] + out +} + +place_forecast_triangle <- function(forecast, observed = NULL) { + size <- nrow(forecast) + out <- if (is.null(observed)) matrix(NA_real_, size, size) else observed + index <- which(row(out) + col(out) > size + 1L, arr.ind = TRUE) + calendar <- rowSums(index) - size - 1L + valid <- calendar >= 1L & calendar <= ncol(forecast) + index <- index[valid, , drop = FALSE] + calendar <- calendar[valid] + out[index] <- forecast[cbind(index[, 2L], calendar)] + out +} diff --git a/R/validation.R b/R/validation.R new file mode 100644 index 0000000..6bfb209 --- /dev/null +++ b/R/validation.R @@ -0,0 +1,31 @@ +validate_triangle <- function(x, weights = NULL, eta = 0.5) { + if (!is.matrix(x) || !is.numeric(x) || nrow(x) != ncol(x) || nrow(x) < 2L) { + stop("`cumulative.payments.triangle` must be a square numeric matrix with at least two rows.", call. = FALSE) + } + if (length(eta) != 1L || !is.finite(eta) || eta <= 0 || eta > 1) { + stop("`eta` must be one finite number in (0, 1].", call. = FALSE) + } + if (any(x < 0, na.rm = TRUE)) { + stop("Please provide an input triangle without negative values.", call. = FALSE) + } + incremental <- x + incremental[, -1L] <- x[, -1L, drop = FALSE] - x[, -ncol(x), drop = FALSE] + if (any(incremental < 0, na.rm = TRUE)) { + stop("Please provide an input triangle of cumulative payments. Payments recoveries are not allowed in our model framework.", call. = FALSE) + } + if (!is.null(weights) && (!is.matrix(weights) || !identical(dim(weights), dim(x)) || + !is.numeric(weights) || any(!is.finite(weights[!is.na(weights)])) || + any(weights < 0, na.rm = TRUE))) { + stop("`entries.weights` must be a non-negative numeric matrix with the same dimensions as the triangle.", call. = FALSE) + } + incremental +} + +validate_horizon <- function(horizon, size) { + if (is.null(horizon)) return(size - 1L) + if (length(horizon) != 1L || is.na(horizon) || horizon != as.integer(horizon) || + horizon < 1L || horizon > size - 1L) { + stop("`forecasting_horizon` must be an integer between 1 and J - 1.", call. = FALSE) + } + as.integer(horizon) +} diff --git a/data-raw/amases.gtpl.R b/data-raw/amases.gtpl.R new file mode 100644 index 0000000..592ef8d --- /dev/null +++ b/data-raw/amases.gtpl.R @@ -0,0 +1 @@ +load(file.path("data", "amases.gtpl.rda")) diff --git a/data-raw/amases.mod.R b/data-raw/amases.mod.R new file mode 100644 index 0000000..43087ed --- /dev/null +++ b/data-raw/amases.mod.R @@ -0,0 +1 @@ +load(file.path("data", "amases.mod.rda")) diff --git a/data-raw/amases.mtpl.R b/data-raw/amases.mtpl.R new file mode 100644 index 0000000..d13d87e --- /dev/null +++ b/data-raw/amases.mtpl.R @@ -0,0 +1 @@ +load(file.path("data", "amases.mtpl.rda")) diff --git a/data-raw/sifa.gtpl.R b/data-raw/sifa.gtpl.R new file mode 100644 index 0000000..df7fbc3 --- /dev/null +++ b/data-raw/sifa.gtpl.R @@ -0,0 +1 @@ +load(file.path("data", "sifa.gtpl.rda")) diff --git a/data-raw/sifa.mod.R b/data-raw/sifa.mod.R new file mode 100644 index 0000000..7c7af80 --- /dev/null +++ b/data-raw/sifa.mod.R @@ -0,0 +1 @@ +load(file.path("data", "sifa.mod.rda")) diff --git a/data-raw/sifa.mtpl.R b/data-raw/sifa.mtpl.R new file mode 100644 index 0000000..dbbac8e --- /dev/null +++ b/data-raw/sifa.mtpl.R @@ -0,0 +1 @@ +load(file.path("data", "sifa.mtpl.rda")) diff --git a/data/amases.gtpl.R b/data/amases.gtpl.R deleted file mode 100644 index 56f538e..0000000 --- a/data/amases.gtpl.R +++ /dev/null @@ -1 +0,0 @@ -load("amases.gtpl.RDa") diff --git a/data/amases.gtpl.RDa b/data/amases.gtpl.rda similarity index 100% rename from data/amases.gtpl.RDa rename to data/amases.gtpl.rda diff --git a/data/amases.mod.R b/data/amases.mod.R deleted file mode 100644 index 4577b89..0000000 --- a/data/amases.mod.R +++ /dev/null @@ -1 +0,0 @@ -load("amases.mod.RDa") \ No newline at end of file diff --git a/data/amases.mod.RDa b/data/amases.mod.rda similarity index 100% rename from data/amases.mod.RDa rename to data/amases.mod.rda diff --git a/data/amases.mtpl.R b/data/amases.mtpl.R deleted file mode 100644 index 8bdaf4e..0000000 --- a/data/amases.mtpl.R +++ /dev/null @@ -1 +0,0 @@ -load("amases.mtpl.RDa") \ No newline at end of file diff --git a/data/amases.mtpl.RDa b/data/amases.mtpl.rda similarity index 100% rename from data/amases.mtpl.RDa rename to data/amases.mtpl.rda diff --git a/data/amasesgtpl.RDa b/data/amasesgtpl.RDa deleted file mode 100644 index 2d9eea28ab81926f8cccabe9d5e8747d59d3a098..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 494 zcmV(ulzzQPRZZkq}|K5-~S|bnFccjh4o3 zq9(*+GIV2-hDa(55++F#qmZ;UbP}bxub2IkvVQ~dp&Rkxn3id<1#z$#bwYawOwY`+ z)}l@@fcHn+E~ckVvicZjcxt4w1) z)RV?*!CePWTEu-+{F1BiZ*}17J{$q_6eb37C$TEUk_p5$C z@TDcpBT?+c9Hzs6!BzP2GjNl-KjkX?#0vKx+*f_~i^}LWTd5S#l}hJhy|JjfEW9Al kgNB)q%(f4j`Tib@NscqEJk2=h=_$2d0J;hCizNjB0A}d^=l}o! diff --git a/data/amasesmod.RDa b/data/amasesmod.RDa deleted file mode 100644 index c1b33112ee94a943517c69337dae031c09043d5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 473 zcmV;~0Ve(*iwFP!000002DOySD@0Ko#}6~(F&+_XjZ#)LkutkmWI;(nW9KqVQ!~g| z*qJ}TVpfzSW`QJTBaameg&B{fl}AD-?qeD=M9!S=(Ls{u;@s~!zws8&Z>gupL4Db@;+M`=EeXGLQPIZq zYHW?^W$2jc`8D*q!pHPB89rss%2Yk_Gu6tt7J#SDLvKcKUKt|TKj6Ni2KZWfnd-yf zM+>2M4-(VZDg5yb_+uw5-(W29Obtjki^!`?;+&?zr`6%Sx`6Zgp#r`i8nfZOaT{{o z7fY|Xg1^N1fgErjac`{^_fpsQnMPVUf0XC0!hXEI_am<0FHe9!1+JdN`R&N9Zh#Z% z!26?Pybrb3&$xoW(#H9?hn^7xzYBTQEerS#o_~DeD_p_fME{g&^i$8qT66lq-$p&+ zCg0%-ehB%L8Qz~<^g(lhtA>3);R=3O0)LkC^YA@1cknk{!QbKipXdF_{}Zm@@ACW$ zf65j7J*badjC7EdbNpodIB)-v`1MbTxp`HzBmJKm~;U z{{&2n?0W;I#a8NoY4LRsafwifIsJs|rjj*&P7W z%4teqS|y|nOsh+?KnD7|U}SX?^S2V(Bs9Edrt9uWQEeqdVlwHBCG zbM6Dv8o|H7v=+k`Fs<|N0kXMp^X1AQ=E%P2fw=e43W)ozLc&eW;{n87i?>0{?Jt9v zyA|wCM_mauZ05qvS5V#pRwuu%0TK>Z=0V*3;|RpuY>0gtclUs4&EEVDlF?RR#U4`VzhOed0H+HI5p#TDVu4grokDJ z_AYRul*mA*lBfg6&cR`N?r>229-M6hSBpU380d|H3ssTB)_bQO{hp8gkU zPIqg(%ZRT(gBwArBT(G{xY!9U7Z3-*?GdVDPw>kAr91MjfB`?~AEml+pMmQ2f@`k z><_`C5u3nB*q#ip>_4FIM!ZN$zaRWZS^wgV^W6_hVK7-Za`=$K*%%2as%Eobwem$? iED6C3TaQWTG@4szpJowwMEVq8rSS$hcRD=X1-+R;i2BPE~Yumz)Y-?YemT879GAx7tgBU@rrP&3S&Z|Rnjyb zq&PMbCbdv}W*0O)?-h2%EXr<~A!WuErQi}2l~=@9gu__=z@&liYWa1?Rh@KNUt zag`0!zXbjS>PEepI`VTkXa3gq5m)E$fqw^n6!kBI?+0HZ%`|{Nz`o+@`~&pm0q?>0 zkt5&-$WQN+W?H20aCJWVoejNNJ z@Q%P=50}E#`AOoXn$eF0`wOnlm(hQFNqzX7ulx)5Ro~rDMwiFOrJ4`buA)(tVjlI1 mA@ygj)sk?pO$9xof80BU*y0npGtF1e>UaTJF$l;a1pom2QR906 diff --git a/data/sifamtpl.RDa b/data/sifamtpl.RDa deleted file mode 100644 index a224dc4a44947a54b4b3e37bde6cf39f911228b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 905 zcmV;419to$iwFP!000001`BeDFy@NjVqjokW?*3glB_@`18ZoAo2~@|ScHL*frWt+ zNOKlvrX}j-mK5XwmGJ=uCOF(a-ftiDN6q2B*uIJ~f`+M?@g$#$6Ymf7I?uv7G zGv@)wdWW}_8rOX5`5oTq=$^l_pUdIHywJLzx0M_|vmBC``%%K-%We;=JDd#;Umv8T z_b`Mw{9t_Pv;B&=!;ipC({A(LaQI%<;8<_>9RBooy-hFYaQNfTSuYu2?C^I_4R3yk56oP+`Ja+zFx~l*3XABPiL{7c3JSyw(zvtK+@z?7e{!LK6 z|M7-`!@qJxU+!)1(9MOL|CyIvS2ca6!#7SpWl`RB4nLB!>tC~bJN&9;c`JGEoWt)a zZW~hGymI)@wPenUM~@sCs)VLI($aDGzwOvWiG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x4Hk^FbMlWblv4g z%L6YaiKgx9ZDFMcfh$KB_ja~Q;`Q?a$q&MJPyPYipue_*e{aC5p$W}S6q?Y1C35S( zM`kFrG8&8eB~SxlD0_P(q3cR)t6BmirGPFdv3r9XHO&!g@987e+32n%=fSTU~hM%J+(LhBtb3y=L3L9 zNl8cn>;ZpjV8Swq4*>nA27(YS8~>?+r6maM;J;~5FyYeiH%&%@a0U6hCQZ0C{HG=k zCa(YQn#?~n8Hs=72NM6MuM`CGk6fgrA%B?<=MG0XBi#wjeE`rH<%=Zj3jnBvw#NX7 k|FaPQXoSHKFHC=2Z?HJHJMQNWN Date: Fri, 24 Jul 2026 09:22:07 +0200 Subject: [PATCH 04/11] removing warnings --- .github/workflows/r-checkrelease.yml | 31 +- DESCRIPTION | 8 +- R/AggregateDataPP.R | 42 +- R/clmplusAggregateDataPP.R | 376 +++--- R/data.R | 30 +- R/plotAggregateDataPP.R | 11 +- R/plotclmplusmodel.R | 12 +- R/plotclmpluspredictions.R | 38 +- docs/404.html | 6 +- docs/404.md | 3 + docs/articles/casestudy1.html | 140 +-- docs/articles/casestudy1.md | 369 ++++++ .../figure-html/ac effects-1.png | Bin 57539 -> 57525 bytes .../figure-html/apc effects-1.png | Bin 80664 -> 80493 bytes .../figure-html/plot effects ax-1.png | Bin 43570 -> 43330 bytes docs/articles/index.html | 8 +- docs/articles/index.md | 8 + docs/articles/modelscomparison.html | 807 +----------- docs/articles/modelscomparison.md | 85 ++ .../figure-html/plots-1.png | Bin 0 -> 24766 bytes .../figure-html/plots-2.png | Bin 0 -> 73402 bytes docs/authors.html | 6 +- docs/authors.md | 31 + docs/deps/bootstrap-5.3.1/bootstrap.min.css | 2 +- docs/index.html | 12 +- docs/index.md | 136 ++ docs/katex-auto.js | 4 +- docs/lightswitch.js | 4 +- docs/llms.txt | 179 +++ docs/pkgdown.js | 192 +-- docs/pkgdown.yml | 6 +- docs/reference/AggregateDataPP.html | 48 +- docs/reference/AggregateDataPP.md | 92 ++ docs/reference/amases.gtpl.html | 11 +- docs/reference/amases.gtpl.md | 20 + docs/reference/amases.mod.html | 11 +- docs/reference/amases.mod.md | 20 + docs/reference/amases.mtpl.html | 11 +- docs/reference/amases.mtpl.md | 20 + docs/reference/clmplus-1.png | Bin 0 -> 29150 bytes docs/reference/clmplus.AggregateDataPP.html | 261 +--- docs/reference/clmplus.default.html | 164 +-- docs/reference/clmplus.html | 263 ++-- docs/reference/clmplus.md | 175 +++ docs/reference/index.html | 68 +- docs/reference/index.md | 33 + docs/reference/plot.AggregateDataPP-1.png | Bin 127953 -> 129443 bytes docs/reference/plot.AggregateDataPP.html | 17 +- docs/reference/plot.AggregateDataPP.md | 41 + docs/reference/plot.clmplusmodel-1.png | Bin 29079 -> 29159 bytes docs/reference/plot.clmplusmodel.html | 86 +- docs/reference/plot.clmplusmodel.md | 49 + docs/reference/plot.clmpluspredictions-1.png | Bin 44135 -> 42726 bytes docs/reference/plot.clmpluspredictions.html | 89 +- docs/reference/plot.clmpluspredictions.md | 49 + docs/reference/predict.clmplusmodel.html | 11 +- docs/reference/predict.clmplusmodel.md | 104 ++ .../predictReserve.clmplusmodel.html | 97 ++ docs/reference/predictReserve.clmplusmodel.md | 35 + .../predictReserve.clmpluspredictions.html | 8 + docs/reference/predictReserve.html | 81 ++ docs/reference/predictReserve.md | 19 + docs/reference/sifa.gtpl.html | 11 +- docs/reference/sifa.gtpl.md | 20 + docs/reference/sifa.mod.html | 11 +- docs/reference/sifa.mod.md | 20 + docs/reference/sifa.mtpl.html | 11 +- docs/reference/sifa.mtpl.md | 20 + docs/search.json | 2 +- docs/sitemap.xml | 4 +- inst/references.bib | 8 - man/AggregateDataPP.Rd | 42 +- man/amases.gtpl.Rd | 5 +- man/amases.mod.Rd | 5 +- man/amases.mtpl.Rd | 5 +- man/clmplus.AggregateDataPP.Rd | 93 -- man/clmplus.Rd | 151 ++- man/clmplus.default.Rd | 79 -- man/plot.AggregateDataPP.Rd | 7 +- man/plot.clmplusmodel.Rd | 10 +- man/plot.clmpluspredictions.Rd | 11 +- man/sifa.gtpl.Rd | 5 +- man/sifa.mod.Rd | 5 +- man/sifa.mtpl.Rd | 5 +- tests/testthat/Rplots.pdf | Bin 6198 -> 11731 bytes tests/testthat/test-fitting-output.R | 53 + tests/testthat/test-no-apc-dependency.R | 23 + .../testthat/test-predict-reserve-and-plots.R | 19 +- vignettes/casestudy1.Rmd | 50 +- vignettes/modelscomparison.Rmd | 1109 +---------------- 90 files changed, 2846 insertions(+), 3367 deletions(-) create mode 100644 docs/404.md create mode 100644 docs/articles/casestudy1.md create mode 100644 docs/articles/index.md create mode 100644 docs/articles/modelscomparison.md create mode 100644 docs/articles/modelscomparison_files/figure-html/plots-1.png create mode 100644 docs/articles/modelscomparison_files/figure-html/plots-2.png create mode 100644 docs/authors.md create mode 100644 docs/index.md create mode 100644 docs/llms.txt create mode 100644 docs/reference/AggregateDataPP.md create mode 100644 docs/reference/amases.gtpl.md create mode 100644 docs/reference/amases.mod.md create mode 100644 docs/reference/amases.mtpl.md create mode 100644 docs/reference/clmplus-1.png create mode 100644 docs/reference/clmplus.md create mode 100644 docs/reference/index.md create mode 100644 docs/reference/plot.AggregateDataPP.md create mode 100644 docs/reference/plot.clmplusmodel.md create mode 100644 docs/reference/plot.clmpluspredictions.md create mode 100644 docs/reference/predict.clmplusmodel.md create mode 100644 docs/reference/predictReserve.clmplusmodel.html create mode 100644 docs/reference/predictReserve.clmplusmodel.md create mode 100644 docs/reference/predictReserve.clmpluspredictions.html create mode 100644 docs/reference/predictReserve.html create mode 100644 docs/reference/predictReserve.md create mode 100644 docs/reference/sifa.gtpl.md create mode 100644 docs/reference/sifa.mod.md create mode 100644 docs/reference/sifa.mtpl.md delete mode 100644 man/clmplus.AggregateDataPP.Rd delete mode 100644 man/clmplus.default.Rd create mode 100644 tests/testthat/test-fitting-output.R create mode 100644 tests/testthat/test-no-apc-dependency.R diff --git a/.github/workflows/r-checkrelease.yml b/.github/workflows/r-checkrelease.yml index 7da532b..3a7ded5 100644 --- a/.github/workflows/r-checkrelease.yml +++ b/.github/workflows/r-checkrelease.yml @@ -23,9 +23,28 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::rcmdcheck, any::testthat, any::devtools, any::viridis, github::cran/apc + extra-packages: any::rcmdcheck, any::testthat, any::devtools needs: check + - name: Verify no active apc package dependency remains + shell: bash + run: | + if grep -RInE \ + --exclude-dir=.git --exclude-dir=docs \ + --exclude=test-no-apc-dependency.R \ + --exclude=r-checkrelease.yml \ + 'library[[:space:]]*\([[:space:]]*apc[[:space:]]*\)|require[[:space:]]*\([[:space:]]*apc[[:space:]]*\)|requireNamespace[[:space:]]*\([[:space:]]*["'\'']apc["'\'']|apc::|apc\.(data|fit|forecast)|github::cran/apc' \ + DESCRIPTION NAMESPACE R tests vignettes README.md .github; then + exit 1 + fi + + - name: Regenerate and verify documentation + run: | + devtools::document() + changes <- system2("git", c("status", "--short", "--", "NAMESPACE", "man"), stdout = TRUE) + if (length(changes)) stop("Generated documentation is stale:\n", paste(changes, collapse = "\n")) + shell: Rscript {0} + - name: Run testthat suite run: testthat::test_local(stop_on_failure = TRUE) shell: Rscript {0} @@ -34,6 +53,16 @@ jobs: run: devtools::build_vignettes() shell: Rscript {0} + - name: Replication regression smoke test + run: | + data("AutoBI", package = "ChainLadder") + triangle <- ChainLadder::incr2cum(AutoBI$AutoBIPaid) + fit <- clmplus::clmplus(clmplus::AggregateDataPP(triangle), "a") + prediction <- predict(fit) + reference <- ChainLadder::MackChainLadder(triangle)$FullTriangle + stopifnot(isTRUE(all.equal(unname(prediction$full_triangle), unname(reference), tolerance = 1e-10))) + shell: Rscript {0} + - name: Build source package run: R CMD build --no-manual . diff --git a/DESCRIPTION b/DESCRIPTION index f0acd80..2df458e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -19,7 +19,7 @@ Authors@R: family = "Villegas", role = c("aut", "cph"), email="a.villegas@unsw.edu.au")) -Description: Implementation of the age-period-cohort models for the claim development presented in the manuscript 'Replicating and extending chain-ladder via an age-period-cohort structure on the claim development in a run-off triangle' . +Description: Implementation of the age-period-cohort models for the claim development presented in the manuscript 'Replicating and extending chain-ladder via an age-period-cohort structure on the claim development in a run-off triangle' . URL: https://github.com/gpitt71/clmplus, https://gpitt71.github.io/clmplus/ BugReports: https://github.com/gpitt71/clmplus/issues @@ -38,11 +38,7 @@ LazyData: true Suggests: testthat (>= 3.0.0), knitr, - rmarkdown, - apc, - dplyr, - viridis, - tidyr + rmarkdown VignetteBuilder: knitr, rmarkdown Config/testthat/edition: 3 RoxygenNote: 7.3.3 diff --git a/R/AggregateDataPP.R b/R/AggregateDataPP.R index d12e85b..e8f3ae1 100644 --- a/R/AggregateDataPP.R +++ b/R/AggregateDataPP.R @@ -1,30 +1,48 @@ #' Pre-process Run-Off Triangles #' #' Pre-process Run-Off Triangles. -#' @param cumulative.payments.triangle \code{triangle matrix} or \code{matrix array} object, input triangle of cumulative payments. -#' @param entries.weights \code{triangle matrix} or \code{matrix array} model entries weights. -#' @param eta \code{numeric}, individual claims exposure in the cell, also known as lost exposure. It must be in the interval (0,1]. +#' @param cumulative.payments.triangle A square numeric matrix with at least +#' two rows. Rows are accident periods, columns are development periods, and +#' observed upper-triangle cells satisfy `row + column <= J + 1`. Values are +#' non-negative cumulative paid amounts in the source data's monetary units, +#' non-decreasing across each row; unavailable cells may be `NA`. Recoveries +#' (negative incremental payments) are not supported. +#' @param entries.weights Optional non-negative numeric `J` by `J` matrix of +#' fitting weights in the same accident/development layout. `NULL` gives +#' observed cells weight one. The first development period and missing cells +#' are always zero-weighted after conversion to calendar coordinates. +#' @param eta One finite numeric value in `(0, 1]`, default `0.5`, describing +#' expected within-cell payment timing (lost exposure). It is used to derive +#' exposure and to convert fitted hazards to development factors. #' #' @examples #' data(sifa.mtpl) #' sifa.mtpl.rtt <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl) #' -#' @return An object of class \code{AggregateDataPP}. Lists the following elements: -#' \item{cumulative.payments.triangle}{\code{triangle matrix} object, input triangle of cumulative payments.} +#' @return An `AggregateDataPP` list with: +#' \item{cumulative.payments.triangle}{The input `J` by `J` cumulative paid +#' triangle, unchanged.} #' -#' \item{occurrance}{\code{matrix array} object, the occurrence derived from the input triangle.} +#' \item{occurrance}{A `J` by `J` matrix of incremental paid amounts in +#' development-period by calendar-period coordinates. The misspelling is +#' retained as a stable public field name.} #' -#' \item{exposure}{\code{matrix array} object, the exposure derived from the input triangle, under the \code{eta} claims arrival assumption.} +#' \item{exposure}{A `J` by `J` numeric matrix in the same calendar +#' coordinates, calculated as cumulative payments minus +#' `(1 - eta) * occurrence`.} #' -#' \item{incremental.payments.triangle}{\code{triangle matrix} object, incremental payments derived from the input.} +#' \item{incremental.payments.triangle}{A `J` by `J` +#' accident/development matrix of incremental paid amounts.} #' -#' \item{fit.w}{\code{matrix array} object, the weights used during estimation.} +#' \item{fit.w}{The `J` by `J` fitting-weight matrix in +#' development/calendar coordinates.} #' -#' \item{J}{\code{integer}, Run-off triangle dimension.} +#' \item{J}{The integer triangle dimension.} #' -#' \item{diagonal}{ \code{numeric}, cumulative payments last diagonal.} +#' \item{diagonal}{A length-`J` numeric vector containing the latest observed +#' cumulative diagonal in calendar representation.} #' -#' \item{eta}{ \code{numeric}, Expected time-to-event in the cell. I.e., lost exposure.} +#' \item{eta}{The supplied within-cell timing scalar.} #' #' #' @references diff --git a/R/clmplusAggregateDataPP.R b/R/clmplusAggregateDataPP.R index 6359e1b..2f5d6bb 100644 --- a/R/clmplusAggregateDataPP.R +++ b/R/clmplusAggregateDataPP.R @@ -1,256 +1,164 @@ -#' Fit Chain Ladder plus on Run-off Triangles. +#' Fit a Chain Ladder Plus hazard model #' -#' Method to Estimate Chain Ladder plus models. -#' -#' @param AggregateDataPP \code{AggregateDataPP} object, reverse time triangle to be fitted. -#' @param hazard.model \code{character}, hazard model supported from our package. The model can be chosen from: -#' \itemize{ -#' \item{'a': Age model, this is equivalent to the Mack chain-ladder.} -#' \item{'ac': Age and cohort effects.} -#' \item{'ap': Age and cohort effects.} -#' \item{'apc': Age cohort and period effects.} +#' Fits one of the package's age, age-cohort, age-period, or +#' age-period-cohort claim-development models to data prepared by +#' [AggregateDataPP()]. Estimation is performed by [StMoMo::fit.StMoMo()]. +#' +#' @param AggregateDataPP An object created by [AggregateDataPP()]. It contains +#' a square cumulative paid-claims triangle and the corresponding +#' development-calendar occurrence, exposure, and weight matrices. +#' @param hazard.model A required character scalar selecting `"a"` (age only, +#' equivalent to chain ladder), `"ac"` (age-cohort), `"ap"` (age-period), or +#' `"apc"` (age-period-cohort). +#' @param link,staticAgeFun,periodAgeFun,cohortAgeFun,constFun Compatibility +#' arguments retained from the original interface. The package's four +#' built-in model definitions determine these settings, so these arguments +#' are currently ignored. +#' @param effect_log_scale A logical scalar. If `TRUE` (the default), fitted +#' effects are returned on the linear-predictor/log scale; if `FALSE`, they +#' are exponentiated. +#' @param verbose A logical scalar passed to [StMoMo::fit.StMoMo()]. The default +#' `FALSE` hides StMoMo fitting progress. `TRUE` displays progress, including +#' zero-weighted ages, years, and cohorts and the start/finish of the gnm fit. +#' @param ... Reserved for future extensions; no arguments are currently +#' forwarded. +#' +#' @return A `clmplusmodel` list with: +#' \describe{ +#' \item{model.fit}{The underlying `fitStMoMo` object. Its fitted `ax`, `kt`, +#' and `gc` fields contain the selected age, period, and cohort effects; +#' inapplicable effects are `NULL`. Other fields are supplied by StMoMo and +#' should be treated as implementation details.} +#' \item{apc_input}{A list containing `J` (triangle dimension), `eta` +#' (within-cell exposure timing), `hazard.model`, `diagonal` (latest observed +#' cumulative payments by calendar representation), and the original +#' `cumulative.payments.triangle`.} +#' \item{hazard_scaled_deviance_residuals}{A `J` by `J` numeric matrix in +#' accident-year by development-year triangle orientation. Unobserved cells +#' are `NA`.} +#' \item{fitted_development_factors}{A `J` by `J` numeric matrix of fitted +#' multiplicative cumulative development factors; unavailable cells are +#' `NA`.} +#' \item{fitted_effects}{A list with `fitted_development_effect`, +#' `fitted_calendar_effect`, and `fitted_accident_effect`. Components not +#' included in the selected model are `NULL`.} #' } -#' -#' -#' @param link \code{character}, defines the link function and random component associated with -#' the mortality model. \code{"log"} would assume that deaths follow a -#' Poisson distribution and use a log link while \code{"logit"} would assume -#' that deaths follow a Binomial distribution and a logit link. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param staticAgeFun \code{logical}, indicates if a static age function -#' \eqn{\alpha_x} is to be included. To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param periodAgeFun \code{list}, a list of length \eqn{N} with the definitions of the -#' period age modulating parameters \eqn{\beta_x^{(i)}}. Each entry can take -#' values: \code{"NP"} for non-parametric age terms, \code{"1"} for -#' \eqn{\beta_x^{(i)}=1} or a predefined parametric function of -#' age (see details). Set this to \code{NULL} if there are no period terms -#' in the model. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param cohortAgeFun \code{character} or \code{function}, defines the cohort age modulating parameter -#' \eqn{\beta_x^{(0)}}. It can take values: \code{"NP"} for non-parametric -#' age terms, \code{"1"} for \eqn{\beta_x^{(0)}=1}, a predefined parametric -#' function of age (see details) or \code{NULL} if there is no cohort effect. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param effect_log_scale \code{logical}, whether effects should be on the logarithmic scale. By default, \code{TRUE}. -#' @param constFun \code{function}, it defines the identifiability constraints of the -#' model. It must be a function of the form -#' \code{constFun <- function(ax, bx, kt, b0x, gc, wxt, ages)} taking a set -#' of fitted model parameters and returning a list -#' \code{list(ax = ax, bx = bx, kt = kt, b0x = b0x, gc = gc)} -#' of the model parameters with the identifiability constraints applied. If -#' omitted no identifiability constraints are applied to the model. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param ... parameters to be passed to clmplus. -#' -#' @return No return value, called to pass method \code{clmplus.AggregateDataPP}. See \code{clmplus.AggregateDataPP} documentation. -#' +#' +#' @details Incremental payment amounts can be non-integer even though the +#' StMoMo fit uses a Poisson quasi-likelihood. Warnings whose messages begin +#' exactly with `non-integer x =` are therefore expected and are selectively +#' muffled. All other warnings, including convergence and numerical warnings, +#' remain visible. +#' #' @examples #' data(sifa.mtpl) -#' sifa.mtpl.rtt <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl) -#' hz.chl=clmplus(sifa.mtpl.rtt, 'a') -#' -#' @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). -#' +#' prepared <- AggregateDataPP(sifa.mtpl) +#' age_fit <- clmplus(prepared, hazard.model = "a", verbose = FALSE) +#' age_fit$fitted_effects +#' \donttest{ +#' apc_fit <- clmplus(prepared, hazard.model = "apc", verbose = FALSE) +#' plot(apc_fit) +#' } +#' +#' @seealso [AggregateDataPP()], [predict.clmplusmodel()], +#' [predictReserve.clmplusmodel()], [plot.clmplusmodel()] #' @export -clmplus <- function(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), - ...){ - - UseMethod("clmplus")} +clmplus <- function(AggregateDataPP, hazard.model = NULL, + link = c("log", "logit"), staticAgeFun = TRUE, + periodAgeFun = "NP", cohortAgeFun = NULL, + effect_log_scale = TRUE, verbose = FALSE, + constFun = function(ax, bx, kt, b0x, gc, wxt, ages) { + list(ax = ax, bx = bx, kt = kt, b0x = b0x, gc = gc) + }, ...) { + UseMethod("clmplus") +} -#' Fit Chain Ladder Plus to reverse time triangles. -#' -#' Default method to fit Chain Ladder plus models. -#' -#' @param AggregateDataPP \code{AggregateDataPP} object, reverse time triangle to be fitted. -#' @param hazard.model \code{character}, hazard model supported from our package. The model can be chosen from: -#' \itemize{ -#' \item{'a': Age model, this is equivalent to the Mack chain-ladder.} -#' \item{'ac': Age and cohort effects.} -#' \item{'ap': Age and cohort effects.} -#' \item{'apc': Age cohort and period effects.} -#' } -#' -#' @param link \code{character}, defines the link function and random component associated with -#' the mortality model. \code{"log"} would assume that deaths follow a -#' Poisson distribution and use a log link while \code{"logit"} would assume -#' that deaths follow a Binomial distribution and a logit link. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param staticAgeFun \code{logical}, indicates if a static age function -#' \eqn{\alpha_x} is to be included. To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param periodAgeFun \code{list}, a list of length \eqn{N} with the definitions of the -#' period age modulating parameters \eqn{\beta_x^{(i)}}. Each entry can take -#' values: \code{"NP"} for non-parametric age terms, \code{"1"} for -#' \eqn{\beta_x^{(i)}=1} or a predefined parametric function of -#' age (see details). Set this to \code{NULL} if there are no period terms -#' in the model. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param cohortAgeFun \code{character} or \code{function}, defines the cohort age modulating parameter -#' \eqn{\beta_x^{(0)}}. It can take values: \code{"NP"} for non-parametric -#' age terms, \code{"1"} for \eqn{\beta_x^{(0)}=1}, a predefined parametric -#' function of age (see details) or \code{NULL} if there is no cohort effect. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param effect_log_scale \code{logical}, whether effects should be on the logarithmic scale. By default, \code{TRUE}. -#' @param constFun \code{function}, it defines the identifiability constraints of the -#' model. It must be a function of the form -#' \code{constFun <- function(ax, bx, kt, b0x, gc, wxt, ages)} taking a set -#' of fitted model parameters and returning a list -#' \code{list(ax = ax, bx = bx, kt = kt, b0x = b0x, gc = gc)} -#' of the model parameters with the identifiability constraints applied. If -#' omitted no identifiability constraints are applied to the model. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param ... parameters to be passed to clmplus. -#' -#' @return No return value, called to pass method \code{clmplus.AggregateDataPP}. See \code{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. -#' +#' @rdname clmplus +#' @return The default method always raises an informative error because +#' `AggregateDataPP` does not inherit from `"AggregateDataPP"`. #' @export -clmplus.default <- function(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), - ...){stop("`AggregateDataPP` must inherit from class \"AggregateDataPP\".", call. = FALSE)} +clmplus.default <- function(AggregateDataPP, hazard.model = NULL, + link = c("log", "logit"), staticAgeFun = TRUE, + periodAgeFun = "NP", cohortAgeFun = NULL, + effect_log_scale = TRUE, verbose = FALSE, + constFun = function(ax, bx, kt, b0x, gc, wxt, ages) { + list(ax = ax, bx = bx, kt = kt, b0x = b0x, gc = gc) + }, ...) { + stop("`AggregateDataPP` must inherit from class \"AggregateDataPP\".", + call. = FALSE) +} -#' Fit Chain Ladder Plus to reverse time triangles. -#' -#' Method to fit Chain Ladder plus models to \code{AggregateDataPP} objects. -#' -#' @param AggregateDataPP \code{AggregateDataPP} object, reverse time triangle to be fitted. -#' @param hazard.model \code{character}, hazard model supported from our package. The model can be chosen from: -#' \itemize{ -#' \item{'a': Age model, this is equivalent to the Mack chain-ladder.} -#' \item{'ac': Age and cohort effects.} -#' \item{'ap': Age and cohort effects.} -#' \item{'apc': Age cohort and period effects.} -#' } -#' -#' @param link \code{character}, defines the link function and random component associated with -#' the mortality model. \code{"log"} would assume that deaths follow a -#' Poisson distribution and use a log link while \code{"logit"} would assume -#' that deaths follow a Binomial distribution and a logit link. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param staticAgeFun \code{logical}, indicates if a static age function -#' \eqn{\alpha_x} is to be included. To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param periodAgeFun \code{list}, a list of length \eqn{N} with the definitions of the -#' period age modulating parameters \eqn{\beta_x^{(i)}}. Each entry can take -#' values: \code{"NP"} for non-parametric age terms, \code{"1"} for -#' \eqn{\beta_x^{(i)}=1} or a predefined parametric function of -#' age (see details). Set this to \code{NULL} if there are no period terms -#' in the model. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param cohortAgeFun \code{character} or \code{function}, defines the cohort age modulating parameter -#' \eqn{\beta_x^{(0)}}. It can take values: \code{"NP"} for non-parametric -#' age terms, \code{"1"} for \eqn{\beta_x^{(0)}=1}, a predefined parametric -#' function of age (see details) or \code{NULL} if there is no cohort effect. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param effect_log_scale \code{logical}, whether effects should be on the logarithmic scale. By default, \code{TRUE}. -#' @param constFun \code{function}, it defines the identifiability constraints of the -#' model. It must be a function of the form -#' \code{constFun <- function(ax, bx, kt, b0x, gc, wxt, ages)} taking a set -#' of fitted model parameters and returning a list -#' \code{list(ax = ax, bx = bx, kt = kt, b0x = b0x, gc = gc)} -#' of the model parameters with the identifiability constraints applied. If -#' omitted no identifiability constraints are applied to the model. -#' To be disregarded unless the practitioner specifies his own hazard model in StMoMo. -#' @param ... parameters to be passed to clmplus. -#' -#' @return An object of class \code{clmplusmodel}. A list with the following elements: -#' \item{model.fit}{\code{fitStMoMo} object, specified hazard model fit from StMoMo.} -#' -#' \item{apc_input}{\code{list} object. A list containing the following model inputs in age-period-cohort notation: \code{J} (\code{integer}) Run-off triangle dimension. \code{eta} (\code{numeric}) Expected time-to-event in the cell. I.e., lost exposure. -#' \code{diagonal} (\code{numeric}) Cumulative payments last diagonal. \code{hazard.model} (\code{character}), hazard model specified from the user. Set to \code{user.specific} when a custom model is passed. -#' } -#' -#' \item{hazard_scaled_deviance_residuals}{ \code{matrix array} Triangle of the scaled deviance residuals. } -#' -#' \item{fitted_development_factors}{ \code{matrix array} Triangle of the fitted development factors. } -#' -#' \item{fitted_effects}{ \code{list} List of the development-accident-calendar effects fitted. } -#' -#' -#' @examples -#' data(sifa.mtpl) -#' sifa.mtpl.rtt <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl) -#' hz.chl=clmplus(sifa.mtpl.rtt, 'a') -#' -#' @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). -#' +#' @rdname clmplus #' @export -clmplus.AggregateDataPP <- function(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), - ...){ - - +clmplus.AggregateDataPP <- function(AggregateDataPP, hazard.model = NULL, + link = c("log", "logit"), + staticAgeFun = TRUE, + periodAgeFun = "NP", + cohortAgeFun = NULL, + effect_log_scale = TRUE, + verbose = FALSE, + constFun = function(ax, bx, kt, b0x, gc, + wxt, ages) { + list(ax = ax, bx = bx, kt = kt, + b0x = b0x, gc = gc) + }, ...) { if (length(hazard.model) != 1L || !is.character(hazard.model) || !hazard.model %in% names(supported_models)) { - stop("`hazard.model` must be one of: ", paste(names(supported_models), collapse = ", "), ".", call. = FALSE) + stop("`hazard.model` must be one of: ", + paste(names(supported_models), collapse = ", "), ".", call. = FALSE) + } + if (length(verbose) != 1L || !is.logical(verbose) || is.na(verbose)) { + stop("`verbose` must be a single non-missing logical value.", call. = FALSE) } - model <- StMoMo::fit(supported_models[[hazard.model]], - Dxt = AggregateDataPP$occurrance, - Ext = AggregateDataPP$exposure, - wxt=AggregateDataPP$fit.w, - iterMax=as.integer(1e+05)) - - - #forecasting horizon - J=dim(AggregateDataPP$cumulative.payments.triangle)[2] - - # Find fitted development factors + model <- withCallingHandlers( + StMoMo::fit( + supported_models[[hazard.model]], + Dxt = AggregateDataPP$occurrance, + Ext = AggregateDataPP$exposure, + wxt = AggregateDataPP$fit.w, + iterMax = as.integer(1e+05), + verbose = verbose + ), + warning = function(w) { + if ( + !isTRUE(verbose) || + grepl("^non-integer x\\s*=", conditionMessage(w)) + ) { + invokeRestart("muffleWarning") + } + }, + message = function(m) { + if (!isTRUE(verbose)) { + invokeRestart("muffleMessage") + } + } + ) + + J <- ncol(AggregateDataPP$cumulative.payments.triangle) fij.fit <- fitted_development_factors( J, age = model$ax, cohort = model$gc, period = model$kt, eta = AggregateDataPP$eta ) - - res.m <- stats::residuals(model) - res.tr <- calendar_to_triangle(res.m$residuals) - - fitted_effects <- extract_fitted_effects( + residuals <- stats::residuals(model) + residual_triangle <- calendar_to_triangle(residuals$residuals) + effects <- extract_fitted_effects( age = model$ax, cohort = model$gc, period = model$kt, log_scale = effect_log_scale ) - - - - out <- list(model.fit=model, - apc_input=list(J=J, - eta=AggregateDataPP$eta, - hazard.model=hazard.model, - diagonal=AggregateDataPP$diagonal, - cumulative.payments.triangle=AggregateDataPP$cumulative.payments.triangle - ), - hazard_scaled_deviance_residuals=res.tr, - fitted_development_factors = fij.fit, - fitted_effects=fitted_effects) - - class(out) <- c('clmplusmodel') - + + out <- list( + model.fit = model, + apc_input = list( + J = J, eta = AggregateDataPP$eta, hazard.model = hazard.model, + diagonal = AggregateDataPP$diagonal, + cumulative.payments.triangle = + AggregateDataPP$cumulative.payments.triangle + ), + hazard_scaled_deviance_residuals = residual_triangle, + fitted_development_factors = fij.fit, + fitted_effects = effects + ) + class(out) <- "clmplusmodel" out - } diff --git a/R/data.R b/R/data.R index ead3336..b773df9 100644 --- a/R/data.R +++ b/R/data.R @@ -1,6 +1,9 @@ #' @title Sifa MTPL #' @description Dataset of cumulative paid claims for a medium italian company in the line of business: motor third party liability. -#' @format Run-off triangle with 12 development periods. +#' @format A 12 by 12 numeric matrix of cumulative paid claims. Rows index +#' accident years and columns index development years; cells below the +#' observed run-off triangle are `NA`. Amounts are in the source's recorded +#' monetary units. No additional preprocessing has been applied. #' @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 #' @@ -8,7 +11,10 @@ #' @title Amases MTPL #' @description Dataset of cumulative paid claims for a small italian company in the line of business: motor third party liability. -#' @format Run-off triangle with 12 development periods. +#' @format A 12 by 12 numeric matrix of cumulative paid claims. Rows index +#' accident years and columns index development years; cells below the +#' observed run-off triangle are `NA`. Amounts are in the source's recorded +#' monetary units. No additional preprocessing has been applied. #' @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 #' @@ -16,7 +22,10 @@ #' @title Sifa GTPL #' @description Dataset of cumulative paid claims for a medium italian company in the line of business: general third party liability. -#' @format Run-off triangle with 12 development periods. +#' @format A 12 by 12 numeric matrix of cumulative paid claims. Rows index +#' accident years and columns index development years; cells below the +#' observed run-off triangle are `NA`. Amounts are in the source's recorded +#' monetary units. No additional preprocessing has been applied. #' @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 #' @@ -24,7 +33,10 @@ #' @title Amases GTPL #' @description Dataset of cumulative paid claims for a small italian company in the line of business: general third party liability. -#' @format Run-off triangle with 12 development periods. +#' @format A 12 by 12 numeric matrix of cumulative paid claims. Rows index +#' accident years and columns index development years; cells below the +#' observed run-off triangle are `NA`. Amounts are in the source's recorded +#' monetary units. No additional preprocessing has been applied. #' @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 #' @@ -33,7 +45,10 @@ #' @title Sifa MOD #' @description Dataset of cumulative paid claims for a medium italian company in the line of business: motor or damage. -#' @format Run-off triangle with 12 development periods. +#' @format A 12 by 12 numeric matrix of cumulative paid claims. Rows index +#' accident years and columns index development years; cells below the +#' observed run-off triangle are `NA`. Amounts are in the source's recorded +#' monetary units. No additional preprocessing has been applied. #' @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 #' @@ -41,7 +56,10 @@ #' @title Amases MOD #' @description Dataset of cumulative paid claims for a small italian company in the line of business: motor or damage. -#' @format Run-off triangle with 12 development periods. +#' @format A 12 by 12 numeric matrix of cumulative paid claims. Rows index +#' accident years and columns index development years; cells below the +#' observed run-off triangle are `NA`. Amounts are in the source's recorded +#' monetary units. No additional preprocessing has been applied. #' @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 #' diff --git a/R/plotAggregateDataPP.R b/R/plotAggregateDataPP.R index 46571c0..0c3c3e4 100644 --- a/R/plotAggregateDataPP.R +++ b/R/plotAggregateDataPP.R @@ -2,14 +2,15 @@ #' #' This function allows to define the behavior of the triangle payments. #' -#' @param x AggregateDataPP to be plotted. -#' @param ... Arguments to be passed to plot. +#' @param x An `AggregateDataPP` object. +#' @param ... Reserved; currently ignored. #' @examples #' data(sifa.mtpl) #' sifa.mtpl.pp <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl) #' plot(sifa.mtpl.pp) #' -#' @return No return value, plots the run-off triangle cumulative payments and incremental payments. +#' @return A `gtable` containing two ggplot panels (incremental and cumulative +#' paid amounts), returned visibly after being drawn. #' #' @references #' Pittarello, Gabriele, Munir Hiabu, and Andrés M. Villegas. "Replicating and extending chain ladder @@ -34,7 +35,7 @@ plot.AggregateDataPP <- function(x, ...){ y=incrementals, by=ay, colour=ay))+ - ggplot2::geom_line()+ + ggplot2::geom_line(na.rm = TRUE)+ ggplot2::ggtitle("Incremental payments")+ ggplot2::theme_classic() @@ -43,7 +44,7 @@ plot.AggregateDataPP <- function(x, ...){ y=cumulatives, by=ay, colour=ay))+ - ggplot2::geom_line()+ + ggplot2::geom_line(na.rm = TRUE)+ ggplot2::ggtitle("Cumulative payments")+ ggplot2::theme_classic() diff --git a/R/plotclmplusmodel.R b/R/plotclmplusmodel.R index c9046ad..74a4dcc 100644 --- a/R/plotclmplusmodel.R +++ b/R/plotclmplusmodel.R @@ -2,9 +2,10 @@ #' #' This function allows to plot the hazard model residuals on the triangle payments. #' -#' @param x \code{clmplusmodel} object, model fit to plot. -#' @param heat.lim limits in the residuals plot. -#' @param ... Extra arguments to be passed to the plot function. +#' @param x A fitted `clmplusmodel` object. +#' @param heat.lim A length-two numeric vector giving the lower and upper fill +#' scale limits for scaled deviance residuals. +#' @param ... Reserved; currently ignored. #' #' @examples #' data(sifa.mtpl) @@ -12,7 +13,8 @@ #' clm.fit<-clmplus(sifa.mtpl.rtt, 'a') #' plot(clm.fit) #' -#' @return No return value, plots the hazard model residuals in triangular form. +#' @return A `ggplot` object showing scaled deviance residuals in +#' accident-year by development-year triangle form. #' #' @references #' @@ -46,7 +48,7 @@ plot.clmplusmodel <- function(x, ggplot2::ggtitle(x$modelfamily)+ ggplot2::theme(axis.title.x = ggplot2::element_text(size=8), axis.text.x = ggplot2::element_text(size=7))+ ggplot2::theme(axis.title.y = ggplot2::element_text(size=8), axis.text.y = ggplot2::element_text(size=7))+ - ggplot2::theme(panel.background = ggplot2::element_rect(fill = "grey", colour = "grey", size = 2, linetype = "solid"), + ggplot2::theme(panel.background = ggplot2::element_rect(fill = "grey", colour = "grey", linewidth = 2, linetype = "solid"), panel.grid = ggplot2::element_line(colour="grey")) + NULL diff --git a/R/plotclmpluspredictions.R b/R/plotclmpluspredictions.R index 35956e3..6ab962f 100644 --- a/R/plotclmpluspredictions.R +++ b/R/plotclmpluspredictions.R @@ -2,9 +2,11 @@ #' #' This function allows to define the behavior of the triangle payments. #' -#' @param x \code{clmpluspredictions}, Model effects (fitted and extrapolated) to be plotted. -#' @param cy.type \code{character}, whether to show fitted period effect with or without extrapolatio Default is "fe", standing for fitted and extrapolated. Alternative is to specify "f" for fitted effect. -#' @param ... Arguments to be passed to plot. +#' @param x A `clmpluspredictions` object returned by +#' [predict.clmplusmodel()]. +#' @param cy.type Either `"fe"` (the default) to include extrapolated calendar +#' effects or `"f"` to show only fitted calendar effects. +#' @param ... Reserved; currently ignored. #' @examples #' data(sifa.mtpl) #' sifa.mtpl.rtt <- AggregateDataPP(cumulative.payments.triangle=sifa.mtpl) @@ -12,7 +14,8 @@ #' clm <- predict(clm.fit) #' plot(clm) #' -#' @return No return value, plots coefficients of the hazard models. +#' @return A `gtable` containing one ggplot panel for each effect included in +#' the fitted model. The table is returned visibly after being drawn. #' #' @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. @@ -41,7 +44,7 @@ plot.clmpluspredictions <- function(x, #age effect p1 <- ggplot2::ggplot(a.df, ggplot2::aes(x=x,y=y))+ - ggplot2::geom_line()+ + ggplot2::geom_line(na.rm = TRUE)+ ggplot2::theme_classic()+ ggplot2::xlab('Development period')+ ggplot2::ylab(expression(a[j])) + @@ -50,7 +53,7 @@ plot.clmpluspredictions <- function(x, #age deviation from calendar p2 <- ggplot2::ggplot(a.df, ggplot2::aes(x=x,y=y2))+ - ggplot2::geom_line()+ + ggplot2::geom_line(na.rm = TRUE)+ ggplot2::theme_classic()+ ggplot2::xlab('Development period')+ ggplot2::ylab(expression(b[j])) + @@ -76,16 +79,16 @@ plot.clmpluspredictions <- function(x, p3 <- ggplot2::ggplot(data=ckj.df[1:length(kt),], ggplot2::aes(x=x, y=y))+ - ggplot2::geom_line()+ + ggplot2::geom_line(na.rm = TRUE)+ ggplot2::theme_classic()+ ggplot2::xlab('Calendar period')+ ggplot2::ylab(expression(c[k+j]))+ ggplot2::ggtitle('Fitted effect') p3.f <- ggplot2::ggplot(data=ckj.df[-1,],ggplot2::aes(x=x,y=y))+ - ggplot2::geom_line()+ - ggplot2::geom_ribbon(ggplot2::aes(ymin = kt.l80, ymax = kt.u80), alpha = 0.2)+ - ggplot2::geom_ribbon(ggplot2::aes(ymin = kt.l95, ymax = kt.u95), alpha = 0.1)+ + ggplot2::geom_line(na.rm = TRUE)+ + ggplot2::geom_ribbon(ggplot2::aes(ymin = kt.l80, ymax = kt.u80), alpha = 0.2, na.rm = TRUE)+ + ggplot2::geom_ribbon(ggplot2::aes(ymin = kt.l95, ymax = kt.u95), alpha = 0.1, na.rm = TRUE)+ ggplot2::theme_classic()+ ggplot2::xlab('Calendar period')+ ggplot2::ylab(expression(c[k+j]))+ @@ -113,7 +116,7 @@ plot.clmpluspredictions <- function(x, y=x$apc_output$model.fit$ax) p1 <- ggplot2::ggplot(a.df, ggplot2::aes(x=x,y=y))+ - ggplot2::geom_line()+ + ggplot2::geom_line(na.rm = TRUE)+ ggplot2::theme_classic()+ ggplot2::xlab('Development period')+ ggplot2::ylab(expression(a[j])) + @@ -152,8 +155,9 @@ plot.clmpluspredictions <- function(x, p2 <- ggplot2::ggplot(data=c.df[1:(dim(c.df)[1]-1),], ggplot2::aes(x=x, y=y))+ - ggplot2::geom_point(ggplot2::aes(x=c.df[dim(c.df)[1],'x'],y=c.df[dim(c.df)[1],'y']),colour="red")+ - ggplot2::geom_line()+ + ggplot2::annotate("point", x = c.df[nrow(c.df), "x"], + y = c.df[nrow(c.df), "y"], colour = "red")+ + ggplot2::geom_line(na.rm = TRUE)+ ggplot2::theme_classic()+ ggplot2::xlab('Accident period')+ ggplot2::ylab(expression(g[k]))+ @@ -188,16 +192,16 @@ plot.clmpluspredictions <- function(x, p3 <- ggplot2::ggplot(data=ckj.df[1:length(kt),], ggplot2::aes(x=x, y=y))+ - ggplot2::geom_line()+ + ggplot2::geom_line(na.rm = TRUE)+ ggplot2::theme_classic()+ ggplot2::xlab('Calendar period')+ ggplot2::ylab(expression(c[k+j]))+ ggplot2::ggtitle('Fitted effect') p3.f <- ggplot2::ggplot(data=ckj.df[-1,],ggplot2::aes(x=x,y=y))+ - ggplot2::geom_line()+ - ggplot2::geom_ribbon(ggplot2::aes(ymin = kt.l80, ymax = kt.u80), alpha = 0.2)+ - ggplot2::geom_ribbon(ggplot2::aes(ymin = kt.l95, ymax = kt.u95), alpha = 0.1)+ + ggplot2::geom_line(na.rm = TRUE)+ + ggplot2::geom_ribbon(ggplot2::aes(ymin = kt.l80, ymax = kt.u80), alpha = 0.2, na.rm = TRUE)+ + ggplot2::geom_ribbon(ggplot2::aes(ymin = kt.l95, ymax = kt.u95), alpha = 0.1, na.rm = TRUE)+ ggplot2::theme_classic()+ ggplot2::xlab('Calendar period')+ ggplot2::ylab(expression(c[k+j]))+ diff --git a/docs/404.html b/docs/404.html index 84a377f..5a03325 100644 --- a/docs/404.html +++ b/docs/404.html @@ -20,7 +20,7 @@ clmplus - 1.0.0 + 1.0.2 @@ -67,7 +67,7 @@

Page not found (404)

diff --git a/docs/404.md b/docs/404.md new file mode 100644 index 0000000..5107f89 --- /dev/null +++ b/docs/404.md @@ -0,0 +1,3 @@ +Content not found. Please use links in the navbar. + +# Page not found (404) diff --git a/docs/articles/casestudy1.html b/docs/articles/casestudy1.html index 1408099..af5231b 100644 --- a/docs/articles/casestudy1.html +++ b/docs/articles/casestudy1.html @@ -20,7 +20,7 @@ clmplus - 1.0.0 + 1.0.2 @@ -60,7 +60,7 @@

Vignette 1

Gabriele Pittarello

-

2025-06-12

+

2026-07-23

Source: vignettes/casestudy1.Rmd
casestudy1.Rmd
@@ -73,8 +73,7 @@

IntroductionPittarello, Hiabu, and Villegas -(2025).

+paper, Pittarello et al. (2025).

In this vignette:

@@ -56,11 +56,8 @@
-
-modelsranking <- function(list.of.datasets){
-  
-  "
-  This functions returns the datasets to plot in the ranking section of the paper.
-  
-  The input is a list of datasets that constitue the sample. 
-  
-  The output is the rankings across different data sources.
-  "
-  
-  
-  full.ranks=NULL
-  
-  for(df.ix in names(list.of.datasets)){
-    
-    out.df=modelsranking.1d(AggregateDataPP(list.of.datasets[[df.ix]]))
-    out.df$models.ranks[,'data.source']=rep(df.ix,dim(out.df$models.ranks)[1])
-    full.ranks=rbind(full.ranks,out.df$models.ranks)  
-  }
-  
-  return(list(full.ranks=full.ranks))
-}
+plot(fits[["apc"]])
+

-p_min_expd0 <- ggplot(full.ranks$full.ranks, aes(model.name, data.source)) +
-   geom_tile(aes(fill = cut(ei.rank, breaks=0:6, labels=1:6)), colour = "grey") +
-   ggtitle(" ") +
-  theme_classic()+
-  geom_text(aes(label = ei.rank))+
-   scale_y_discrete(limits=names(list.of.datasets)) +
-   scale_fill_manual(drop=FALSE, values=colorRampPalette(c("white","#6699CC"))(6), na.value="#EEEEEE", name="Rank") + 
-   xlab("Model") + ylab("Data source")
-p_min_expd0
-

Models ranking plot.

-
-tbl=full.ranks$full.ranks %>%
-  dplyr::group_by(model.name) %>%
-  dplyr::summarise(mean.rank = mean(ei.rank))
-tbl
-#> # A tibble: 6 × 2
-#>   model.name  mean.rank
-#>   <chr>           <dbl>
-#> 1 apc.ac           3.09
-#> 2 apc.apc          4.14
-#> 3 clmplus.a        3.09
-#> 4 clmplus.ac       2.32
-#> 5 clmplus.ap       3   
-#> 6 clmplus.apc      2.45
-
-library(dplyr)
-temp.df=full.ranks$full.ranks[,c('model.name','ei.rank')] %>%
-  group_by(model.name, ei.rank) %>% summarise(count = n())
-#> `summarise()` has grouped output by 'model.name'. You can override using the
-#> `.groups` argument.
-

The following picture was not included in the paper but it shows the -models ranks counts for each model.

-
-ggplot(temp.df, aes(y=count, x=factor(ei.rank))) + 
-    geom_bar(position="stack", stat="identity",fill='#6699CC') +
-  scale_y_continuous(limits=c(0,15))+
-  facet_wrap(~model.name, scales='free')+
-  theme_classic()+
-  ylab("")+
-  xlab("Rank")
-

Model rank count.

- -
-

Code for Section 4.3.2. Model Families Comparison -

-

We evaluate the out-of-sample performance of our models by using a -training, validation and testing split.

-
-J=12
-df<-data.frame(expand.grid(c(0:(J-1)),c(0:(J-1))),c(1:(J^2)))
-colnames(df) <- c("origin","dev","value")
-df$value[df$origin+df$dev==(J-1)]=c(3)
-df$value[df$origin+df$dev<(J-2)]=c(1)
-df$value[df$origin+df$dev==(J-2)]=c(2)
-df$value[df$origin+df$dev>=J]=c(NA)
-#nas in the lower
-df[J,3]=c(NA)
-df[J-1,3]=c(NA)
-df[J+J-1,3]=c(NA)
-df[J*J-J+1,3]=c(NA)
-df[J*J-J+1,3]=c(NA)
-#nas in the upper tail
-df[J*J-J+1-12,3]=c(NA)
-df[J*J-J+2-12,3]=c(NA)
-
-ggplot(data=df, aes(x=as.integer(dev), y=as.integer(origin))) + 
-  geom_tile(aes(fill = as.factor(value),color="#000000"))+scale_y_reverse()+
-  scale_fill_manual(values=c("royalblue", "darkred", "darkgreen","white"),
-                    na.value = "white",
-                    labels=c("Train","Validation","Test",""))+
-  theme_classic()+
-  labs(x="Development year", y="Accident year",fill="")+
-  theme(axis.title.x = element_text(size=8), axis.text.x  = element_text(size=7))+
-  theme(axis.title.y = element_text(size=8), axis.text.y  = element_text(size=7))+
-  scale_color_brewer(guide = 'none')
-

Data split, Train, Validation, and Test.

-
-best.of.the.bests <- function(df1,df2){
-  "
-  Util to turn character columns values into numeric.
-  "
-  
-  df1=apply(df1,MARGIN=2,FUN=as.numeric)
-  df2=apply(df2,MARGIN=2,FUN=as.numeric)
-  df3 <- rbind(df1,df2)
-  df3=apply(df3,FUN=abs.min,MARGIN = 2)
-  
-  return(df3)
-  
-}
-
-modelcomparison.1d <- function(cumulative.payments.triangle){
-  "
-  Function to compare the clmplus package age-period-cohort models with apc package age-period-cohort models  performances across different triangles.
-  
-  This function takes a triangle of cumulative payments as input.
-  
-  It returns the accuracy measures for the two families on the triangle.
-  "
-  # function internal variables
-  
-  leave.out=2
-  
-  rmse = NULL
-  mae = NULL
-  error.pc = NULL
-  model.name = NULL
-  error.incidence = NULL
-  model.family = NULL
-  mre = NULL
-  
-  # data pre-precessing ----
-  
-  J <- dim(cumulative.payments.triangle)[2]
-  reduced.triangle <- c2t(t2c(cumulative.payments.triangle)[1:(J-leave.out),1:(J-leave.out)])
-  newt.rtt <- AggregateDataPP(reduced.triangle)
-  
-  newt.apc <- apc.data.list(response=newt.rtt$incremental.payments.triangle,
-                            data.format="CL")
-  
-  ## stmomo -----
-  to.project <- t2c(cumulative.payments.triangle)[1:(J-leave.out-1),J-leave.out]
-  true.values <- t2c(cumulative.payments.triangle)[2:(J-leave.out),(J-leave.out+1):J]
-  
-  
-  for(ix in c('a','ac','ap','apc')){ ##names(models)
-    
-    hz.fit <- StMoMo::fit(models[[ix]], 
-                          Dxt = newt.rtt$occurrance, 
-                          Ext = newt.rtt$exposure,
-                          wxt=newt.rtt$fit.w,
-                          iterMax=as.integer(1e+05))
-    hz.rate = fcst.fn(hz.fit,
-                   hazard.model = ix,
-                   gk.fc.model = 'a',
-                   ckj.fc.model= 'a')$rates[,1:leave.out]
-    
-    J.new=dim(reduced.triangle)[2]
-    fij = (2+hz.rate)/(2-hz.rate)
-    pred.mx = fij
-    pred.mx[,1]=fij[,1]*c(NA,to.project)
-    temp=unname(pred.mx[1:(J.new-1),1][!is.na(pred.mx[1:(J.new-1),1])])
-    pred.mx[,2]=fij[,2]*c(rep(NA,J.new-length(temp)),temp)
-    true.mx= rbind(rep(NA,2),true.values)
-    # this is meant to be NA
-    true.mx[2,2]=NA
-  
-    sq.errors = (pred.mx-true.mx)^2
-    abs.errors = abs(pred.mx-true.mx)
-    r.errors = (pred.mx-true.mx)/true.mx
-    error.inc.num = apply(pred.mx-true.mx,sum,MARGIN=2,na.rm=T)
-    error.inc.den = apply(true.mx,sum,MARGIN=2,na.rm=T)
-    model.name.ix = c(paste0(ix,".val"),paste0(ix,".test"))
-    
-    model.name = c(model.name,model.name.ix)
-    model.family = c(model.family,rep(ix,2))
-    rmse = c(rmse,sqrt(apply(sq.errors,MARGIN = 2,mean,na.rm=T)))
-    mae = c(mae,apply(abs.errors,MARGIN = 2,mean,na.rm=T))
-    mre = c(mre,apply(r.errors,MARGIN = 2,mean,na.rm=T))
-    error.incidence = c(error.incidence,error.inc.num/error.inc.den)
-    
-  }
-
-  
-  ## stmomo results ---- 
-  
-   out1 <- data.frame(
-    model.name,
-    model.family,
-    mre,
-    error.incidence,
-    rmse,
-    mae)
-  
-  temp.ix <- grepl(".val", model.name)
-  temp.df <- out1[temp.ix,]
-  
-  out2 <- data.frame(
-    rmse=temp.df$model.name[which(abs(temp.df$rmse)==min(abs(temp.df$rmse)))],
-    mre=temp.df$model.name[which(abs(temp.df$mre)==min(abs(temp.df$mre)))],
-    mae=temp.df$model.name[which(abs(temp.df$mae)==min(abs(temp.df$mae)))],
-    error.incidence=temp.df$model.name[which(abs(temp.df$error.incidence)==min(abs(temp.df$error.incidence)))])
-
-  
-  temp.ix <- grepl(".test", model.name)
-  out3 <- out1[temp.ix,]
-  
-  best.df = out2
-  best.df[1,]=NA
-  
-  out.test.min <- data.frame(
-    rmse=out3$model.name[which(abs(out3$rmse)==min(abs(out3$rmse)))],
-    mre=out3$model.name[which(abs(out3$mre)==min(abs(out3$mre)))],
-    mae=out3$model.name[which(abs(out3$mae)==min(abs(out3$mae)))],
-    error.incidence=out3$model.name[which(abs(out3$error.incidence)==min(abs(out3$error.incidence)))])
-  
-  temp.mx=matrix((sub("\\..*", "", out2) == sub("\\..*", "", out.test.min)),nrow=1)
-  choices.mx.clmplus=matrix(sub("\\..*", "", out2),nrow=1)
-  
-  agreement.frame.clmplus=data.frame(temp.mx)
-  choices.frame.clmplus=data.frame(choices.mx.clmplus)
-  
-  colnames(agreement.frame.clmplus)=colnames(out2)
-  colnames(choices.frame.clmplus)=colnames(out2)
-  
-  for(col.ix in colnames(out2)){
-  
-  res=out1$model.family[out1$model.name == out2[1,col.ix]]
-  res.test = out3$model.family == res
-  best.df[1,col.ix] = out3[res.test,col.ix]}
-  
-  families.set=c('a','apc') #'ap',
-  temp.ix = out3$model.family %in% families.set
-  comparison.df = out3[temp.ix,]
-  comparison.df = cbind(comparison.df,
-                        approach=rep('clmplus',length(families.set)))
-
-  
-  ## apc ----
-  
-  rmse = NULL
-  mae = NULL
-  error.pc = NULL
-  model.name = NULL
-  error.incidence = NULL
-  model.family = NULL
-  mre = NULL
-  
-  true.inc.values <- t2c(cum2incr(cumulative.payments.triangle))[2:(J-leave.out),(J-leave.out+1):J]
-  
-  
-  for(apc.mods in c("AC","APC")){ #,"AP"
-    
-    fit <- apc.fit.model(newt.apc,
-                         model.family = "od.poisson.response",
-                         model.design = apc.mods)
-    
-    if(apc.mods == "AC"){fcst <- apc.forecast.ac(fit)$trap.response.forecast}
-    # if(apc.mods == "AP"){fcst <- apc.forecast.ap(fit)$trap.response.forecast}
-    if(apc.mods == "APC"){fcst <- apc.forecast.apc(fit)$trap.response.forecast}
-    
-    plogram.hat = t2c.full.square(incr2cum(t(fcst)))
-    pred.mx = plogram.hat[,(J-leave.out+1):J]
-    
-    # true.mx= rbind(rep(NA,2),true.inc.values)
-    # # this is meant to be NA
-    # true.mx[2,2]=NA
-  
-    sq.errors = (pred.mx-true.mx)^2
-    abs.errors = abs(pred.mx-true.mx)
-    r.errors = (pred.mx-true.mx)/true.mx #use same benchmark
-    error.inc.num = apply(pred.mx-true.mx,sum,MARGIN=2,na.rm=T)
-    error.inc.den = apply(true.mx,sum,MARGIN=2,na.rm=T) #use same benchmark
-    model.name.ix = c(paste0(apc.mods,".val"),paste0(apc.mods,".test"))
-    
-    model.name = c(model.name,tolower(model.name.ix))
-    model.family = c(model.family,tolower(rep(apc.mods,2)))
-    rmse = c(rmse,sqrt(apply(sq.errors,MARGIN = 2,mean,na.rm=T)))
-    mae = c(mae,apply(abs.errors,MARGIN = 2,mean,na.rm=T))
-    mre = c(mre,apply(r.errors,MARGIN = 2,mean,na.rm=T))
-    error.incidence = c(error.incidence,error.inc.num/error.inc.den)}
-    
-      
-   out4 <- data.frame(
-    model.name,
-    model.family,
-    mre,
-    error.incidence,
-    rmse,
-    mae)
-  
-  temp.ix <- grepl(".val", model.name)
-  temp.df <- out4[temp.ix,]
-  
-  out5 <- data.frame(
-    rmse=temp.df$model.name[which(abs(temp.df$rmse)==min(abs(temp.df$rmse)))],
-    mre=temp.df$model.name[which(abs(temp.df$mre)==min(abs(temp.df$mre)))],
-    mae=temp.df$model.name[which(abs(temp.df$mae)==min(abs(temp.df$mae)))],
-    error.incidence=temp.df$model.name[which(abs(temp.df$error.incidence)==min(abs(temp.df$error.incidence)))])
-  
-  temp.ix <- grepl(".test", model.name)
-  out6 <- out4[temp.ix,]
-  
-  out.test.min2 <- data.frame(
-  rmse=out6$model.name[which(abs(out6$rmse)==min(abs(out6$rmse)))],
-  mre=out6$model.name[which(abs(out6$mre)==min(abs(out6$mre)))],
-  mae=out6$model.name[which(abs(out6$mae)==min(abs(out6$mae)))],
-  error.incidence=out6$model.name[which(abs(out6$error.incidence)==min(abs(out6$error.incidence)))])
-
-  temp.mx=matrix((sub("\\..*", "", out5) == sub("\\..*", "", out.test.min2)),nrow=1)
-  choices.mx.apc=matrix(sub("\\..*", "", out5),nrow=1)
-  
-  choices.frame.apc=data.frame(choices.mx.apc)
-  agreement.frame.apc=data.frame(temp.mx)
-  
-  colnames(agreement.frame.apc)=colnames(out5)
-  colnames(choices.frame.apc)=colnames(out5)
-  
-  best.df.apc = out5
-  best.df.apc[1,]=NA
-  
-  for(col.ix in colnames(out5)){
-  
-  res=out4$model.family[out4$model.name == out5[1,col.ix]]
-  res.test = out6$model.family == res
-  best.df.apc[1,col.ix] = out6[res.test,col.ix]}
-      
-  families.set=c('ac','apc') #'ap',
-  temp.ix = out6$model.family %in% families.set
-  comparison.df.apc = out6[temp.ix,]
-  comparison.df.apc = cbind(comparison.df.apc,
-                            approach=rep('apc',length(families.set)))
-  
-  
-  out = list(
-    best.model.clmplus = best.df,
-    best.model.apc = best.df.apc,
-    agreement.frame.clmplus=agreement.frame.clmplus,
-    agreement.frame.apc=agreement.frame.apc,
-    choices.frame.clmplus=choices.frame.clmplus,
-    choices.frame.apc=choices.frame.apc,
-    comparison.df = rbind(comparison.df,
-                          comparison.df.apc))
-  
-  return(out)}
-  
-
-
-modelcomparison<-function(list.of.datasets){
-  "This functions returns the datasets to plot the bake-off section of the paper.
-  
-  The input is a list of datasets that constitue the sample. 
-  
-  The output is datasets that contain accuracy measures.
-  
-  "
-  best.fit=NULL
-  families.fit=NULL
-  agreement.clmplus=NULL
-  agreement.apc=NULL
-  choices.clmplus=NULL
-  choices.apc=NULL
-  
-  for(df.ix in names(list.of.datasets)){
-    cat(paste0(".. Comparison on dataset: ",df.ix))
-    out.ix = modelcomparison.1d(list.of.datasets[[df.ix]])
-    
-    best.of.the.bests.df=best.of.the.bests(out.ix$best.model.clmplus,
-                                        out.ix$best.model.apc)
-    
-    out.ix$best.model.clmplus['package']= 'clmplus'
-    out.ix$best.model.apc['package']= 'apc'
-    best.of.the.bests.df['package']='overall.best'
-    
-    best.fit=rbind(best.fit,
-                   out.ix$best.model.clmplus,
-                   out.ix$best.model.apc,
-                   best.of.the.bests.df)
-    
-    families.fit=rbind(families.fit,
-                   out.ix$comparison.df)
-    
-    agreement.clmplus=rbind(agreement.clmplus,
-                         out.ix$agreement.frame.clmplus)
-    
-    agreement.apc=rbind(agreement.apc,
-                         out.ix$agreement.frame.apc)
-    
-    choices.clmplus=rbind(choices.clmplus,
-                         out.ix$choices.frame.clmplus)
-    
-    choices.apc=rbind(choices.apc,
-                         out.ix$choices.frame.apc)
-  }
-  
-  best.fit[,1:4]=apply(best.fit[,1:4],MARGIN = 2,FUN = as.numeric)
-  
-  families.fit[,c('mre',
-                  'error.incidence',
-                  'rmse',
-                  'mae')]=apply(
-                    families.fit[,c('mre',
-                                    'error.incidence',
-                                    'rmse',
-                                    'mae')],
-                    MARGIN = 2,
-                    FUN = as.numeric)
-  
-  
-  out = list(best.fit=best.fit,
-             families.fit=families.fit,
-             agreement.clmplus=agreement.clmplus,
-             agreement.apc=agreement.apc,
-             choices.clmplus=choices.clmplus,
-             choices.apc=choices.apc)
-  
-  return(out)
-  
-}
-
-
-bake.off <- function(models.comparison){
-  "
-  This function plots out the results from the previous computations. 
-  
-  It takes as input the resulting dataframes of model.comparison.
-  
-  The output is the boxplots of the paper's bake-off section. 
-  
-  "
-  
-  # browser()
-  
-  p1<- models.comparison$best.fit[,c("rmse","mae","package")] %>%
-    tidyr::pivot_longer(-c(package)) %>%
-    ggplot(aes(x=package,y=value))+
-    geom_boxplot()+
-    facet_wrap(.~name,nrow = 1,strip.position = 'bottom')+
-    theme_bw()+
-    theme(strip.placement = 'outside',strip.background = element_blank())
-  
-  p2<- models.comparison$best.fit[,c("mre","error.incidence","package")] %>%
-    tidyr::pivot_longer(-c(package)) %>%
-    ggplot(aes(x=package,y=value))+
-    geom_boxplot()+
-    facet_wrap(.~name,nrow = 1,strip.position = 'bottom')+
-    theme_bw()+
-    theme(strip.placement = 'outside',strip.background = element_blank())
-  
-   abs.best=models.comparison$best.fit[,c("mre","error.incidence","package")]
-  abs.best[,c("mre","error.incidence")]=apply(abs.best[,c("mre","error.incidence")],
-                                              MARGIN=2,
-                                              FUN=abs)
-  p3<- abs.best %>%
-    tidyr::pivot_longer(-c(package)) %>%
-    ggplot(aes(x=package,y=value))+
-    geom_boxplot()+
-    facet_wrap(.~name,nrow = 1,strip.position = 'bottom')+
-    theme_bw()+
-    theme(strip.placement = 'outside',strip.background = element_blank())
-  
-  only.ei=models.comparison$best.fit[,c("error.incidence","package")]
-  only.ei[,c("error.incidence")]=abs(only.ei[,c("error.incidence")])
-  
-  p4<- abs.best %>%
-  tidyr::pivot_longer(-c(package)) %>%
-  ggplot(aes(x=package,y=value))+
-  geom_boxplot()+
-  # facet_wrap(.~name,nrow = 1,strip.position = 'bottom')+
-  theme_bw()+
-  theme(strip.placement = 'outside',strip.background = element_blank())
-  
-  
-  out = list(p1=p1,
-             p2=p2,
-             p3=p3,
-             p4=p4)
-  
-  return(out)
-}
-

The models in the clmplus package are compared to those -in the apc package. Below it can be found the code we used -to create the box-plot in figure 8 of our paper.

-

For each case we are able to pick the best model based on the error -incidence.

-

Error Incidence.

-
-
-

References -

-
-
-Fannon, Zoe, and Bent Nielsen. 2020. Apc: Age-Period-Cohort -Analysis. https://CRAN.R-project.org/package=apc. -
-
-Pittarello, Gabriele, Munir Hiabu, and Andrés M Villegas. 2025. -“Replicating and Extending Chain-Ladder via an Age–Period–Cohort -Structure on the Claim Development in a Run-Off Triangle.” -North American Actuarial Journal, 1–31. -
-
+plot(predictions[["apc"]])
+

@@ -815,7 +146,7 @@

References -

Site built with pkgdown 2.1.1.

+

Site built with pkgdown 2.2.0.

diff --git a/docs/articles/modelscomparison.md b/docs/articles/modelscomparison.md new file mode 100644 index 0000000..c55bbcf --- /dev/null +++ b/docs/articles/modelscomparison.md @@ -0,0 +1,85 @@ +# Model comparison and reproducible regression checks + +## Updated replication workflow + +The replication code has been updated because the `apc` package used by +the original implementation has been removed from CRAN. The revised code +no longer depends on `apc` and uses the current `clmplus` implementation +instead. These changes are intended to preserve the numerical results of +the original analysis while ensuring that the replication workflow can +be run using packages that are currently available. + +The strings `"a"`, `"ac"`, `"ap"`, and `"apc"` below are model +identifiers, not package dependencies. + +## Deterministic comparison + +``` r + +data("AutoBI", package = "ChainLadder") +triangle <- ChainLadder::incr2cum(AutoBI$AutoBIPaid) +prepared <- AggregateDataPP(triangle) +model_ids <- c("a", "ac", "ap", "apc") +fits <- setNames(lapply(model_ids, function(id) { + clmplus(prepared, hazard.model = id, verbose = FALSE) +}), model_ids) +#> Warning in fit.StMoMo(supported_models[[hazard.model]], Dxt = AggregateDataPP$occurrance, : StMoMo: 28 missing values which have been zero weighted +#> Warning in fit.StMoMo(supported_models[[hazard.model]], Dxt = AggregateDataPP$occurrance, : StMoMo: 28 missing values which have been zero weighted +#> Warning in fit.StMoMo(supported_models[[hazard.model]], Dxt = AggregateDataPP$occurrance, : StMoMo: 28 missing values which have been zero weighted +#> Warning in fit.StMoMo(supported_models[[hazard.model]], Dxt = AggregateDataPP$occurrance, : StMoMo: 28 missing values which have been zero weighted +predictions <- lapply(fits, predict) +``` + +The age-only fit reproduces chain ladder. + +``` r + +mack <- ChainLadder::MackChainLadder(triangle) +age_prediction <- predictions[["a"]] +stopifnot(isTRUE(all.equal( + unname(age_prediction$full_triangle), + unname(mack$FullTriangle), + tolerance = 1e-10 +))) +data.frame( + accident_period = seq_along(age_prediction$reserve) - 1L, + reserve = unname(age_prediction$reserve), + ultimate = unname(age_prediction$ultimate_cost) +) +#> accident_period reserve ultimate +#> 1 0 0.00 63918.00 +#> 2 1 11995.02 74756.02 +#> 3 2 28848.23 89937.23 +#> 4 3 47752.62 99797.62 +#> 5 4 67734.68 107290.68 +#> 6 5 74742.25 96776.25 +#> 7 6 97541.29 109482.29 +#> 8 7 102444.81 105245.81 +sum(age_prediction$reserve) +#> [1] 431058.9 +``` + +Partial forecasting fills only the requested future calendar diagonals. + +``` r + +one_year <- predict(fits[["apc"]], forecasting_horizon = 1) +dim(one_year$full_triangle) +#> [1] 8 8 +dim(one_year$apc_output$lower_triangle_apc) +#> [1] 8 1 +``` + +``` r + +plot(fits[["apc"]]) +``` + +![](modelscomparison_files/figure-html/plots-1.png) + +``` r + +plot(predictions[["apc"]]) +``` + +![](modelscomparison_files/figure-html/plots-2.png) diff --git a/docs/articles/modelscomparison_files/figure-html/plots-1.png b/docs/articles/modelscomparison_files/figure-html/plots-1.png new file mode 100644 index 0000000000000000000000000000000000000000..0398869d8a435a0c5931e7dbd923135be29b3521 GIT binary patch literal 24766 zcmeIb2UL`4w0~Z2;I}rb{ z1ouu@5C}gLh^LP0T#Fg*^nR%8R-`yS*Y);isdJ62qSs2SVh;xMi0=qHbyzH=@JU}y z=+OS4x+5c#=h>$|605pd#I=L_*sAtC3XhaJ%8@l*Uv;YT?D+2yYtL-@$+B;b{fOcN zmg}wJ-m_6HG|%R#%HbI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R%WKz;>oZfvf}jJb+8) z^B>zL+q+jJ(Ig6#WSw6$2rFc7P|*lV92|Qj4`N_sJ}Fw27Ut&q8{q3>p&ExO2IQJm zp_-5g*c^ZGzxJB!=Qs-&$>9G-!2jyC@ctPFi@+P9^evmVGTCq9Y4uYXCocT{UjUo* BbK3v_ literal 0 HcmV?d00001 diff --git a/docs/articles/modelscomparison_files/figure-html/plots-2.png b/docs/articles/modelscomparison_files/figure-html/plots-2.png new file mode 100644 index 0000000000000000000000000000000000000000..98734841dff3cc0a311da950866bc2941995834f GIT binary patch literal 73402 zcmeFZbyQb-^ewuv1I0#Bz(5ofFaVWSQKXTU6p`-kFtJfmX$7P~q#FxFq`N_+OX=p$ z4d>kZyY+r|jQ8Fc?~lhA=cvGU@BOK@=A3J;{a8vuXv-#=O$0$~5xyoUO%Q7Z2x2v{ zVI98H^`gWGf2_MDDkO+M@ilWf%LRXIG`)7if*@$!$p0wZyZ&ks#6dz>@S?13z+j7m zt!zzB!C#vl=6UJ|DRx|1b#cSC{QjuO4acQ-F|9h>dq?JkRE2%Ay!(W7@`SXgQLuf? zlXt0)4!%1m8>_fYWP9AT?RN#^4{ba&#l2CO@r~1Bdl9>a_Ghs(MfZ!Q#(2goKTb9p zELn?P9@UP^5qqeych&N<5d_=s&c1*D9+I@p^`F20QCbu7&u?V!p*a4}UlXnnYieO9ORds|!H<%F5Bo-~@V3L*Lwx~2?^2)E(bv6T7dql}F9nFsbifBsx4 z@z#U)5`oc=9&LEw=4SByr!u5->P=5q=x3VWBd2-S9WTyuD(rM zb&ArhM^09@_l-_aMP;~X(}A`I=b&=O;2!6#JaLJM*E*7_jlu{HF6w;z+9GxV9;kdLM2G$Gew z-DD&&)%RjLbNRDG&{xXx%_?SQiMKR0xhH6>tgL1m%AC7X@%hEM5#=_M`VSXnA|#9y zf`=a^Y+n9MyYNpUCx2$za-P4##AQx--@`*+PO%#|pFbzNR)O|{`PbP++}hBFe&r6y zSBXuQt8wAlsf!mc4h{b^5w#lx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clmplus - 1.0.0 + 1.0.2 @@ -214,9 +214,9 @@

Citation

Developers

    -
  • Gabriele Pittarello
    Author, maintainer, copyright holder
  • -
  • Munir Hiabu
    Author, copyright holder
  • -
  • Andres Villegas
    Author, copyright holder
  • +
  • Gabriele Pittarello
    Author, maintainer, copyright holder
  • +
  • Munir Hiabu
    Author, copyright holder
  • +
  • Andres Villegas
    Author, copyright holder
@@ -239,7 +239,7 @@

Dev status

diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..2cfa8a8 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,136 @@ +# clmplus + +`clmplus` is an `R` package for implementing the age-period-cohort +models for the claim development presented in the manuscript +‘Replicating and extending chain-ladder via an age-period-cohort +structure on the claim development in a run-off triangle’ +. + +## Our models + +The models for the claim development available in the `clmplus` are +based on the models for human mortality implemented in the `StMoMo` +package. Users can either rely on our default models or set their own +configuration for the claim development. + +| Model | Lexis dimension | Claims reserving | +|:-----:|:-----------------:|---------------------------------:| +| a | age | development (chain-ladder model) | +| ac | age-cohort | development-accident | +| ap | age-period | development-calendar | +| apc | age-period-cohort | development-calendar-accident | + +## Installation + +The developer version of `clmplus` can be installed from GitHub. + + library(devtools) + devtools::install_github("gpitt71/clmplus") + +The current version of `clmplus` can be installed from CRAN. + + install.packages('clmplus') + +## Get Started + +In this brief example, we work with the `sifa.mtpl` data from the +`clmplus` package. Further examples can be found in the [package +vignettes](https://github.com/gpitt71/clmplus/tree/main/vignettes). The +data set of cumulative claim payments is transformed into an +`AggregateDataPP` object that pre-processes the data for claim +development modelling. + + library(clmplus) + + data ("sifa.mtpl") + dataset = sifa.mtpl + datapp = AggregateDataPP(cumulative.payments.triangle = dataset, eta= 1/2) + +Our models can be fit with the `clmplus` function. + + a.model.fit=clmplus(datapp, + hazard.model = "a") # age-model replicates the chain ladder + + ac.model.fit=clmplus(datapp, + hazard.model = "ac") + + ap.model.fit=clmplus(datapp, + hazard.model = "ap") + + apc.model.fit=clmplus(datapp, + hazard.model = "apc") + +The `plot` function can be be used to explore the scaled deviance +residuals of fitted models. Below, an example for the age-period-cohort +(`apc`) model for the claim development. + + plot(apc.model.fit) + +Predictions are performed with the `predict` function. + + a.model=predict(a.model.fit) + + # clmplus reserve (age model) + sum(a.model$reserve) + #226875.5 + + + ac.model=predict(ac.model.fit, + gk.fc.model = 'a', + gk.order = c(1,1,0)) + + # clmplus reserve (age-cohort model) + sum(ac.model$reserve) + #205305.7 + + ap.model= predict(ap.model.fit, + ckj.fc.model = 'a', + ckj.order = c(0,1,0)) + + # clmplus reserve (age-period model) + sum(ap.model$reserve) + #215602.8 + + + apc.model= predict(apc.model.fit, + gk.fc.model = 'a', + ckj.fc.model = 'a', + gk.order = c(1,1,0), + ckj.order = c(0,1,0)) + # clmplus reserve (age-period-cohort model) + sum(apc.model$reserve) + #213821.6 + +The fitted effect (and extrapolated) effects can be inspected with the +`plot` function. We continue below the example with the `apc` model. + + plot(apc.model) + +## Citation + +**APA Style** + +Pittarello, G., Hiabu, M., & Villegas, A. M. (2025). Replicating and +Extending Chain-Ladder via an Age–Period–Cohort Structure on the Claim +Development in a Run-Off Triangle. North American Actuarial Journal, +1-31. + +**BibTeX** + +``` bibtex +@article{ , + title={Replicating and Extending Chain-Ladder via an Age--Period--Cohort Structure on the Claim Development in a Run-Off Triangle}, + author={Pittarello, Gabriele and Hiabu, Munir and Villegas, Andr{\'e}s M}, + journal={North American Actuarial Journal}, + pages={1--31}, + year={2025}, + publisher={Taylor \& Francis} + doi = {10.1080/10920277.2025.2496725}, +} +``` + +## Further Resources + +The most recent tutorials and replication files associated with the +manuscript can be accessed via [our project +website](https://gpitt71.github.io/clmplus/). diff --git a/docs/katex-auto.js b/docs/katex-auto.js index 20651d9..2adab3a 100644 --- a/docs/katex-auto.js +++ b/docs/katex-auto.js @@ -11,4 +11,6 @@ document.addEventListener("DOMContentLoaded", function () { macros: macros, fleqn: false }); - }}}); + } + } +}); diff --git a/docs/lightswitch.js b/docs/lightswitch.js index 9467125..3808ca1 100644 --- a/docs/lightswitch.js +++ b/docs/lightswitch.js @@ -26,7 +26,7 @@ const setTheme = theme => { } } -function bsSetupThemeToggle () { +function bsSetupThemeToggle() { 'use strict' const showActiveTheme = (theme, focus = false) => { @@ -35,7 +35,7 @@ function bsSetupThemeToggle () { document.querySelectorAll('[data-bs-theme-value]').forEach(element => { const buttonTheme = element.getAttribute('data-bs-theme-value') const isActive = buttonTheme == theme - + element.classList.toggle('active', isActive) element.setAttribute('aria-pressed', isActive) diff --git a/docs/llms.txt b/docs/llms.txt new file mode 100644 index 0000000..216aa1b --- /dev/null +++ b/docs/llms.txt @@ -0,0 +1,179 @@ +# clmplus + +`clmplus` is an `R` package for implementing the age-period-cohort +models for the claim development presented in the manuscript +‘Replicating and extending chain-ladder via an age-period-cohort +structure on the claim development in a run-off triangle’ +. + +## Our models + +The models for the claim development available in the `clmplus` are +based on the models for human mortality implemented in the `StMoMo` +package. Users can either rely on our default models or set their own +configuration for the claim development. + +| Model | Lexis dimension | Claims reserving | +|:-----:|:-----------------:|---------------------------------:| +| a | age | development (chain-ladder model) | +| ac | age-cohort | development-accident | +| ap | age-period | development-calendar | +| apc | age-period-cohort | development-calendar-accident | + +## Installation + +The developer version of `clmplus` can be installed from GitHub. + + library(devtools) + devtools::install_github("gpitt71/clmplus") + +The current version of `clmplus` can be installed from CRAN. + + install.packages('clmplus') + +## Get Started + +In this brief example, we work with the `sifa.mtpl` data from the +`clmplus` package. Further examples can be found in the [package +vignettes](https://github.com/gpitt71/clmplus/tree/main/vignettes). The +data set of cumulative claim payments is transformed into an +`AggregateDataPP` object that pre-processes the data for claim +development modelling. + + library(clmplus) + + data ("sifa.mtpl") + dataset = sifa.mtpl + datapp = AggregateDataPP(cumulative.payments.triangle = dataset, eta= 1/2) + +Our models can be fit with the `clmplus` function. + + a.model.fit=clmplus(datapp, + hazard.model = "a") # age-model replicates the chain ladder + + ac.model.fit=clmplus(datapp, + hazard.model = "ac") + + ap.model.fit=clmplus(datapp, + hazard.model = "ap") + + apc.model.fit=clmplus(datapp, + hazard.model = "apc") + +The `plot` function can be be used to explore the scaled deviance +residuals of fitted models. Below, an example for the age-period-cohort +(`apc`) model for the claim development. + + plot(apc.model.fit) + +Predictions are performed with the `predict` function. + + a.model=predict(a.model.fit) + + # clmplus reserve (age model) + sum(a.model$reserve) + #226875.5 + + + ac.model=predict(ac.model.fit, + gk.fc.model = 'a', + gk.order = c(1,1,0)) + + # clmplus reserve (age-cohort model) + sum(ac.model$reserve) + #205305.7 + + ap.model= predict(ap.model.fit, + ckj.fc.model = 'a', + ckj.order = c(0,1,0)) + + # clmplus reserve (age-period model) + sum(ap.model$reserve) + #215602.8 + + + apc.model= predict(apc.model.fit, + gk.fc.model = 'a', + ckj.fc.model = 'a', + gk.order = c(1,1,0), + ckj.order = c(0,1,0)) + # clmplus reserve (age-period-cohort model) + sum(apc.model$reserve) + #213821.6 + +The fitted effect (and extrapolated) effects can be inspected with the +`plot` function. We continue below the example with the `apc` model. + + plot(apc.model) + +## Citation + +**APA Style** + +Pittarello, G., Hiabu, M., & Villegas, A. M. (2025). Replicating and +Extending Chain-Ladder via an Age–Period–Cohort Structure on the Claim +Development in a Run-Off Triangle. North American Actuarial Journal, +1-31. + +**BibTeX** + +``` bibtex +@article{ , + title={Replicating and Extending Chain-Ladder via an Age--Period--Cohort Structure on the Claim Development in a Run-Off Triangle}, + author={Pittarello, Gabriele and Hiabu, Munir and Villegas, Andr{\'e}s M}, + journal={North American Actuarial Journal}, + pages={1--31}, + year={2025}, + publisher={Taylor \& Francis} + doi = {10.1080/10920277.2025.2496725}, +} +``` + +## Further Resources + +The most recent tutorials and replication files associated with the +manuscript can be accessed via [our project +website](https://gpitt71.github.io/clmplus/). + +# Package index + +## All functions + +- [`AggregateDataPP()`](https://gpitt71.github.io/clmplus/reference/AggregateDataPP.md) + : Pre-process Run-Off Triangles +- [`amases.gtpl`](https://gpitt71.github.io/clmplus/reference/amases.gtpl.md) + : Amases GTPL +- [`amases.mod`](https://gpitt71.github.io/clmplus/reference/amases.mod.md) + : Amases MOD +- [`amases.mtpl`](https://gpitt71.github.io/clmplus/reference/amases.mtpl.md) + : Amases MTPL +- [`clmplus()`](https://gpitt71.github.io/clmplus/reference/clmplus.md) + : Fit a Chain Ladder Plus hazard model +- [`plot(`*``*`)`](https://gpitt71.github.io/clmplus/reference/plot.AggregateDataPP.md) + : Plot the payments behavior +- [`plot(`*``*`)`](https://gpitt71.github.io/clmplus/reference/plot.clmplusmodel.md) + : Plot the hazard model residuals +- [`plot(`*``*`)`](https://gpitt71.github.io/clmplus/reference/plot.clmpluspredictions.md) + : Plot the hazard model fitted and forecasted parameters +- [`predict(`*``*`)`](https://gpitt71.github.io/clmplus/reference/predict.clmplusmodel.md) + : Predict the Reserve using Chain Ladder Plus Models +- [`predictReserve(`*``*`)`](https://gpitt71.github.io/clmplus/reference/predictReserve.clmplusmodel.md) + [`predictReserve(`*``*`)`](https://gpitt71.github.io/clmplus/reference/predictReserve.clmplusmodel.md) + : Convert clmplus predictions to the ReSurv reserving interface +- [`predictReserve()`](https://gpitt71.github.io/clmplus/reference/predictReserve.md) + : Predict reserves +- [`sifa.gtpl`](https://gpitt71.github.io/clmplus/reference/sifa.gtpl.md) + : Sifa GTPL +- [`sifa.mod`](https://gpitt71.github.io/clmplus/reference/sifa.mod.md) + : Sifa MOD +- [`sifa.mtpl`](https://gpitt71.github.io/clmplus/reference/sifa.mtpl.md) + : Sifa MTPL + +# Articles + +### All vignettes + +- [Vignette + 1](https://gpitt71.github.io/clmplus/articles/casestudy1.md): +- [Model comparison and reproducible regression + checks](https://gpitt71.github.io/clmplus/articles/modelscomparison.md): diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 1a99c65..0a5573a 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -1,6 +1,6 @@ /* http://gregfranko.com/blog/jquery-best-practices/ */ -(function($) { - $(function() { +(function ($) { + $(function () { $('nav.navbar').headroom(); @@ -27,45 +27,45 @@ $('[data-bs-toggle="tooltip"]').tooltip(); - /* Clipboard --------------------------*/ + /* Clipboard --------------------------*/ - function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-bs-original-title'); - element.setAttribute('data-bs-original-title', msg); - $(element).tooltip('show'); - element.setAttribute('data-bs-original-title', tooltipOriginalTitle); - } + function changeTooltipMessage(element, msg) { + var tooltipOriginalTitle = element.getAttribute('data-bs-original-title'); + element.setAttribute('data-bs-original-title', msg); + $(element).tooltip('show'); + element.setAttribute('data-bs-original-title', tooltipOriginalTitle); + } - if(ClipboardJS.isSupported()) { - $(document).ready(function() { - var copyButton = ""; + if (ClipboardJS.isSupported()) { + $(document).ready(function () { + var copyButton = ""; - $("div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); + // Insert copy buttons: + $(copyButton).prependTo(".hasCopyButton"); - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); + // Initialize tooltips: + $('.btn-copy-ex').tooltip({ container: 'body' }); - // Initialize clipboard: - var clipboard = new ClipboardJS('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); - } - }); + // Initialize clipboard: + var clipboard = new ClipboardJS('[data-clipboard-copy]', { + text: function (trigger) { + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); + } + }); - clipboard.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); + clipboard.on('success', function (e) { + changeTooltipMessage(e.trigger, 'Copied!'); + e.clearSelection(); + }); - clipboard.on('error', function(e) { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); - }); + clipboard.on('error', function (e) { + changeTooltipMessage(e.trigger, 'Press Ctrl+C or Command+C to copy'); + }); - }); - } + }); + } /* Search marking --------------------------*/ var url = new URL(window.location.href); @@ -80,80 +80,80 @@ }); } - /* Search --------------------------*/ - /* Adapted from https://github.com/rstudio/bookdown/blob/2d692ba4b61f1e466c92e78fd712b0ab08c11d31/inst/resources/bs4_book/bs4_book.js#L25 */ + /* Search --------------------------*/ + /* Adapted from https://github.com/rstudio/bookdown/blob/2d692ba4b61f1e466c92e78fd712b0ab08c11d31/inst/resources/bs4_book/bs4_book.js#L25 */ // Initialise search index on focus - var fuse; - $("#search-input").focus(async function(e) { - if (fuse) { - return; - } - - $(e.target).addClass("loading"); - var response = await fetch($("#search-input").data("search-index")); - var data = await response.json(); + var fuse; + $("#search-input").focus(async function (e) { + if (fuse) { + return; + } + + $(e.target).addClass("loading"); + var response = await fetch($("#search-input").data("search-index")); + var data = await response.json(); + + var options = { + keys: ["what", "text", "code"], + ignoreLocation: true, + threshold: 0.1, + includeMatches: true, + includeScore: true, + }; + fuse = new Fuse(data, options); + + $(e.target).removeClass("loading"); + }); + // Use algolia autocomplete var options = { - keys: ["what", "text", "code"], - ignoreLocation: true, - threshold: 0.1, - includeMatches: true, - includeScore: true, + autoselect: true, + debug: true, + hint: false, + minLength: 2, }; - fuse = new Fuse(data, options); - - $(e.target).removeClass("loading"); - }); - - // Use algolia autocomplete - var options = { - autoselect: true, - debug: true, - hint: false, - minLength: 2, - }; - var q; -async function searchFuse(query, callback) { - await fuse; - - var items; - if (!fuse) { - items = []; - } else { - q = query; - var results = fuse.search(query, { limit: 20 }); - items = results - .filter((x) => x.score <= 0.75) - .map((x) => x.item); - if (items.length === 0) { - items = [{dir:"Sorry 😿",previous_headings:"",title:"No results found.",what:"No results found.",path:window.location.href}]; + var q; + async function searchFuse(query, callback) { + await fuse; + + var items; + if (!fuse) { + items = []; + } else { + q = query; + var results = fuse.search(query, { limit: 20 }); + items = results + .filter((x) => x.score <= 0.75) + .map((x) => x.item); + if (items.length === 0) { + items = [{ dir: "Sorry 😿", previous_headings: "", title: "No results found.", what: "No results found.", path: window.location.href }]; + } + } + callback(items); } - } - callback(items); -} - $("#search-input").autocomplete(options, [ - { - name: "content", - source: searchFuse, - templates: { - suggestion: (s) => { - if (s.title == s.what) { - return `${s.dir} >
${s.title}
`; - } else if (s.previous_headings == "") { - return `${s.dir} >
${s.title}
> ${s.what}`; - } else { - return `${s.dir} >
${s.title}
> ${s.previous_headings} > ${s.what}`; - } + $("#search-input").autocomplete(options, [ + { + name: "content", + source: searchFuse, + templates: { + suggestion: (s) => { + if (s.title == s.what) { + return `${s.dir} >
${s.title}
`; + } else if (s.previous_headings == "") { + return `${s.dir} >
${s.title}
> ${s.what}`; + } else { + return `${s.dir} >
${s.title}
> ${s.previous_headings} > ${s.what}`; + } + }, }, }, - }, - ]).on('autocomplete:selected', function(event, s) { - window.location.href = s.path + "?q=" + q + "#" + s.id; - }); + ]).on('autocomplete:selected', function (event, s) { + window.location.href = s.path + "?q=" + q + "#" + s.id; + }); }); })(window.jQuery || window.$) -document.addEventListener('keydown', function(event) { +document.addEventListener('keydown', function (event) { // Check if the pressed key is '/' if (event.key === '/') { event.preventDefault(); // Prevent any default action associated with the '/' key diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 26a3256..c07eef7 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,10 +1,10 @@ -pandoc: '3.4' -pkgdown: 2.1.1 +pandoc: 3.8.3 +pkgdown: 2.2.0 pkgdown_sha: ~ articles: casestudy1: casestudy1.html modelscomparison: modelscomparison.html -last_built: 2025-06-12T10:08Z +last_built: 2026-07-23T16:16Z urls: reference: https://gpitt71.github.io/clmplus/reference article: https://gpitt71.github.io/clmplus/articles diff --git a/docs/reference/AggregateDataPP.html b/docs/reference/AggregateDataPP.html index e50e1ab..b8296a2 100644 --- a/docs/reference/AggregateDataPP.html +++ b/docs/reference/AggregateDataPP.html @@ -7,7 +7,7 @@ clmplus - 1.0.0 + 1.0.2