Example 1 Suppose we are interested in the estimated effect of smoking (x) on mortality due to lung cancer (y) within a ten-year follow-up period. The failure event is death due to lung cancer (0=No event, 1=Event). Smoking status is coded as 0=Never smoked and 1=Ever smoked. The HR for ever-smokers is 2.73. This result suggests that, compared to never-smokers (the reference category), ever-smokers have a 2.73 times higher risk of dying.
Example 2 We want to estimate the effect of sex (x) on all-cause mortality risk (y) among important characters during the first seven seasons of HBO’s popular television series, Game of Thrones. The failure event is death (0=No event, 1=Event). Sex is coded as 0=Male and 1=Female. The HR for females is 0.80, which indicates that, compared to males, important female characters have a 20% lower risk of dying during the first seven seasons.
Note This example is based on a published article. The curious reader can read more here: Lystad, R. P., & Brown, B. T. (2018). “Death is certain, the time is not”: mortality and survival in Game of Thrones. Injury Epidemiology, 5:44.
Practical example
Dataset
StataData1.dta
Variable name
cvd
Variable label
Out-patient care due to CVD (Ages 41-50, Year 2011-2020)
Value labels
0=No 1=Yes
Variable name
sex
Variable label
Sex
Value labels
0=Man 1=Woman
sum cvd sex if pop_cox==1
stcox sex if pop_cox==1, noshow
When we look at the results for sex, we see that the hazard ratio (HR) is 0.52. Thus, one unit increase in sex is associated with a lower hazard of out-patient care due to CVD. This means that women have a lower risk of experiencing the outcome compared to men.
The association is statistically significant, as reflected in the p-value (0.000) and the 95% confidence intervals (0.43-0.64).
Kaplan-Meier curves
It is possible to illustrate survival curves (or failure curves) separately for men and women, by means of the Kaplan-Meier estimator.
sts graph if pop_cox==1, survival ci noorigin ylabel(.90(0.01)1) xlabel(40(1)51) by(sex)
More information help sts graph
Although we already know this from the Cox regression analysis, it is possible to use a log-rank test to assess whether the differences between the curves of men and women are statistically significant. One can think of this as the censored data equivalent to a non-parametric ANOVA. This tests the hypothesis that there is no difference between the groups. If the test is statistically significant (p<0.05), we reject this hypothesis.
sts test sex if pop_cox==1, noshow
In this case, the p-value (Pr>chi2) is below 0.05 (0.000), suggesting that there is a statistically significant difference between men and women in the probability of out-patient care due to CVD.
More information help sts test
Summary Women have a lower risk of out-patient care due to CVD in ages 41-50, compared to men (HR=0.52; 95% CI=0.43-0.64).