Descriptive analysis

Step 7: Descriptive statistics for time-to-event data

Before you move on to Cox regression analysis, it is a good idea to explore the time-to-event data properly first.

Produce a simple description of how data is arranged according to stset using the stdescribe command.

stdescribe

From the output you can see that the entry time for all children was 1.5 years. This was decided due to the fact that we did not know the children’s birth dates. Therefore, the min, max, and median values are all the same. However, the exit values range from min 1.51 years, while both the max and median are 17.51 years. The max value is the age at the end of the study. The fact that the median and max values are the same, can be explained by the small number of people who have experienced the event. The total time at risk is 130,607 person-years. 7% of the population had experienced the event (598 “failures” divided by 8453 “number of subjects”).

Step 8: Kaplan-Meier curves

As you have read previously, a Kaplan-Meier curve is a descriptive (non-parametric) method that visualizes the survival function (or hazard function). The next step is to produce Kaplan-Meier curves with survival and failure functions.

sts graph, survival ci noorigin

As you can see, the scale is a bit too wide, which makes it difficult to see the line properly. This can be fixed by specifying the y-axis (with the ylabel option). While we are at it, we can adjust the x-axis (with the xlabel option) as well.

sts graph, survival ci noorigin ylabel(0.9(0.01)1) xlabel(1(1)17)

sts graph, failure ci noorigin ylabel(0(0.01)0.1) xlabel(1(1)17)

The likelihood of not having contact with BUP decreases with age. Most individuals have not had any contact with BUP, and the survival curve shows that likelihood of not seeking BUP care at 17,5 years is approximately 93%. Consequently, the likelihood of seeking BUP care is 7%.

Step 9: Nelson-Aalen cumulative hazard function

An alternative to the Kaplan-Meier curves is to graph the Nelson-Aalen estimate of cumulative hazard function.

  • Produce a graph with the Nelson-Aalen cumulative hazard function. Adjust the graph to make it more readable.
sts graph, cumhaz ci noorigin

sts graph, cumhaz ci noorigin ylabel(0(0.01)0.08) xlabel(1(1)17)

The likelihood of seeking BUP care for the entire study period is approximately 7,5% at 17 years.