Skip to content

pammtools

0.8.1Package record

Piece-Wise Exponential Additive Mixed Modeling Tools for Survival Analysis

4packages dependsuggested by 3
62.7Kdownloads / year
90.9%test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.8.1

Enhancements

  • The cumulative post-processing functions (add_cumu_hazard(), add_surv_prob(), add_cif() -- for both their default and pamm_ic methods -- and add_trans_prob()) now **error** when newdata is not grouped so that the time variable is unique within each group (typically a forgotten group_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 the stopifnot() guard in the RMST example). All of these functions accept check_grouping = FALSE to 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 with make_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 in get_event_types (Exctract → Extract) and has_tdc (timd → time).
  • Updated pammtools.R help 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

CRAN checks
13OK
Slowest check: 6.8 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.8.1
READMEYes · 110 wordsVignettes· In the repository, left out of the releaseNEWSYes · 67% structured · mentions 0.8.1Citation fileYes · cites a publicationWebsiteYes · pkgdown
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

62.7K
CRAN downloads in the past year
Rank #1,716 · ~172/day · ~5.2K/mo
Daily download trend is not available in this view yet.
3.8K30 days
12.4K90 days
62.7K1 year
Compare downloads with other packages →
Also on2.1K r2u4 autocran102 c2d4u

Repository

51Stars
13Forks
12Open issues
2Open PRs
21Releases
1,373Commits
11Commit identities
rrstatssurvival-analysisadditive-modelspiece-wise-exponentialpammpammtools
1,373 commits · Last activity 2026-08-13 · 0% stars, 30d · Discussions: 1 post
Responsiveness
How these are sampled
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

2025-10-17 · 502026-07-07 · 51
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (4)
README.Rmdpkgdown

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)

Coverage (1)
Coverage reporting (Codecov)
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 2 practices
CRAN release process (1)
cran-comments.md
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-02-16
    Named in .Rbuildignore: .claude
    Named in .gitignore: .claude
    Pull request it wrote: opened by a project member
    Commits: 28 by its own account · at least 12 crediting it in the message
  • Codexfirst seen 2026-06-17
    Named in .Rbuildignore: .codex
From outside contributors
  • Claude Code
    Pull requests: 6 from outside contributors, first on 2026-06-02, 6 from forks
Models named in its commits
  • Claude Opus 4.88 commits · Jun to Jul 2026
  • Claude Opus 4.63 commits · Feb 2026
  • Claude Fable 51 commit · Jun 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
19 external dependencies (excludes base and recommended)

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.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
4direct
6indirect
Imports 4
Suggested by 3
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (5)
Author, Maintainer since 0.1.7 (2018)
Author · added in 0.5.4
Author · added in 0.7.3
Contributor · added in 0.5.8
Releases (20)

Pick two releases to compare their code metrics.

  • 0.8.1Latest
    record
    2026-06-22 · current release · diff ↗
  • 0.8.0
    record
    2026-06-22 · diff ↗ ·
    added 4 exports
    add_inspections, gg_state_occupation, pamm_ic, pamm_ic_cr
  • R
    R 4.6.0 released · 2026-04-24
  • 0.7.4
    record
    2026-02-16 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.7.3
    record
    2025-03-24 · diff ↗ ·
    added 2 exports
    add_counterfactual_transitions, add_trans_prob
  • R
    R 4.4.0 released · 2024-04-24
  • 0.5.93
    record
    2024-02-25 · diff ↗
  • 0.5.92
    record
    2023-07-13 · diff ↗ ·
    removed 1 export
    as_ped_recurrent
    added 1 export
    as_ped_multistate
  • R
    R 4.3.0 released · 2023-04-21
  • 0.5.91
    record
    2023-03-24 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 0.5.8
    record
    2022-01-09 · diff ↗ ·
    removed 1 export
    fill
    added 1 export
    distinct
  • 0.5.7
    record
    2021-06-21 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 0.5.6
    record
    2021-03-29 · diff ↗
Show 13 earlier eventsHide 13 earlier events
  • 0.5.4
    record
    2020-12-18 · diff ↗ ·
    added 2 exports
    add_cif, as_ped_recurrent
  • 0.2.4
    record
    2020-06-06 · diff ↗
  • 0.2.3
    record
    2020-05-27 · diff ↗ ·
    removed 1 export
    riskset_info
  • R
    R 4.0.0 released · 2020-04-24
  • 0.2.2
    record
    2020-03-12 · diff ↗
  • 0.2.1
    record
    2020-02-09 · diff ↗ ·
    added 2 exports
    is.pamm, pamm
  • 0.1.14
    record
    2019-09-08 · diff ↗ ·
    removed 3 exports
    add_term2, group_by_, split_tdc
  • R
    R 3.6.0 released · 2019-04-26
  • 0.1.11
    record
    2019-04-18 · diff ↗ ·
    removed 3 exports
    distinct_, rename_, select_
    added 1 export
    add_term2
  • 0.1.9
    record
    2019-03-14 · diff ↗
  • 0.1.8
    record
    2019-01-02 · diff ↗
  • 0.1.7
    record
    2018-11-16
  • R
    R 3.5.0 released · 2018-04-23

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for pammtools version 0.8.1 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy