Arrière

Presentation

Improving fitting and predictions for flexible parametric survival models

Paul Lambert

9 September 2022

Session

Flexible parametric survival models have been available in Stata since 2000 with Patrick Royston’s stpm command.

I developed stpm2 in 2008, which added various extensions. However, the command is old and does not take advantage of some of the features Stata has added over the years. I will introduce stpm3, which has been completely rewritten and adds a number of useful features, including
  • Full support for factor variables (including for time-dependent effects).
  • Use of extended functions within a varlist. Incorporate various functions (splines, fractional polynomial functions, etc.) directly within a varlist. These also work when including interactions and time-dependent effects.
  • Easier and more intuitive predictions. These fully synchronize with the extended functions making predictions for complex models with multiple interactions/nonlinear effects incredibly simple. Make predictions for specific covariate patterns and perform various types of contrasts.
  • Directly save predictions to one or more frames. This separates the data used to analyze the data for predictions.
  • Obtain various marginal estimates using standsurv. This synchronizes with stpm3 factor variables and extended functions, making marginal estimates much easier and less prone to user mistakes for complex models.
  • Model on the log(hazard) scale. Do all the above for standard survival models, competing-risks models, multistate models, and relative survival models all within the same framework.

Speaker

Paul Lambert