Simple Analyses for Survival Data

Life Table Analysis

The life table command provides some ways to get a quick glance at survival (or failure time, or time-to-event) data. In contrast to more elaborate procedures you do not have to "stset" your data. Actually, the command offers very rich possibilities which are not (yet?) described here.

Life table analysis is simple and easy for another reason. For most procedures to deal with time-to-event data, you first have to stset your data (i.e. you have to provide elementary information about time-to-event, failure and perhaps other stuff). Life table analysis is the only exception to this, as far as I can see. That is, you can start right away.

ltable duration event

will produce a single life table for your data. Obviously, the duration variable in this example is "duration" and the variable indicating an "event" ("death", "failure") is called event. Of course the choice of variable names is yours. There is no choice, however, concerning the values of the "event" variable: a value of 0 indicates censored cases, any other value indicates an event, with the exception of missing values (cases with missing values in "duration" or "event" are ignored in the analysis).

ltable duration event, graph by(group)

will display a life table and a plot of the survivor function for each group defined by "group" (again, the grouping variable may have any name you like). Note that by default the graph for each group will be displayed in a separate panel. Adding option overlay will place all survivor curves side by side in a single panel. Note also that the graph option may not be used with option "hazard" (see below).

Some further options:

failure will display cumulative failure (instead of cumulative survival, unless survival is specified as well)
hazard will display the hazard rate (
interval(6) will use an interval width of 6 (default: 1)
interval(0(6)240) will restrict display to failure times up to 240, with an interval width of 6
interval(0,30,60,120,240) will divide up time into intervals 0 to <30, 30 to < 60 and so on, including an interval 240 and higher if necessary.
ci will graph confidence intervals for S(t)
notable will suppress output of the table

© W. Ludwig-Mayerhofer, Stata Guide | Last update: 29 May 2012