Piece-Wise Exponential Additive Mixed Modeling Tools for Survival Analysis
Overview
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.
Enhancements
- The cumulative post-processing functions (
add_cumu_hazard(),add_surv_prob(),add_cif()-- for both their default andpamm_icmethods -- andadd_trans_prob()) now **error** whennewdatais not grouped so that the time variable is unique within each group (typically a forgottengroup_by()), instead of silently accumulating cumulative quantities across distinct covariate profiles / causes / transitions and returning wrong curves. This generalises the guard already used for the interval-censoring pooling path (and mirrors thestopifnot()guard in the RMST example). All of these functions acceptcheck_grouping = FALSEto opt out (e.g. for advanced workflows that intentionally accumulate over rows with varying covariates). The guard detects mis-grouping via repeated time values within a group: grids built withmake_newdata()are always caught, but hand-built grids stacking profiles with *disjoint* time grids are indistinguishable from a single profile with time-varying covariates and pass undetected.
Show all changes in 0.8.1Hide the rest of the changes in 0.8.1
Documentation
- Standardized the headings and subheadings in the package vignettes to sentence-style capitalization for consistency and readability.
- Fixed function help page titles to follow sentence-style capitalization (
as_ped,dplyr_verbs,geom_hazard,geom_stepribbon,gg_laglead,gg_state_occupation,pammtools). Also corrected typos inget_event_types(Exctract → Extract) andhas_tdc(timd → time). - Updated
pammtools.Rhelp page to include all available vignettes: Bayesian, cumulative effects, interval-censored, model evaluation, multi-state, recurrent events, shape constraints, simulations, and xgboost backend. - Updated website configuration (
_pkgdown.yml) to align navbar and reference section titles with vignette headlines and apply consistent sentence-style capitalization throughout the documentation site.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 104 (63 internal)includes a package overview page
- Examples that run
- 89%25 run in a plain check (1 of them under a condition) · 2 only when donttest examples are enabled (R CMD check --as-cran) · 1 never run
- Exported functions with examples
- 58%
- Documented parameters
- 95%
- Return-value docs
- 27%
- Help pages citing references
- 1%
Downloads
Repository
- PRs merged (all time)
- 87%
- Median days to close, 50 most recently updated closed issues
- 40
- Median days to close, 50 most recently updated closed PRs
- 5
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
10 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/adibender/pammtools on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-08-13 · The repository has a site deploy workflow
pkgdown site last built 2026-08-13, before release 0.8.1 (2026-08-25)
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-02-16Named in .Rbuildignore: .claudeNamed in .gitignore: .claudePull request it wrote: opened by a project memberCommits: 28 by its own account · at least 12 crediting it in the message
- Codexfirst seen 2026-06-17Named in .Rbuildignore: .codex
- Claude CodePull requests: 6 from outside contributors, first on 2026-06-02, 6 from forks
- Claude Opus 4.88 commits · Jun to Jul 2026
- Claude Opus 4.63 commits · Feb 2026
- Claude Fable 51 commit · Jun 2026
Dependencies
Installing pammtools adds 99 packages (52 with compiled code, 88 MB of source tarballs). Heaviest: stringi 11 MB, TH.data 8.2 MB, ggplot2 6.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.8.1Latest
- 0.8.0
- RR 4.6.0 released · 2026-04-24
- 0.7.42026-02-16 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 0.7.3
- RR 4.4.0 released · 2024-04-24
- 0.5.932024-02-25 · diff ↗
- 0.5.92
- RR 4.3.0 released · 2023-04-21
- 0.5.912023-03-24 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.5.8
- 0.5.72021-06-21 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 0.5.62021-03-29 · diff ↗
Show 13 earlier eventsHide 13 earlier events
Package metadata
- First published
- 2018-11-16
- Total releases
- 20 / 8 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 219 KB / 6 files
- Download size
- 487 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("pammtools")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1177/1471082x17748083.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.