Stata

stnet: estimating net survival using a life-table approach

Description of -stns-, a Stata command that implements the Pohar Perme estimator for discrete survival time data (e.g., life tables).

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.

Comparison of Pohar-Perme marginal relative survival between strs, stnet, stpp, and stns

This page shows code for calculating the Pohar-Perme non-parametric estimate of marginal relative survival using the following four user-written Stata commands. stnet strs stpp stns Code comparing the estimates from strs, stns, stpp, and stns is available for two data sets:

stcompadj: Estimating conditional cause-specific cumulative incidence functions in the presence of competing risks

Illustration of stcompadj using the example from the help file

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.

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.

Illustration of the Brenner approach to age-standardised net survival (Pohar Perme estimator)

The code used in this tutorial, along with links to the data, is available here. This code illustrates how to apply the “Brenner alternative approach” to age-standardise net survival using external (ICSS) weights.

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.