Package: survPen 2.0.0

survPen: Multidimensional Penalized Splines for (Excess) Hazard Models, Relative Mortality Ratio Models and Marginal Intensity Models

Fits (excess) hazard, relative mortality ratio or marginal intensity models with multidimensional penalized splines allowing for time-dependent effects, non-linear effects and interactions between several continuous covariates. In survival and net survival analysis, in addition to modelling the effect of time (via the baseline hazard), one has often to deal with several continuous covariates and model their functional forms, their time-dependent effects, and their interactions. Model specification becomes therefore a complex problem and penalized regression splines represent an appealing solution to that problem as splines offer the required flexibility while penalization limits overfitting issues. Current implementations of penalized survival models can be slow or unstable and sometimes lack some key features like taking into account expected mortality to provide net survival and excess hazard estimates. In contrast, survPen provides an automated, fast, and stable implementation (thanks to explicit calculation of the derivatives of the likelihood) and offers a unified framework for multidimensional penalized hazard and excess hazard models. Later versions (>2.0.0) include penalized models for relative mortality ratio, and marginal intensity in recurrent event setting. survPen may be of interest to those who 1) analyse any kind of time-to-event data: mortality, disease relapse, machinery breakdown, unemployment, etc 2) wish to describe the associated hazard and to understand which predictors impact its dynamics, 3) wish to model the relative mortality ratio between a cohort and a reference population, 4) wish to describe the marginal intensity for recurrent event data. See Fauvernier et al. (2019a) <doi:10.21105/joss.01434> for an overview of the package and Fauvernier et al. (2019b) <doi:10.1111/rssc.12368> for the method.

Authors:Mathieu Fauvernier [aut, cre], Laurent Roche [aut], Laurent Remontet [aut], Zoe Uhry [ctb], Nadine Bossard [ctb], Elsa Coz [ctb]

survPen_2.0.0.tar.gz
survPen_2.0.0.zip(r-4.5)survPen_2.0.0.zip(r-4.4)survPen_2.0.0.zip(r-4.3)
survPen_2.0.0.tgz(r-4.5-x86_64)survPen_2.0.0.tgz(r-4.5-arm64)survPen_2.0.0.tgz(r-4.4-x86_64)survPen_2.0.0.tgz(r-4.4-arm64)survPen_2.0.0.tgz(r-4.3-x86_64)survPen_2.0.0.tgz(r-4.3-arm64)
survPen_2.0.0.tar.gz(r-4.5-noble)survPen_2.0.0.tar.gz(r-4.4-noble)
survPen_2.0.0.tgz(r-4.4-emscripten)survPen_2.0.0.tgz(r-4.3-emscripten)
survPen.pdf |survPen.html
survPen/json (API)
NEWS

