Package: pammtools 0.7.3

pammtools: Piece-Wise Exponential Additive Mixed Modeling Tools for Survival Analysis

The Piece-wise exponential (Additive Mixed) Model (PAMM; Bender and others (2018) <doi:10.1177/1471082X17748083>) is a powerful model class for the analysis of survival (or time-to-event) data, based on Generalized Additive (Mixed) Models (GA(M)Ms). It offers intuitive specification and robust estimation of complex survival models with stratified baseline hazards, random effects, time-varying effects, time-dependent covariates and cumulative effects (Bender and others (2019)), as well as support for left-truncated data as well as competing risks, recurrent events and multi-state settings. pammtools provides tidy workflow for survival analysis with PAMMs, including data simulation, transformation and other functions for data preprocessing and model post-processing as well as visualization.

Authors:Andreas Bender [aut, cre], Fabian Scheipl [aut], Johannes Piller [aut], Philipp Kopper [aut], Lukas Burk [ctb]

pammtools_0.7.3.tar.gz
pammtools_0.7.3.zip(r-4.5)pammtools_0.7.3.zip(r-4.4)pammtools_0.7.3.zip(r-4.3)
pammtools_0.7.3.tgz(r-4.5-any)pammtools_0.7.3.tgz(r-4.4-any)pammtools_0.7.3.tgz(r-4.3-any)
pammtools_0.7.3.tar.gz(r-4.5-noble)pammtools_0.7.3.tar.gz(r-4.4-noble)
pammtools_0.7.3.tgz(r-4.4-emscripten)pammtools_0.7.3.tgz(r-4.3-emscripten)
pammtools.pdf |pammtools.html
pammtools/json (API)
NEWS

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

Bug tracker:https://github.com/adibender/pammtools/issues

Pkgdown site:https://adibender.github.io

Datasets:
  • daily - Time-dependent covariates of the 'patient' data set.
  • patient - Survival data of critically ill ICU patients
  • simdf_elra - Simulated data with cumulative effects
  • staph - Time until staphylococcus aureaus infection in children, with possible recurrence
  • tumor - Stomach area tumor data

On CRAN:

Conda:

additive-modelspammpammtoolspiece-wise-exponentialsurvival-analysis

9.32 score 48 stars 8 packages 310 scripts 2.8k downloads 2 mentions 70 exports 112 dependencies

Last updated 2 hours agofrom:2a65936bcc. Checks:9 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKMar 24 2025
R-4.5-winOKMar 24 2025
R-4.5-macOKMar 24 2025
R-4.5-linuxOKMar 24 2025
R-4.4-winOKMar 24 2025
R-4.4-macOKMar 24 2025
R-4.4-linuxOKMar 24 2025
R-4.3-winOKMar 24 2025
R-4.3-macOKMar 24 2025

Exports:%>%add_cifadd_counterfactual_transitionsadd_cumu_hazardadd_hazardadd_surv_probadd_tdcadd_termadd_trans_probarrangeas_pedas_ped_multistatecombine_dfcumulativedistinctfcumufilterfull_joingeom_hazardgeom_stephazardgeom_stepribbongeom_survGeomHazardGeomStepHazardGeomStepribbonGeomSurvget_cumu_coefget_cumu_effget_intervalsget_lagleadget_partial_llget_plotinfoget_termsgg_cumu_effgg_fixedgg_lagleadgg_partialgg_partial_llgg_regg_slicegg_smoothgg_tensorgroup_byinner_joinint_infois.pammis.pedleft_joinmake_newdatamutatenest_tdcpammped_inforenameright_joinsample_fracsample_infosample_nselectseq_rangesim_pexpslicesplit_datasummarisetidy_fixedtidy_retidy_smoothtidy_smooth2dtransmuteungroup

Dependencies:backportsbase64encbslibcachemcheckmatecliclustercmprskcodetoolscolorspacecpp11data.tablediagramdigestdoParalleldplyrevaluatefansifarverfastmapfontawesomeforeachforeignFormulafsfuturefuture.applygenericsggplot2globalsgluegridExtragtablehighrHmischtmlTablehtmltoolshtmlwidgetsisobanditeratorsjquerylibjsonliteKernSmoothknitrlabelinglatticelavalazyevallifecyclelistenvmagrittrMASSMatrixMatrixModelsmemoisemetsmgcvmimemultcompmunsellmvtnormnlmennetnumDerivparallellypecpillarpkgconfigplotrixpolsplineprodlimprogressrPublishpurrrquantregR6rangerrappdirsRColorBrewerRcppRcppArmadilloRcppEigenriskRegressionrlangrmarkdownrmsrpartrstudioapisandwichsassscalesscamshapeSparseMSQUAREMstringistringrsurvivalTH.datatibbletidyrtidyselecttimeregtinytexutf8vctrsviridisviridisLitewithrxfunyamlzoo

Readme and manuals

Help Manual

Help pageTopics
Add cumulative incidence function to dataadd_cif add_cif.default
Add counterfactual observations for possible transitionsadd_counterfactual_transitions
Add predicted (cumulative) hazard to data setadd_cumu_hazard add_hazard add_hazard.default
Add survival probability estimatesadd_surv_prob
Add time-dependent covariate to a data setadd_tdc
Embeds the data set with the specified (relative) term contributionadd_term
Add transition probabilitiesadd_trans_prob
Transform crps object to data.frameas.data.frame.crps
Time-dependent covariates of the 'patient' data set.daily
(Cumulative) (Step-) Hazard Plots.GeomHazard GeomStepHazard GeomSurv geom_hazard geom_stephazard geom_surv
Step ribbon plots.GeomStepribbon geom_stepribbon
Extract cumulative coefficients (cumulative hazard differences)get_cumu_coef get_cumu_coef.aalen get_cumu_coef.cox.aalen get_cumu_coef.gam
Calculate (or plot) cumulative effect for all time-points of the follow-upget_cumu_eff gg_cumu_eff
Information on intervals in which times fallget_intervals get_intervals.default
Construct or extract data that represents a lag-lead windowget_laglead get_laglead.data.frame get_laglead.default
Extract plot information for all special model termsget_plotinfo
Extract the partial effects of non-linear model termsget_terms
Forrest plot of fixed coefficientsgg_fixed
Plot Lag-Lead windowsgg_laglead gg_laglead.default gg_laglead.LL_df gg_laglead.nested_fdf
Visualize effect estimates for specific covariate combinationsget_partial_ll gg_partial gg_partial_ll
Plot Normal QQ plots for random effectsgg_re
Plot 1D (smooth) effectsgg_slice
Plot smooth 1d terms of gam objectsgg_smooth gg_smooth.default
Plot tensor product effectsgg_tensor
Construct a data frame suitable for predictionmake_newdata make_newdata.default make_newdata.fped make_newdata.ped
Survival data of critically ill ICU patientspatient
Extract interval information and median/modus values for covariatesped_info ped_info.ped
S3 method for pamm objects for compatibility with package pecpredictSurvProb.pamm
Generate a sequence over the range of a vectorseq_range
Simulate survival times from the piece-wise exponential distributionsim_pexp
Simulated data with cumulative effectssimdf_elra
Time until staphylococcus aureaus infection in children, with possible recurrencestaph
Extract random effects in tidy data format.tidy_re
Extract 1d smooth objects in tidy data format.tidy_smooth
Extract 2d smooth objects in tidy format.tidy_smooth2d
Stomach area tumor datatumor