stpm2

Age-standardised survival using standsurv

After fitting a flexible parametric model, we estimate internally age-standardised 5-year survival for males and females for each year of diagnosis.

Estimating a hazard ratio in the presence of effect modification

After fitting a flexible parametric model, we estimate and plot the hazard ratio for a covariate that is modified by another covariate.

Flexible parametric survival models in population-based cancer epidemiology

An introcuction to flexible parametric survival models and how I use them in my research

Predicting in a new data set with merlin

Illustrates how to fit a model using patient data and then predict in a second dataset specifically constructed to contain only the covariates for which we wish to predict. Age is modelled using a restricted cubic spline.

Out-of-sample predictions and model-based age-standardistion with stpm2

Creating a second dataset in which to make predictions and an approach to model-based direct age-standardisation.

Predicting in a new data set with stpm2

Illustrates how to fit a model using patient data and then predict in a second dataset specifically constructed to contain only the covariates for which we wish to predict. Age is modelled using a restricted cubic spline.

Mediation analysis with survival data

We will partition the total effect of sex into the natural indirect effect (mediated by stage) and the natural direct effect. We then illustrate how to estimate the proportion of the sex difference mediated by stage. Emphasis is on illustrating how these quantities can be estimated in Stata using the standsurv command; we won't discuss the neccessary assumptions and their appropriateness.

Competing risks: Estimating crude probabilities of death

An illustration of how to estimate cumulative incidence functions (CIFs) based on a fitted flexible parametric model

Comparing Cox and flexible parametric models

A Comparison of Cox and flexible parametric models with application to studying sex differences in survival of patients diagnosed with melanoma. Illustration of how to plot the time-varying hazard ratio from a flexible parametric model.

Standardised survival curves: sex differences in survival

In this tutorial, we examine sex difference in survival for patients diagnosed with melanoma and illustrate how to estimate the causal effect of sex on patient survival using regression standardisation (also known and G-Computation). We discuss various approaches to estimating adjusted survival curves and illustrate the meansurv and stpm2_standsurv post-estimation commands to stpm2 (for fitting flexible parametric models in Stata).