# Install 'survPen' in R:
install.packages('survPen', repos = c('https://fauvernierma.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/fauvernierma/survpen/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • HeartFailure - Patients with heart failure at risk of recurrent hospitalization events
  • datCancer - Patients diagnosed with cervical cancer
  • expected.table - French women mortality table
  • list.wicss - List of ICSS standards for age-standardization of cancer (net) survival

On CRAN:

Conda-Forge:

cpp

6.82 score 12 stars 1 packages 85 scripts 1.1k downloads 2 mentions 34 exports 3 dependencies

Last updated 3 months agofrom:7ecdb11a40. Checks:1 OK, 10 NOTE. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKMar 02 2025
R-4.5-win-x86_64NOTEMar 02 2025
R-4.5-mac-x86_64NOTEMar 02 2025
R-4.5-mac-aarch64NOTEMar 02 2025
R-4.5-linux-x86_64NOTEMar 02 2025
R-4.4-win-x86_64NOTEMar 02 2025
R-4.4-mac-x86_64NOTEMar 02 2025
R-4.4-mac-aarch64NOTEMar 02 2025
R-4.3-win-x86_64NOTEMar 02 2025
R-4.3-mac-x86_64NOTEMar 02 2025
R-4.3-mac-aarch64NOTEMar 02 2025

Exports:%cross%%mult%%vec%colSums2constraintcrscrs.FPCumulHazardderiv_RDerivCumulHazarddesign.matrixgrad_rhograd_rho_multHazGLHess_rhoHess_rho_multinstrmodel.consNR.betaNR.rhopredSNSpwcstrdrepamsmfsmooth.conssmooth.cons.integralsmooth.specsplitmultsurvPensurvPen.fittensor.intensor.prod.Stensor.prod.X

Dependencies:RcppRcppEigenstatmod

Survival analysis with survPen

Rendered fromsurvival_analysis_with_survPen.Rmdusingknitr::rmarkdownon Mar 02 2025.

Last update: 2024-12-02
Started: 2019-05-02

Readme and manuals

Help Manual

Help pageTopics
Matrix cross-multiplication between two matrices%cross%
Matrix multiplication between two matrices%mult%
Matrix multiplication between a matrix and a vector%vec%
colSums of a matrixcolSums2
Sum-to-zero constraintconstraint
Implementation of the corrected variance Vccor.var
Bases for cubic regression splines (equivalent to "cr" in 'mgcv')crs
Penalty matrix constructor for cubic regression splinescrs.FP
Cumulative hazard (integral of hazard) onlyCumulHazard
Patients diagnosed with cervical cancerdatCancer
Derivative of a Choleski factorderiv_R
Cumulative hazard (integral of hazard) and its first and second derivatives wrt regression parameters betaDerivCumulHazard
Design matrix for the model needed in Gauss-Legendre quadraturedesign.matrix
French women mortality tableexpected.table
Gradient vector of LCV and LAML wrt rho (log smoothing parameters)grad_rho
Gradient vector of LCV and LAML wrt rho (log smoothing parameters). Version for multiplicative decomposition : relative mortality ratio modelgrad_rho_mult
Gauss-Legendre evaluationsHazGL
Patients with heart failure at risk of recurrent hospitalization eventsHeartFailure
Hessian matrix of LCV and LAML wrt rho (log smoothing parameters)Hess_rho
Hessian matrix of LCV and LAML wrt rho (log smoothing parameters). Version for multiplicative decomposition : relative mortality ratio modelHess_rho_mult
Position of the nth occurrence of a string in another oneinstr
Reverses the initial reparameterization for stable evaluation of the log determinant of the penalty matrixinv.repam
List of ICSS standards for age-standardization of cancer (net) survivallist.wicss
Design and penalty matrices for the modelmodel.cons
Inner Newton-Raphson algorithm for regression parameters estimationNR.beta
Outer Newton-Raphson algorithm for smoothing parameters estimation via LCV or LAML optimizationNR.rho
Hazard and Survival prediction from fitted 'survPen' modelpredict.survPen
Prediction of grouped indicators : population (net) survival (PNS) and age-standardized (net) survival (SNS)predSNS
print summary for a 'survPen' fitprint.summary.survPen
Defining piecewise constant (excess) hazard in survPen formulaepwcst
Defining random effects in survPen formulaerd
Applies initial reparameterization for stable evaluation of the log determinant of the penalty matrixrepam
Implementation of the robust variance Vrrobust.var
Defining smooths in survPen formulaesmf tensor tint
Design and penalty matrices of penalized splines in a smooth.spec objectsmooth.cons
Design matrix of penalized splines in a smooth.spec object for Gauss-Legendre quadraturesmooth.cons.integral
Covariates specified as penalized splinessmooth.spec
Split original dataset at specified times to fit a multiplicative modelsplitmult
Summary for a 'survPen' fitsummary.survPen
(Excess) hazard model with (multidimensional) penalized splines and integrated smoothness estimationsurvPen
(Excess) hazard model with multidimensional penalized splines for given smoothing parameterssurvPen.fit
Fitted survPen objectsurvPenObject
tensor model matrix for two marginal basestensor.in
Tensor product for penalty matricestensor.prod.S
tensor model matrixtensor.prod.X