Transform data to Piece-wise Exponential Data (PED) format

Functions to transform data sets in different formats to PED format, suitable to be fit as PAMMs.

as_ped() is.ped() as_ped_multistate()

Transform data to Piece-wise Exponential Data (PED)

PED helper functions

Functions that help extract (interval-specific) summary information from PED and create newdata, e.g., for prediction and plotting.

int_info()

Create start/end times and interval information

ped_info()

Extract interval information and median/modus values for covariates

make_newdata()

Construct a data frame suitable for prediction

get_intervals()

Information on intervals in which times fall

Extract information from PAMMs

Functions that help extract information from fitted model objects, e.g., smooth effects for plotting

tidy_fixed()

Extract fixed coefficient table from model object

tidy_smooth()

Extract 1d smooth objects in tidy data format.

tidy_smooth2d()

Extract 2d smooth objects in tidy format.

tidy_re()

Extract random effects in tidy data format.

get_cumu_coef()

Extract cumulative coefficients (cumulative hazard differences)

as.data.frame(<crps>)

Transform crps object to data.frame

predictSurvProb(<pamm>)

S3 method for pamm objects for compatibility with package pec

Augment functions

Functions that augment a data set by different quantaties like the hazard rate.

add_term()

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

add_hazard() add_cumu_hazard()

Add predicted (cumulative) hazard to data set

add_surv_prob()

Add survival probability estimates

add_cif()

Add cumulative incidence function to data

Convenience functions for visualization of model outputs.

Functions that facilitate effect plots (smooth effects, etc.)

gg_fixed()

Forrest plot of fixed coefficients

gg_smooth()

Plot smooth 1d terms of gam objects

gg_tensor()

Plot tensor product effects

gg_re()

Plot Normal QQ plots for random effects

gg_slice()

Plot 1D (smooth) effects

gg_partial() gg_partial_ll() get_partial_ll()

Visualize effect estimates for specific covariate combinations

gg_laglead()

Plot Lag-Lead windows

get_cumu_eff() gg_cumu_eff()

Calculate (or plot) cumulative effect for all time-points of the follow-up

geom_hazard() geom_stephazard() geom_surv()

(Cumulative) (Step-) Hazard Plots.

geom_stepribbon()

Step ribbon plots.

get_plotinfo()

Extract plot information for all special model terms

Data sets

Data sets contained in pammtools

tumor

Stomach area tumor data

patient

Survival data of critically ill ICU patients

daily

Time-dependent covariates of the patient data set.

staph

Time until staphylococcus aureaus infection in children, with possible recurrence

simdf_elra

Simulated data with cumulative effects

Utilities

Utility functions

seq_range()

Generate a sequence over the range of a vector

sim_pexp()

Simulate survival times from the piece-wise exponential distribution

get_laglead()

Construct or extract data that represents a lag-lead window

add_tdc()

Add time-dependent covariate to a data set

pammtools

pammtools: Piece-wise exponential Additive Mixed Modeling tools.

get_terms()

Extract the partial effects of non-linear model terms