In observational studies with time-to-event outcomes, we expect that there will be confounding and would usually adjust for these confounders in a survival model. From such models, an adjusted hazard ratio comparing exposed and unexposed subjects is often reported. This is fine, but hazard ratios can be difficult to interpret and are not collapsible. There are further problems when trying to interpret hazard ratios as causal effects. Risks are much easier to interpret than rates, so quantifying the difference on the survival scale can be desirable. In Stata,
stcurve gives survival curves after fitting a model where certain covariates can be given specific values, but those not specified are given mean values. Thus, it gives a prediction for an individual who happens to have the mean values of each covariate and may not reflect the average in the population. An alternative is to use standardization to estimate marginal effects, where the regression model is used to predict the survival curve for unexposed and exposed subjects at all combinations of other covariates included in the model. These predictions are then averaged to give marginal effects. I will describe a command,
stpm2_standsurv, that obtains various standardized measures after fitting a flexible parametric survival model. The command can estimate standardized survival curves, the marginal hazard function, the standardized restricted mean survival time, and centiles of the standardized survival curve. Contrasts can be made between any of these measures (differences, ratios). A user-defined function can be given for more complex contrasts.