This function fits and computes the reserves for the ReSurv
models
IndividualDataPP object to use for the ReSurv
fit.
character
, hazard model supported from our package, must be provided as a string. The model can be chosen from:
"COX"
: Standard Cox model for the hazard.
"NN"
: Deep Survival Neural Network.
"XGB"
: eXtreme Gradient Boosting.
ties handling, default is the Efron approach.
handling the baseline hazard. Default is a spline.
method to preprocess the features
integer
, random seed set for reproducibility
list
, hyperparameters for the machine learning models. It will be disregarded for the cox approach.
numeric
, percentage of data used for training on the upper triangle.
character
, use probability or exposure approach to group from input to output development factors. Choice between:
"exposure"
"probability"
Default is "exposure"
.
numeric
, check hazard value on initial granularity, if above threshold we increase granularity to try and adjust the development factor.
ReSurv
fit. A list containing
model.out
: list
containing the pre-processed covariates data for the fit (data
) and the basic model output (model.out
;COX, XGB or NN).
is_lkh
: numeric
Training negative log likelihood.
os_lkh
: numeric
Validation negative log likelihood. Not available for COX.
hazard_frame
: data.frame
containing the fitted hazard model with the corresponding covariates. It contains:
expg
: fitted risk score.
baseline
: fitted baseline.
hazard
: fitted hazard rate (expg
*baseline
).
f_i
: fitted development factors.
cum_f_i
: fitted cumulative development factors.
S_i
:fitted survival function.
S_i_lag
:fitted survival function (lag version, for further information see ?dplyr::lag
).
S_i_lead
:fitted survival function (lead version, for further information see ?dplyr::lead
).
hazard_model
: string
chosen hazard model (COX, NN or XGB)
IndividualDataPP
: starting IndividualDataPP
object.
The model fit uses the theoretical framework of Hiabu et al. (2023), that relies on the correspondence between hazard models and development factors:
To be completed with final notation of the paper.
The ReSurv
package assumes proportional hazard models.
Given an i.i.d. sample \(\left\{y_i,x_i\right\}_{i=1, \ldots, n}\) the individual hazard at time \(t\) is:
\(\lambda_i(t)=\lambda_0(t)e^{y_i(x_i)}\)
Composed of a baseline \(\lambda_0(t)\) and a proportional effect \(e^{y_i(x_i)}\).
Currently, the implementation allows to optimize the partial likelihood (concerning the proportional effects) using one of the following statistical learning approaches:
Pittarello, G., Hiabu, M., & Villegas, A. M. (2023). Chain Ladder Plus: a versatile approach for claims reserving. arXiv preprint arXiv:2301.03858.
Therneau, T. M., & Lumley, T. (2015). Package ‘survival’. R Top Doc, 128(10), 28-33.
Katzman, J. L., Shaham, U., Cloninger, A., Bates, J., Jiang, T., & Kluger, Y. (2018). DeepSurv: personalized treatment recommender system using a Cox proportional hazards deep neural network. BMC medical research methodology, 18(1), 1-12.
Chen, T., He, T., Benesty, M., & Khotilovich, V. (2019). Package ‘xgboost’. R version, 90, 1-66.