pammtools0.7.3 package

Piece-Wise Exponential Additive Mixed Modeling Tools for Survival Analysis

add_cif

Add cumulative incidence function to data

add_counterfactual_transitions

Add counterfactual observations for possible transitions

add_hazard

Add predicted (cumulative) hazard to data set

add_surv_prob

Add survival probability estimates

add_tdc

Add time-dependent covariate to a data set

add_term

Embeds the data set with the specified (relative) term contribution

add_trans_ci

Add transition probabilities confidence intervals

add_trans_prob

Add transition probabilities

as_ped_cr

Competing risks trafo

as_ped

Transform data to Piece-wise Exponential Data (PED)

as.data.frame.crps

Transform crps object to data.frame

calc_ci

Calculate confidence intervals

combine_df

Create a data frame from all combinations of data frames

compute_cumu_diff

Calculate difference in cumulative hazards and respective standard err...

cumulative_coefficient

Extract cumulative coefficients (cumulative hazard differences)

dplyr_verbs

dplyr Verbs for ped-Objects

elra_matrix

Create matrix components for cumulative effects

fcumu

A formula special used to handle cumulative effect specifications

formula_helpers

Extract variables from the left-hand-side of a formula

from_to_pairs

Extract transition information from different objects

geom_hazard

(Cumulative) (Step-) Hazard Plots.

geom_stepribbon

Step ribbon plots.

get_cif

Calculate CIF for one cause

get_cumu_eff

Calculate (or plot) cumulative effect for all time-points of the follo...

get_cumu_hazard

Calculate cumulative hazard

get_cumulative

Expand time-dependent covariates to functionals

get_cut

Obtain interval break points

get_event_types

Exctract event types

get_hazard

Calculate predicted hazard

get_intervals

Information on intervals in which times fall

get_laglead

Construct or extract data that represents a lag-lead window

get_ped_form

Extract variables from the left-hand-side of a formula

get_plotinfo

Extract plot information for all special model terms

get_sim_ci

Calculate simulation based confidence intervals

get_sim_cumu

helper function for add_trans_ci

get_surv_prob

Calculate survival probabilities

get_tdc_form

Extract variables from the left-hand-side of a formula

get_tdc_vars

Extract variables from the left-hand-side of a formula

get_term

Extract partial effects for specified model terms

get_terms

Extract the partial effects of non-linear model terms

gg_fixed

Forrest plot of fixed coefficients

gg_laglead

Plot Lag-Lead windows

gg_partial

Visualize effect estimates for specific covariate combinations

gg_re

Plot Normal QQ plots for random effects

gg_slice

Plot 1D (smooth) effects

gg_smooth

Plot smooth 1d terms of gam objects

gg_tensor

Plot tensor product effects

has_tdc

Checks if data contains timd-dependent covariates

int_info

Create start/end times and interval information

make_X

Create design matrix from a suitable object

make_X.scam

Create design matrix from a suitable object

modus

Calculate the modus

nest_tdc

Create nested data frame from data with time-dependent covariates

newdata

Construct a data frame suitable for prediction

pamm

Fit a piece-wise exponential additive model

pammtools

pammtools: Piece-wise exponential Additive Mixed Modeling tools.

ped_info

Extract interval information and median/modus values for covariates

pipe

Pipe operator

predictSurvProb.pamm

S3 method for pamm objects for compatibility with package pec

prep_concurrent

Extract information on concurrent effects

rpexp

Draw random numbers from piece-wise exponential distribution.

sample_info

Extract information of the sample contained in a data set

seq_range

Generate a sequence over the range of a vector

sim_pexp_cr

Simulate data for competing risks scenario

sim_pexp

Simulate survival times from the piece-wise exponential distribution

smooth.construct.fdl.smooth.spec

New basis for penalized lag selection

specials

Formula specials for defining time-dependent covariates

split_data_multistate

Split data to obtain recurrent event data in PED format

split_data

Function to transform data without time-dependent covariates into piec...

tidiers

Extract 1d smooth objects in tidy data format.

tidy_fixed

Extract fixed coefficient table from model object

tidy_smooth

Extract random effects in tidy data format.

tidy_smooth2d

Extract 2d smooth objects in tidy format.

warn_about_new_time_points.glm

Warn if new t_j are used

warn_about_new_time_points

Warn if new t_j are used

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.

  • Maintainer: Andreas Bender
  • License: MIT + file LICENSE
  • Last published: 2025-03-24