Time-to-Event
Data
Fundamental Epidemiological Concepts and Approaches
Learning objectives for this lesson:
- Describe time-to-event data as a time and a status for each participant, specify time zero, the event and the end of follow-up for a study, and identify immortal time bias and lead-time bias as errors in the choice of time zero.
- Distinguish right, left and interval censoring from late entry, and explain the difference between informative and non-informative censoring.
- Explain why treating censored participants as event-free, or dropping them from the analysis, misstates the risk of the event.
- Calculate an actuarial life table by hand and describe the assumptions of the actuarial method.
- Calculate a Kaplan-Meier estimate by hand and interpret a Kaplan-Meier curve: survival at a chosen time, the median survival time, censoring marks and the numbers at risk.
- Interpret the log-rank test as a comparison of observed and expected events and the hazard ratio as a ratio of event rates among those still at risk, explain proportional hazards in plain language, and explain why a hazard ratio differs from a risk ratio.
- Plan the time-to-event subsection of a study protocol, including time zero, censoring rules, the analysis plan and the number of events needed.
Expected completion time: about two and a half hours. This lesson follows Lesson 7: Designing Against Bias and is the last lesson of HSCI 341.
This course was developed by Dr. Kiffer G. Card, Faculty of Health Sciences, Simon Fraser University based on Dohoo, I. R., Martin, S. W., & Stryhn, H. (2012). Methods in Epidemiologic Research. VER Inc.
Glossary: Key Terms, People & Concepts
📚 Reference page, available throughout the lesson
This glossary collects the key concepts, methods and people you will meet in this lesson. Use it as a reference while you work through the material, or as a review before assessments. Type in the search box to filter entries.
Time-to-Event Questions and Study Design
⏱ Estimated reading time: 35 minutes
Overview
Many questions in public health research concern when an event happens as well as whether it happens, and the methods for answering them are known as survival analysis. This lesson is conceptual and is written for people who design studies. This first section explains what a time-to-event outcome records for each participant, the three design decisions that give it meaning (time zero, the event and the end of follow-up), and two biases that follow from a poor choice of time zero. It then describes the forms of incomplete follow-up called censoring, the assumption that censoring is non-informative, and the reasons why ordinary summaries misstate the risk when follow-up is incomplete. Section 2 then computes an actuarial life table by hand, Section 3 computes and reads a Kaplan-Meier estimate, and Section 4 compares groups, explains the hazard ratio and the proportional hazards idea, and lists what a protocol with a time-to-event outcome must specify.
Learning Objectives for this section
- 1.1 Explain what makes an outcome time-to-event data and why both a time and an event status are recorded for each participant.
- 1.2 Specify time zero, the event and the end of follow-up for a study, and convert follow-up records into a time and a status for each participant.
- 1.3 Identify immortal time bias and lead-time bias as consequences of the choice of time zero.
- 2.1 Distinguish right, left and interval censoring from late entry, and identify the sources of right censoring in a study description.
- 2.2 Explain the difference between informative and non-informative censoring and describe design steps that make informative censoring less likely and easier to detect.
- 3.1 Explain why treating censored participants as event-free, or dropping them from the analysis, misstates the risk of the event.
1.1 Time and Event Status
A trial of a smoking cessation program asks how long participants remain abstinent, a cohort study of young adults asks how long people who start without depressive symptoms remain free of them, and a tuberculosis program asks how long after diagnosis people complete treatment. In each case the outcome for every participant is a length of time from a defined starting point to a defined event. Data of this kind are called time-to-event data, and the methods for analyzing them are called survival analysis. The name reflects the origin of these methods in studies of mortality, although the event can be any well-defined change of state.
A time-to-event outcome has two parts for each participant. The first is a length of time, measured from a starting point that is defined in the same way for everyone. The second is a status that records how that time ended: either the event was observed, or observation stopped before any event was seen. Analysts usually code the status as 1 for an observed event and 0 for a participant whose observation stopped without the event, who is described as censored. Neither part is sufficient alone. Two participants who were each followed for eight months carry very different information if one had the event in month eight and the other moved away in month eight without having it.
Two features distinguish these data from other continuous outcomes, such as blood pressure or body weight. The first is their shape. Follow-up times cannot be negative, and they are usually right-skewed, by which we mean that most values cluster at the shorter end while a long tail stretches out to the right, because a few participants remain event-free for a long time. The second feature is more fundamental, and it is the reason a separate set of methods is needed. For a censored participant, the event time is not measured at all; it is known only to exceed the time at which observation stopped. For example, a participant who was followed for eight months without the event and then moved away tells the investigator that their event time is longer than eight months, and nothing more. It might have been nine months, or twenty, or the event might never have happened. This is partial information, but it is still information, because it shows that the participant got through eight months without the event. Survival methods are designed to use exactly this partial information. Methods that ignore it, or that treat the censoring time of eight months as if it were an event time, give biased answers, as subsection 3.1 shows.
The need for both parts explains how time-to-event analysis extends Lesson 4. That lesson defined incidence risk as the proportion of an at-risk group that develops an outcome over a defined period, and incidence rate as new cases divided by person-time. Both measures make assumptions about follow-up. The risk requires that everyone is followed for the whole period, and the rate treats a person-month early in follow-up as equivalent to a person-month late in follow-up. Real cohorts rarely meet the first condition, because some participants leave before the period ends, and the second is often implausible. The methods in this lesson estimate the probability of remaining event-free over time while using all of the follow-up that each participant provides. Lesson 6 compared groups with the incidence rate ratio, and Section 4 of this lesson presents the hazard ratio as the time-to-event counterpart of that measure.
The question being asked also matters. A question about the risk of the event by a fixed time (what proportion of participants screen positive for depressive symptoms within 24 months) can be answered with the methods of this lesson even when follow-up is incomplete. A question about timing (how quickly positive screens accumulate, and whether they accumulate faster in one group) can only be answered with them, because it concerns the whole course of follow-up.
Both kinds of question run through the hypothetical study that serves as the running case for this lesson. It extends the Campus Connection Study from Lesson 7 into a follow-up of young adults who screen negative for depressive symptoms at baseline, and its event is a first positive screen.
The Campus Connection Study, the running example of HSCI 341 Lesson 7, is a cross-sectional survey of adults aged 18 to 29 in British Columbia on loneliness and depressive symptoms. This lesson imagines a follow-up extension of that study, and all of its numbers are hypothetical teaching data. Participants whose baseline score on the Patient Health Questionnaire-9 (PHQ-9) is below 10, the threshold commonly used for at least moderate depressive symptoms (Kroenke et al., 2001), are invited to complete a brief online PHQ-9 each month for up to 24 months. The event is the first monthly score of 10 or more, dated to the month in which it occurred. The exposure is high versus low loneliness at baseline. Six hundred participants enrol: 200 report high loneliness and 400 report low loneliness.
The running case fixes the setting, and subsection 1.2 turns to the three design decisions that define its time-to-event outcome.
1.2 Time Zero, the Event and the End of Follow-Up
Before any data are collected, a time-to-event protocol must define when the clock starts, what stops it, and how observation ends for participants who do not have the event. These three decisions determine what the time and status variables mean, and errors in any of them cannot be repaired at the analysis stage. They belong in the methods of a study protocol, the written plan for a study as HSCI 207 Lesson 6 Section 3.1 defines it, and in a funding proposal they are summarized in the analysis plan.
1.2.1 Time Zero
Time zero is the moment at which the clock starts for each participant. The choice is guided by the target trial, a thought experiment from HSCI 230 Lesson 3 that the recall box below summarizes. Read it and try its retrieval question before you expand the answer, because the moment it asks about is the model for a good time zero.
Recall: The Target Trial
HSCI 230 Lesson 3, Section 1 (A Unified Approach to Study Design), described the thought experiment that Hernán (2005) recommended: specify an observational study as if it were a randomized trial, naming the study group and its selection, the assignment to exposure, the procedures for follow-up and the detection of the outcome. Later work by Hernán and colleagues calls this hypothetical trial the target trial, and its protocol is the template for the observational study. In a trial, eligibility is confirmed, the treatment is assigned and follow-up begins at the same moment, so no participant contributes follow-up before being eligible or before the exposure group is known. An observational study that starts the clock at a moment with the same alignment avoids the time-related biases described in subsection 1.3.
Retrieval question. In a randomized trial, which event marks the moment at which eligibility, assignment and the start of follow-up coincide?
Randomization. Eligibility is confirmed just before it, the treatment group is determined by it, and follow-up for the outcome starts from it, so it serves as time zero.
Common choices of time zero are the date of enrolment, the date of randomization in a trial, the date of diagnosis in a clinical cohort, and the date of a first prescription in a study of a medication. A good choice satisfies three conditions at the same moment: the participant meets the eligibility criteria, the participant's exposure group is determined, and follow-up for the event begins. Hernán et al. (2016) describe this alignment as part of specifying the target trial that an observational study tries to emulate, and they show that several avoidable biases arise when the three conditions are met at different times. In the Campus Connection Follow-up, time zero is the date on which the participant completes the baseline survey, because that is when eligibility (a PHQ-9 score below 10) is confirmed, when loneliness is measured, and when monthly follow-up begins.
Enrolment is usually spread over weeks or months, so time zero falls on different calendar dates for different participants. For example, one participant might complete the baseline survey in September and another in January. If time were measured by the calendar, these two people would start follow-up at different points, and comparing them in the same month of the calendar would compare someone in their first month of follow-up with someone in their fifth. Survival analysis therefore measures time on a study time scale, defined as the time since each person's own time zero. By this we mean that every participant's clock is reset so that they all start at zero, and "month 5" refers to the fifth month after each person's own baseline survey, whatever calendar month that happened to be. Some cohort studies of chronic disease use age as the time scale instead, because age is such a strong determinant of risk that it makes sense to compare each participant with others of the same age rather than with others at the same point in follow-up. Figure 8.1, in subsection 1.2.3, shows ten participants of the Campus Connection Follow-up on the study time scale.
1.2.2 The Event
The event must be defined precisely enough that two investigators reviewing the same record would agree on whether and when it occurred. The definition states the criterion (a PHQ-9 score of 10 or more), the method of ascertainment (the monthly online questionnaire) and the dating rule (the event is assigned to the month of the first qualifying score). The ascertainment schedule should be the same in every exposure group. If participants with high loneliness were contacted more often than others, their events would be detected sooner, and the comparison between groups would reflect the schedule as well as any effect of loneliness. Most analyses use the first occurrence of the event, so a participant leaves the group at risk once the event has happened. A composite event, such as hospitalization or death, counts whichever component occurs first, and each component needs its own definition.
1.2.3 The End of Follow-Up
Each participant's follow-up ends at the earliest of three dates: the date of the event, the last date on which the participant was known to be event-free before leaving the study, and the administrative end of the study. The time variable is the interval from time zero to that date, and the status variable records whether the event ended it. Table 8.1 applies these rules to the follow-up records of ten participants from the high-loneliness group, converting each record into a time and a status. Sections 2 to 4 use these ten participants, together with ten from the low-loneliness group, whenever a short dataset keeps the arithmetic manageable.
Table 8.1. Follow-up records of ten high-loneliness participants in the hypothetical Campus Connection Follow-up, reduced to a time and a status.
| Participant | What happened | Time (months) | Status |
|---|---|---|---|
| 1 | Screened positive in month 2 | 2 | 1 (event) |
| 2 | Withdrew consent after the month 3 questionnaire | 3 | 0 (censored) |
| 3 | Screened positive in month 5 | 5 | 1 (event) |
| 4 | Screened positive in month 5 | 5 | 1 (event) |
| 5 | Stopped responding after the month 8 questionnaire | 8 | 0 (censored) |
| 6 | Screened positive in month 10 | 10 | 1 (event) |
| 7 | Moved overseas after the month 12 questionnaire | 12 | 0 (censored) |
| 8 | Screened positive in month 15 | 15 | 1 (event) |
| 9 | Completed 24 months without a positive screen | 24 | 0 (censored) |
| 10 | Completed 24 months without a positive screen | 24 | 0 (censored) |
Figure 8.1 draws the same ten records on the study time scale. Each line starts at the participant's own time zero, and the symbol at its end shows whether an event or censoring ended follow-up.
The protocol should also state what counts as loss to follow-up, because participants in an online cohort rarely announce that they are leaving. A common rule is that a participant who misses a stated number of consecutive questionnaires, for example three, is censored at the date of the last completed questionnaire. Writing the rule in advance prevents the analyst from choosing censoring dates after seeing the data, and it makes the rule the same for every exposure group.
Of the three decisions, the choice of time zero has consequences beyond the definition of the time variable, because a poorly chosen starting point biases an analysis however carefully the rest of it is done. Subsection 1.3 describes the two best-known examples.
1.3 Biases That Start at Time Zero
Two biases follow directly from the choice of time zero. HSCI 230 Lesson 10, Design-Specific and Temporal Biases, teaches both in detail, and they are summarized here because each is prevented by a decision written into the protocol. Immortal time bias arises when membership of the exposed group depends on something that happens after time zero, so that event-free time spent waiting to become exposed is credited to the exposure. Lead-time bias arises when time zero is the date of diagnosis and one group is diagnosed earlier, so that survival measured from diagnosis looks longer even if the event itself is not delayed. Expand each panel below to see how each bias would arise in practice, the protocol step that prevents it, and the feature that the two biases share.
Immortal time bias arises when membership of the exposed group depends on something that happens after time zero. Suppose the Campus Connection team classified participants as users of a campus peer-support program if they joined it before any positive screen, and started everyone's clock at the baseline survey. A participant who joined in month 9 must have remained event-free for months 0 to 8 in order to be classified as a user, because anyone who screened positive in those months would have been classified as a non-user instead. Those months are called immortal with respect to the event, by which we mean that the event could not have happened during them for anyone who ended up in the user group; the classification rule guarantees it. Counting them as exposed person-time therefore gives the user group months of event-free follow-up that it earned simply by waiting, while participants who had the event early are pushed into the non-user group. The result is that the program looks protective even if it has no effect at all (Suissa, 2008). The protocol prevents the bias by defining exposure at time zero, or by treating program use as a time-varying exposure so that each participant's months before joining are counted as unexposed time.
Lead-time bias arises when time zero is the date of diagnosis and one group's condition is detected earlier, for example by screening. The lead time is the extra period between detection by screening and the date on which the condition would otherwise have been diagnosed from symptoms. Survival measured from diagnosis is then longer in the screened group even if screening does not delay death at all, because the clock started earlier. For example, suppose a person would develop symptoms and be diagnosed at age 62 and would die at age 67, five years after diagnosis. If screening detects the same disease at age 60 and the person still dies at age 67, survival from diagnosis is now seven years. The two extra years reflect only the earlier start of the clock, not a longer life. The protocol prevents the bias by measuring time from a starting point that does not depend on when the condition was detected, such as the date of randomization to screening or no screening, or by comparing mortality in the whole screened and unscreened populations.
In both biases the clock starts at a moment when eligibility, exposure assignment and the start of follow-up do not coincide. Checking that the three conditions are met at the same moment for every participant, as Hernán et al. (2016) recommend, is the single most useful check on a time-to-event protocol.
Both biases are prevented by the same check on the protocol: eligibility, exposure assignment and the start of follow-up must coincide at time zero for every participant. Once time zero, the event and the rules for ending follow-up are fixed, each record in Table 8.1 reduces to a time and a status. Five of those participants, numbers 2, 5, 7, 9 and 10, have a status of 0, and subsection 2.1 describes the forms that this incomplete information can take.
2.1 Types of Censoring
Censoring occurs when a participant's event time is only partly known. The form that standard survival methods handle is right censoring, in which the event, if it occurs at all, would occur after the participant's last observation. Two other forms, left and interval censoring, and a related situation called late entry arise less often but need to be recognized, because the methods of this lesson do not handle them in the same way.
2.1.1 Sources of Right Censoring
Right censoring has several sources, and a protocol should anticipate each of them: loss to follow-up, withdrawal of consent, administrative censoring at the planned end of the study, leaving the study population, and competing events. Four of these appear among the censored participants in Table 8.1. Click each card to see how the source arises in the Campus Connection Follow-up, which participant illustrates it, and which source is most likely to be related to a participant's health.
The cards show that every source except a competing event simply stops observation while leaving the event possible later. A competing event differs, because it makes the event of interest impossible, and subsection 2.2 returns to it.
2.1.2 Left Censoring, Interval Censoring and Late Entry
Two other forms of censoring arise less often in prospective cohorts. Left censoring occurs when the event happened before observation began at an unknown time. In a study of the age at which adolescents first use cannabis, a participant who reports at the first interview that they have already used it is left-censored, because the event is known only to have occurred before that interview. The Campus Connection Follow-up avoids left censoring by excluding participants who screen positive at baseline. Interval censoring occurs when the event is known only to have occurred between two observation times. Every event in the Campus Connection Follow-up is interval-censored within a month, because a score of 10 or more in month 5 means that symptoms reached the threshold at some point after the month 4 questionnaire. Treating the month of detection as the event time is acceptable when the gap between assessments is short relative to the length of follow-up. When assessments are a year apart, methods designed for interval-censored data are needed.
Late entry, also called left truncation, differs from censoring. Censoring concerns a participant who is in the study but whose event time is only partly known; late entry concerns who gets into the study in the first place. It arises when participants join the group at risk some time after their time zero, for example when time zero is the date of diagnosis but people are recruited from a clinic months or years later. Because recruitment happens late, anyone who had the event before they could be recruited is never seen, and the people who are recruited are, by definition, those who survived event-free long enough to be found. This changes how their early time can be used. A late entrant is counted as at risk only from the date of entry, because before that date the study could not have observed an event for them. An analysis that instead counts the earlier time as observed time overstates early survival, because it credits the cohort with event-free months during which the people who had the event were never included. Figure 8.2 places the four situations on one time axis, and a useful way to classify any participant is to ask which part of the time axis is unknown.
Right censoring, the first situation in Figure 8.2, is the form of incomplete information that every method in the rest of the lesson handles. Those methods also make an assumption about why right-censored participants leave the study, and subsection 2.2 examines that assumption.
2.2 Informative and Non-Informative Censoring
Every method in this lesson rests on the assumption that censoring is non-informative. The assumption states that, at any time during follow-up, participants who are censored have the same future risk of the event as participants in the same group who remain under observation. By this we mean that the fact that someone left the study tells us nothing about whether they were about to have the event; leaving is unrelated to prognosis. The risk set, a term used throughout this lesson, is the group of participants who are still under observation and event-free at a given time, and so are still able to have an observed event. When censoring is non-informative, it removes people from the risk set without changing the average risk of the people who remain. The remaining participants are then a fair stand-in for those who left, and the estimate computed from them applies to the whole group. For example, if a participant leaves because their family moves to another province for work, there is no particular reason to think their mood was about to worsen, and the participants who stay can represent them.
Administrative censoring usually satisfies the assumption, because the closing date of a study has nothing to do with any participant's health. Loss to follow-up and withdrawal may not. In the Campus Connection Follow-up, a participant whose mood is worsening may stop answering monthly questionnaires before their score reaches 10. If participants like this are censored, the people who remain in the risk set are healthier than the group as a whole, fewer events are observed than actually occur, and the estimated probability of remaining event-free is too high. Censoring that depends on the participant's prognosis in this way is called informative censoring. If it is more common in one exposure group than in the other, it also biases the comparison between groups.
The assumption cannot be tested from the observed data, because the event times of censored participants are unknown. Design decisions make the assumption more plausible and its failure easier to assess. A protocol can include retention procedures that keep losses small (reminders by more than one channel, short questionnaires and modest incentives for completion), a record of the reason for every withdrawal, a plan to compare the baseline characteristics of participants who were censored early with those who were not, and a sensitivity analysis that recomputes the estimates under extreme assumptions, such as the assumption that every participant who was lost to follow-up had the event at the time of censoring. If the conclusions hold under those assumptions, informative censoring is an unlikely explanation for them.
Competing events, introduced in subsection 2.1.1, break the assumption in a particular way, because the methods in this lesson treat them as censoring even though a person who has had one can no longer have the event of interest. The callout below states the consequence, which is easy to overlook.
Competing events are not ordinary censoring
A competing event is an event that prevents the event of interest from occurring. In a study of time to a first diagnosis of dementia among older adults, death from another cause is a competing event. The methods in this lesson treat a competing event as censoring, which assumes that the person could still have the event of interest later. Because that assumption is false for a person who has died, one minus the Kaplan-Meier estimate overstates the proportion of people who actually develop the event of interest, and the overstatement grows as competing events become more common. Methods that estimate the cumulative incidence in the presence of competing risks are described by Austin et al. (2016). Death is rare among adults aged 18 to 29, so it has little effect in the Campus Connection Follow-up, but the protocol should still name any competing events and state how they will be handled.
Non-informative censoring is an assumption that design can make more plausible and that the observed data cannot test. Subsection 3.1 shows what happens when the ten participants in Table 8.1 are summarized with ordinary methods that ignore censoring altogether.
3.1 Why Ordinary Summaries Misstate the Risk
When some participants leave before the end of follow-up, two shortcuts are commonly used to estimate the risk of the event by a fixed time, and both give the wrong answer. The first treats every censored participant as event-free and divides the number of events (E) by the number enrolled (N). It understates the risk, because it assumes that none of the censored participants would have had the event after they left. The second drops the participants censored before the end of follow-up (C) and divides the events by the participants who remain, N − C. It tends to overstate the risk, because the people removed are those known to have been event-free for part of the period, while every participant who had an event is kept. The data themselves set limits on the true risk. It cannot be lower than the first shortcut, and it cannot be higher than (E + C) / N, the value obtained if every early-censored participant had the event immediately after leaving. Equation 8.1 sets out the two shortcuts and these limits.
The ten participants in Table 8.1 show how far apart the shortcuts can be. For the question of what proportion screen positive within 24 months, five participants had the event (E = 5), three were censored before 24 months (C = 3), and two completed follow-up without the event. The first shortcut gives 5 ÷ 10 = 0.50, which assumes that participants 2, 5 and 7 did not screen positive after they left the study. The second gives 5 ÷ 7 = 0.71, which discards the event-free months of those three participants while keeping all five events. The data themselves only rule out values below 0.50 and above (5 + 3) ÷ 10 = 0.80. Section 3 shows that the Kaplan-Meier estimate of the 24-month risk for these ten participants is 0.64. It lies within those limits, and it uses the event-free months of each censored participant without inventing events for them.
Calculator 8.1 computes the two shortcuts and the upper limit from the number enrolled, the number with an observed event and the number censored before the end of follow-up, and its presets load the ten participants in Table 8.1 and the 200 high-loneliness participants.
Averaging the observed times is also misleading. The mean of the ten follow-up times in Table 8.1 is 10.8 months, but it mixes event times with censoring times, which measure different things. An event time records when the event happened, whereas a censoring time records only when observation stopped. Three of the censoring times are shorter than the event times they would eventually have become, if those participants ever had the event, so including them as if they were complete pulls the average down. The incidence rate from Lesson 4 does use all of the follow-up correctly, because it adds up the time each participant actually spent under observation, whether that time ended in an event or in censoring. The ten participants contributed 2 + 3 + 5 + 5 + 8 + 10 + 12 + 15 + 24 + 24 = 108 person-months and had 5 events, a rate of 5 ÷ 108 = 0.046 per person-month, or 4.6 per 100 person-months. The rate summarizes the whole period in one number, however, and in doing so it assumes that the event rate stayed the same throughout. By this we mean that a person-month in month 1 is treated as carrying the same chance of an event as a person-month in month 20. It therefore cannot show whether positive screens clustered in the first months of follow-up or spread evenly across it. The life table in Section 2 and the Kaplan-Meier estimator in Section 3 describe how the probability of remaining event-free changes over time, and Section 4 returns to the rate as the basis of the hazard ratio.
This section has defined a time-to-event outcome through time zero, the event and the end of follow-up, traced immortal time bias and lead-time bias to the choice of time zero, described the forms of censoring and the non-informative censoring assumption, and shown why ordinary summaries misstate the risk when follow-up is incomplete. The exercise below applies these decisions to a study of readmission after a first heart attack, and the key takeaways and knowledge check that follow review the section. Section 2 then builds the actuarial life table, which uses the follow-up of every participant to describe how the probability of remaining event-free changes over time.
A health authority plans to follow adults discharged from hospital after a first heart attack to study time to readmission for any cardiac cause. Enrolment runs for one year and follow-up ends on a fixed date one year after the last enrolment. Readmissions are identified from provincial hospital records. Write down the time zero, the event, the sources of right censoring you would expect, and one source of censoring that could be informative.
One possible answer. Time zero is the date of discharge from the first heart attack admission, when eligibility and follow-up begin together. The event is the first readmission with a cardiac diagnosis, dated to the admission date. Right censoring arises from the administrative end of follow-up (with longer potential follow-up for early enrolees), from moving out of the province, and from death from a non-cardiac cause, which is better treated as a competing event. Moving out of the province to live with family because of declining health could be informative, since those people may have a higher risk of readmission.
Key Takeaways
- 1.1 A time-to-event outcome records two things for every participant: how long they were followed from a starting point defined in the same way for everyone, and whether that follow-up ended with the event (status 1) or without it (status 0, censored). You need both, because the same time can carry very different information. A participant who screened positive in month 8 and one who moved away in month 8 both have a time of 8, but for the second person we know only that their event time, if it ever comes, is longer than 8 months. When you work through an example, always read the status column before you use a time, and never treat a censoring time as if it were an event time. Averaging the follow-up times is misleading for the same reason: the mean of 10.8 months for Table 8.1 mixes event times with censoring times.
- 1.2 Three design decisions give the time and the status their meaning, and they belong in the protocol before any data are collected. Time zero is when the clock starts; the event is defined by its criterion, its method of ascertainment and its dating rule, applied in the same way in every group; and follow-up ends at the earliest of the event, the last date the participant was known to be event-free, or the administrative end of the study. To turn a follow-up record into a time and a status, ask two questions: on what date did follow-up end, and was it the event that ended it? In Table 8.1, participant 2, who withdrew after the month 3 questionnaire, has a time of 3 and a status of 0, while participant 3, who screened positive in month 5, has a time of 5 and a status of 1. A common slip is to code a withdrawal or a move as an event; only the event itself earns a status of 1, and participants who finish the study event-free, such as participants 9 and 10, are censored at 24 months with a status of 0.
- 1.3 Two well-known biases come straight from a poorly chosen time zero, and both can be prevented at the design stage. Immortal time bias arises when membership of the exposed group depends on something that happens after time zero: a participant who joined a peer-support program in month 9 had to stay event-free through months 0 to 8 to be classified as a user, so crediting those months to the exposure makes the program look protective even if it has no effect. Lead-time bias arises when time zero is the date of diagnosis and one group is diagnosed earlier, for example by screening, so survival measured from diagnosis looks longer even though the event itself is not delayed. The single most useful check on a time-to-event design is to ask whether eligibility, exposure assignment and the start of follow-up happen at the same moment for every participant. If they do not, name the bias and propose the fix: define exposure at time zero (or treat it as time-varying, so the months before joining count as unexposed), or start the clock at a point that does not depend on when the condition was detected, such as randomization to screening or no screening.
- 2.1 Censoring means that a participant's event time is only partly known, and the type of censoring depends on which part is missing. Right censoring, the kind every method in this lesson handles, means that the event, if it happens, comes after the last observation; it arises from loss to follow-up, withdrawal of consent, moving out of the study population and the administrative end of the study. Left censoring means that the event had already happened at an unknown time before observation began, and interval censoring means that the event is known only to fall between two assessments (every event in the Campus Connection Follow-up is interval-censored within a month). Late entry is not censoring at all but a delayed start: the participant joins the group at risk some time after their time zero and is counted as at risk only from the date of entry. When a question describes a participant, place them on a time axis as in Figure 8.2 and ask what is unknown: the time after the last contact (right), the time before the first contact (left), the time between two contacts (interval), or the follow-up between time zero and recruitment (late entry).
- 2.2 Every method in this lesson assumes that censoring is non-informative, which means that people who are censored have the same future risk of the event as people in the same group who stay under observation. Censoring becomes informative when the reason for leaving is linked to prognosis, for example when participants whose mood is worsening stop answering the monthly questionnaires before their score reaches 10. The people left in the risk set are then healthier than the group as a whole, too few events are observed, and the estimated probability of remaining event-free is too high. Administrative censoring at the planned end of a study is usually non-informative, so when you assess a scenario, look first at loss to follow-up, withdrawal and moving away, and ask whether the reason could be related to the outcome and whether it is more common in one group. Because the assumption cannot be tested from the observed data, the useful response is a design step: retention procedures that keep losses small, a recorded reason for every withdrawal, a comparison of the baseline characteristics of those censored early with those who were not, and a worst-case sensitivity analysis that treats each loss as an event at the time of censoring.
- 3.1 When some participants leave early, the two obvious shortcuts both give the wrong answer, and they go wrong in predictable directions. Treating every censored participant as event-free (E / N) assumes that none of them would ever have had the event, so it understates the risk; dropping them from the denominator (E / (N − C)) discards their event-free months while keeping every event, so it tends to overstate the risk. For the ten participants in Table 8.1 the shortcuts give 5 / 10 = 0.50 and 5 / 7 = 0.71, and the data only allow the true 24-month risk to lie between 0.50 and (5 + 3) / 10 = 0.80, the value obtained if every early-censored participant had the event straight after leaving. The Kaplan-Meier estimate of 0.64 falls inside these limits because it uses each censored participant's follow-up up to the point at which they left. When you are asked to critique a reported risk, identify which shortcut was used, state the direction of its bias, and use Equation 8.1 to show the range the data actually support.
1. A cohort study follows older adults for up to 24 months for time to a first fall. Participants J and K both have a follow-up time of 10 months: J had a fall in month 10, and K moved to another city in month 10 without having fallen. A colleague proposes to summarize the data as the mean follow-up time and to leave out how each participant's follow-up ended. Which statement is correct?
2. A cohort study follows new mothers for time to stopping breastfeeding. Time zero is the date of birth, the event is the first monthly call at which the mother reports that she has stopped, and follow-up ends at the earliest of the event, the last call at which she was still breastfeeding, or month 12. An analyst codes four mothers as shown. Which mother is coded incorrectly?
| Mother and what happened | Time (months) | Status |
|---|---|---|
| A: reported at the month 4 call that she had stopped | 4 | 1 |
| B: still breastfeeding at the month 12 call | 12 | 0 |
| C: still breastfeeding at the month 7 call, then could not be reached | 7 | 0 |
| D: still breastfeeding at the month 5 call, then withdrew from the study | 5 | 1 |
3. A study of time from a diagnosis of type 2 diabetes to a first foot ulcer uses the date of diagnosis as time zero and reviews participants at annual clinic visits. Which participant is an example of late entry rather than censoring?
4. A study follows children with asthma for time to a first emergency department visit, using the records of the city's children's hospital. Families of children with the most severe asthma are more likely than other families to move to another city to be near a specialist clinic, and children who move are censored on the date they move. Which statement is correct?
5. In a pilot cohort of 20 participants followed for 24 months, 6 had the event, 5 were censored before 24 months and 9 completed follow-up event-free. A colleague drops the 5 censored participants and reports a 24-month risk of 6/15 = 0.40. Which response is correct?
6. A cohort study of adults discharged after a first heart attack classifies them as attenders of cardiac rehabilitation if they attended at least one session in the six months after discharge, and starts every participant's clock at discharge. Attenders had a much lower death rate over the first year. Which explanation and remedy fit best?
7. A school dental program applies sealants to the first molars of grade 2 children and invites each child to a check-up every six months for 24 months, to study the time to a first cavity in a sealed molar. Child A was cavity-free at the 6-month check-up and had a cavity found at the 12-month check-up. Child B was cavity-free at the 6-month and 12-month check-ups and attended none after that. How should the two records be coded?
8. In the same dental program, 4 of 30 children stopped attending check-ups and 2 moved away. A colleague says, "Children who stop coming to check-ups are simply lost, so the censoring is non-informative." Which response is best?
✦ Pass the knowledge check with 100% to continue
The Actuarial Life Table
⏱ Estimated reading time: 30 minutes
Overview
Section 1 showed that the shortcuts of treating censored participants as event-free, or dropping them, misstate the risk when follow-up is incomplete. This section introduces the oldest method that avoids both errors, the actuarial life table, which breaks follow-up into intervals and multiplies the probabilities of getting through each one. It explains why survival over several intervals is a product of conditional probabilities, defines the columns of the table, and builds a table by hand, first for a small cohort and then for the running case. It then examines the rule that counts each withdrawal as half a person, sets out the assumptions of the method and the choice of interval width, and shows how letting each interval end at an event time leads to the Kaplan-Meier estimator of Section 3.
Learning Objectives for this section
- 4.1 Explain why cumulative survival is the product of conditional probabilities of surviving each interval.
- 4.2 Define the columns of an actuarial life table: the number entering, the withdrawals, the events, the effective number at risk, the conditional probabilities of the event and of survival, and the cumulative survival.
- 4.3 Calculate an actuarial life table by hand from counts of events and withdrawals in each interval.
- 4.4 Explain the half-interval assumption for withdrawals and show how the estimate changes if withdrawals are counted as fully at risk or not at risk.
- 4.5 Describe the assumptions of the actuarial method and the trade-off involved in choosing the width of the intervals.
4.1 Surviving One Interval at a Time
The life table is the oldest method for describing survival. John Graunt's analysis of the London Bills of Mortality in 1662 estimated how many of 100 people born would still be alive at successive ages, and the same arithmetic later became the basis for pricing life insurance and annuities. Two kinds of life table are in use. A period life table, of the kind used to compute life expectancy in Lesson 4, applies the age-specific death rates of one calendar period to a hypothetical population. A cohort or clinical life table, the subject of this section, follows a real group of people from time zero and estimates the proportion who remain event-free at the end of successive intervals of follow-up. Cutler and Ederer (1958) set out the method for clinical follow-up studies, and it is often called the actuarial method.
The actuarial life table answers the question that defeated the shortcuts in Section 1. It uses the follow-up of censored participants up to the point at which they leave, and it never assumes anything about what happened to them afterwards. It does so by breaking follow-up into intervals and estimating, for each interval, the probability of getting through it without the event among those who started it event-free.
Suppose follow-up is divided into intervals of six months. To remain event-free for 18 months, a participant must get through the first interval without the event, then get through the second interval given that they reached it event-free, then get through the third interval given that they reached it event-free. Each of these steps is a conditional probability, which is a probability calculated only among people who meet some condition. Here the condition is having reached the start of the interval without the event. Probability theory states that the probability of a sequence of events is the product of each event's probability conditional on the events before it. The probability of remaining event-free to the end of interval j is therefore the product of the conditional probabilities of surviving intervals 1 to j. A simple illustration shows why multiplication is the right operation. If 90 percent of a group get through the first six months event-free, and 90 percent of those who reach month 6 also get through the next six months, then the proportion who get through both is 90 percent of 90 percent, or 0.90 × 0.90 = 0.81. Each step keeps a fraction of the people who were left after the step before it, so the fractions multiply.
The value of this decomposition lies in the denominators. Each conditional probability is estimated only from the participants who were present and event-free at the start of that interval. A participant who was censored in month 8 contributes fully to the first interval, contributes partly to the second, and is simply absent from the third and fourth. Nobody has to guess what happened to that participant after month 8, and their eight event-free months are not wasted. Figure 8.3 shows the chain of conditional probabilities for the Campus Connection Follow-up life table that subsection 4.3.2 computes.
Each link of the chain in Figure 8.3 is computed from counts recorded for its interval, and subsection 4.2 sets out those counts, and the quantities derived from them, as the columns of an actuarial life table.
4.2 The Columns of an Actuarial Life Table
An actuarial life table has one row per interval and seven columns. The subscript j numbers the intervals, so l1 is the number entering the first interval and S3 is the cumulative survival to the end of the third interval. Three of the columns are counts recorded for the interval (the number entering, the withdrawals and the events), and the other four are derived from them. Table 8.2 defines each column and shows how it is obtained.
Table 8.2. Columns of an actuarial life table, with the symbol for each quantity and how it is obtained.
| Symbol | Quantity | How it is obtained |
|---|---|---|
| lj | Number entering the interval | Participants event-free and under observation at the start of interval j; for later intervals, lj = lj−1 − wj−1 − dj−1 |
| wj | Withdrawals | Participants censored during the interval, for any reason |
| dj | Events | Participants who had the event during the interval |
| rj | Effective number at risk | rj = lj − wj / 2 |
| qj | Conditional probability of the event | qj = dj / rj |
| pj | Conditional probability of surviving the interval | pj = 1 − qj |
| Sj | Cumulative survival to the end of the interval | Sj = p1 × p2 × … × pj = Sj−1 × pj |
The effective number at risk is the only column that needs explanation. It is the denominator used to estimate the conditional probability of the event in an interval, adjusted for the fact that withdrawals were not observed for the whole interval. Withdrawals leave at various points during the interval, so they were at risk for part of it. Some leave in the first week and some in the last, and the table does not record exactly when. Counting them as fully present would credit them with time they did not spend under observation, while removing them entirely would ignore the time they did spend. The actuarial method therefore assumes that, on average, they were at risk for half of the interval, and it counts each withdrawal as half a person in the denominator. For example, if 12 participants withdraw during an interval that 200 participants entered, the effective number at risk is 200 minus 6, or 194. Subsection 4.4 examines this rule. Equation 8.2 gives the formulas for one interval.
For the first interval of the Campus Connection Follow-up, in which 200 participants entered, 12 withdrew and 14 screened positive, the formulas give r = 200 − 12 / 2 = 194, q = 14 / 194 = 0.072 and p = 0.928. Calculator 8.2 applies Equation 8.2 and starts from these counts.
Equation 8.2 deals with one interval at a time. A full table chains the intervals together, because the number entering each interval depends on the withdrawals and events in the interval before it, and subsection 4.3 builds such tables by hand.
4.3 Calculating a Life Table by Hand
A table is built one row at a time. For each interval, compute the effective number at risk, the conditional probability of the event and the conditional probability of surviving with Equation 8.2, and multiply the cumulative survival from the row above by the new conditional probability of surviving. Then carry the row forward: the number entering the next interval is the number entering the current interval minus its withdrawals and events. One minus the final cumulative survival is the estimated risk over the whole period. The two worked examples below apply this routine, first to round numbers and then to the running case.
4.3.1 A Small Example in Yearly Intervals
The first example is deliberately small. One hundred people are followed in yearly intervals. In the first year, 10 withdraw and 8 have the event; in the second year, 6 withdraw and 10 have the event; and in the third year, 12 withdraw and 6 have the event. Each row's number entering is the previous row's number entering minus its withdrawals and events, so 100 − 10 − 8 = 82 people enter the second year and 82 − 6 − 10 = 66 enter the third. Worked Example 8.1 applies Equation 8.2 to each of the three years and multiplies the conditional probabilities of surviving them to obtain the cumulative survival.
Worked Example 8.1: A three-interval actuarial life table
| Interval | lj | wj | dj | rj | qj | pj | Sj |
|---|---|---|---|---|---|---|---|
| 0 to 1 year | 100 | 10 | 8 | 95 | 0.084 | 0.916 | 0.916 |
| 1 to 2 years | 82 | 6 | 10 | 79 | 0.127 | 0.873 | 0.916 × 0.873 = 0.800 |
| 2 to 3 years | 66 | 12 | 6 | 60 | 0.100 | 0.900 | 0.800 × 0.900 = 0.720 |
The estimated probability of remaining event-free through three years is 0.72, so the estimated three-year risk of the event is 1 − 0.72 = 0.28. Each value in the last column is computed from unrounded values; multiplying the rounded values shown gives the same result to three decimal places.
Worked Example 8.1 shows every step of the routine on round numbers, and the same steps apply unchanged to a real cohort with more intervals.
4.3.2 The Running Case: 200 Participants Over 24 Months
The 200 high-loneliness participants in the Campus Connection Follow-up were followed in four six-month intervals. The counts in Worked Example 8.2 record, for each interval, how many participants screened positive and how many were censored before 24 months for any of the reasons listed in Section 1. The 114 participants who were still event-free and under observation at 24 months were censored administratively at the end of the study, and they do not appear as withdrawals because they completed the final interval.
Worked Example 8.2: Actuarial life table, high-loneliness group (hypothetical)
| Months | lj | wj | dj | rj | qj | pj | Sj |
|---|---|---|---|---|---|---|---|
| 0 to 6 | 200 | 12 | 14 | 194 | 0.072 | 0.928 | 0.928 |
| 6 to 12 | 174 | 10 | 12 | 169 | 0.071 | 0.929 | 0.862 |
| 12 to 18 | 152 | 14 | 9 | 145 | 0.062 | 0.938 | 0.808 |
| 18 to 24 | 129 | 8 | 7 | 125 | 0.056 | 0.944 | 0.763 |
The estimated probability of remaining free of a positive screen for 24 months is 0.763, so the estimated 24-month risk is 0.237. Across the four intervals, 42 participants screened positive and 44 were censored before 24 months. The first shortcut from Section 1 gives 42 ÷ 200 = 0.21 and the second gives 42 ÷ 156 = 0.27; the life-table estimate lies between them.
The running case confirms the point made in Section 1: the life-table estimate of the 24-month risk, 0.237, lies between the two shortcuts. Equation 8.3 states the rule behind the last column of Worked Examples 8.1 and 8.2: the cumulative survival to the end of an interval is the product of the conditional probabilities of surviving every interval up to and including that one.
Calculator 8.3 computes a full life table with up to five intervals. It opens with the running case; the second preset loads the three-interval example. Changing the number of events or withdrawals in one interval changes the number entering every later interval, which shows how each row depends on the rows before it.
Figure 8.4 plots the four estimates for the running case.
The running case gives an estimated 24-month risk of 0.237 in the high-loneliness group. That estimate depends on how the 44 participants censored before 24 months were counted in the denominators, and subsection 4.4 examines the rule that determined their contribution.
4.4 Why Withdrawals Are Counted as Half a Person
The half-interval assumption is a compromise between two extremes, and comparing the three versions for the first interval of the running case shows what is at stake. If the 12 withdrawals were counted as at risk for the whole interval, the denominator would be 200 and the conditional probability of the event would be 14 ÷ 200 = 0.070. This treats the withdrawals as if they had been observed event-free to month 6, which they were not, and it understates the probability of the event. If the withdrawals were removed entirely, the denominator would be 188 and the probability would be 14 ÷ 188 = 0.074. This discards the months that withdrawals spent at risk before they left, and it overstates the probability. The actuarial value, 14 ÷ 194 = 0.072, lies between them. The difference between the three versions grows with the number of withdrawals relative to the number entering and with the width of the interval.
The half-interval rule is one of three assumptions on which the actuarial method rests, and subsection 4.5 sets out all three together with the related choice of interval width.
4.5 Assumptions and the Width of the Intervals
The actuarial method gives a valid estimate only if three assumptions hold: censoring is non-informative, withdrawals occur on average at the midpoint of their interval, and survival does not depend on when a participant enrolled. The width of the intervals, which the analyst chooses, decides how much the second assumption matters and how precise each conditional probability is. Expand each panel below to see what each assumption means for the running case, how its failure would bias the estimate, and the trade-off involved in choosing the interval width.
The withdrawals in each interval are assumed to have the same risk of the event as the participants who remained. If participants whose mood was worsening were more likely to stop responding, the denominators would contain too many people who would have had the event, the conditional probabilities of the event would be too low, and cumulative survival would be overstated. This is the same assumption that underlies every method in this lesson.
Counting each withdrawal as half a person assumes that withdrawals are spread evenly through the interval, so that the average withdrawal leaves at its midpoint. If most withdrawals happened in the first week of each interval, the half-interval rule would overstate their time at risk, because those participants were in fact observed for only a small part of the interval rather than half of it. The denominator would then be too large and the conditional probability of the event slightly too low. Narrower intervals make this assumption matter less, because even a badly placed withdrawal can only be misplaced by a short stretch of time when each interval is short.
When enrolment is staggered and the study closes on a fixed date, participants who enrolled early contribute to later intervals, while participants who enrolled late are censored administratively before reaching them. The later intervals are therefore estimated mainly from early enrollees, and the earlier intervals from everyone. Combining them in one table assumes that the probability of the event at a given time since enrolment did not change over the calendar period of enrolment. By this we mean that a person who enrolled in the first month of recruitment and a person who enrolled in the last month would have faced the same risk in their sixth month of follow-up. A change in campus mental health services during recruitment, for example, could violate this assumption, because later enrollees would have had access to services that earlier enrollees did not, and their early intervals would describe a different situation from the later intervals contributed by the early enrollees.
Wide intervals give stable conditional probabilities but hide changes in risk within each interval and make the midpoint assumption less accurate. Narrow intervals show the timing of events in more detail but contain few events each, so their conditional probabilities are imprecise. Intervals should be fixed in the protocol before the data are seen, usually at clinically or practically meaningful points such as six-month assessment waves. The Kaplan-Meier estimator in Section 3 avoids the choice entirely by letting each interval end at an event time.
The panels show that the first and third assumptions concern who leaves and when people enrolled, which only the design can protect, while the second depends on the intervals the analyst fixes in the protocol before the data are seen. Despite these assumptions, the actuarial method remains the right tool when event and censoring times are known only by interval. Cancer registries that record survival by year since diagnosis, surveillance systems that report counts by quarter, and cohorts with fixed assessment waves all produce data in this form. It is also convenient for very large cohorts, because a single table summarizes the data. When exact or near-exact times are available for each participant, the Kaplan-Meier estimator uses them more fully.
The step from one method to the other follows from the choice of intervals. The life table shows the probability of remaining event-free only at the interval boundaries: 0.928 at 6 months, 0.862 at 12 months, 0.808 at 18 months and 0.763 at 24 months. Between the boundaries it says nothing, and an analyst who chose three-month intervals would obtain somewhat different values. If the conditional probabilities are recomputed every time an event occurs, two things change. The intervals no longer need to be chosen, and withdrawals no longer need the half-interval assumption, because each censored participant is counted as fully at risk at every event time before their censoring time and as absent after it. That is the Kaplan-Meier estimator.
This section has built the actuarial life table from conditional probabilities, applied it to a small cohort and to the running case, and set out the assumptions on which it rests. The exercise below works through one row of a life table by hand, and the key takeaways and knowledge check that follow review the section. Section 3 then develops the Kaplan-Meier estimator in full.
In a four-interval life table, 150 people enter the third interval, 10 withdraw during it and 14 have the event. Cumulative survival at the end of the second interval is 0.850. Compute r3, q3, p3, S3 and the number entering the fourth interval, then check the answers with the single-interval calculator, Calculator 8.2.
Answer. r3 = 150 − 10 / 2 = 145; q3 = 14 / 145 = 0.097; p3 = 0.903; S3 = 0.850 × 0.903 = 0.768; and 150 − 10 − 14 = 126 people enter the fourth interval.
Key Takeaways
- 4.1 To remain event-free for 18 months, a participant has to get through the first interval, then the second given that they reached it event-free, and then the third, so the probability of the whole journey is the product of the conditional probabilities of surviving each interval. The strength of this approach lies in the denominators: each conditional probability uses only the people who started that interval event-free, so a participant censored in month 8 contributes fully to the first six-month interval, partly to the second and not at all afterwards, and nobody has to guess what happened to them later. In practice, always multiply the p values. A common error is to add the conditional probabilities of the event instead: in Worked Example 8.1 the three q values add to 0.311, whereas the correct three-year risk is 1 − 0.720 = 0.280. A quick check is that cumulative survival can only stay the same or fall from one interval to the next, as it does in Figure 8.3 (0.928, 0.862, 0.808 and 0.763).
- 4.2 Each row of an actuarial life table follows one interval and turns three counts, the number entering (l), the withdrawals (w) and the events (d), into four derived quantities. The effective number at risk is r = l − w/2, because withdrawals are assumed to have been at risk for half of the interval on average; the conditional probability of the event is q = d/r; the conditional probability of surviving the interval is p = 1 − q; and the cumulative survival S is the running product of the p values. Before you calculate, label each number in the question with its symbol, and make sure the withdrawals include everyone censored during the interval for any reason, whether lost, withdrawn or moved away. Participants who complete the final interval event-free are censored administratively at the end of the study but are not withdrawals, which is why the 114 such participants in Worked Example 8.2 do not appear in w. For the first interval of the running case, r = 200 − 12/2 = 194, q = 14/194 = 0.072 and p = 0.928, and Calculator 8.2 lets you check a row like this one.
- 4.3 A full table is built one row at a time, and each row depends on the one before it. The number entering the next interval is l − w − d from the current row (in Worked Example 8.1, 100 − 10 − 8 = 82 people enter the second year), and the new cumulative survival is the previous S multiplied by the new p (0.916 × 0.873 = 0.800). Once the table is complete, one minus the final cumulative survival is the estimated risk over the whole period, here 1 − 0.720 = 0.280 over three years. The most common slips are forgetting to subtract the withdrawals when moving to the next row and rounding too early, so carry at least three decimal places. As a final check, the life-table risk should lie between the two shortcuts from Section 1, as it does in the running case, where 0.237 lies between 0.21 and 0.27.
- 4.4 Withdrawals leave part of the way through an interval, so they were at risk for some of it but not all of it, and the half-interval rule counts each one as half a person in the denominator. Counting them as fully at risk (r = l) treats them as if they had been observed event-free to the end of the interval, which inflates the denominator and understates the probability of the event; removing them entirely (r = l − w) throws away the time they did contribute and overstates it. For the first interval of the running case the three versions give 14/200 = 0.070, 14/188 = 0.074 and the actuarial value 14/194 = 0.072, which sits between the other two. If you are asked which analyst's figure is correct, or in which direction an alternative rule biases the estimate, work out all three denominators side by side. The gap between them grows when withdrawals are a large share of the people entering and when the intervals are wide.
- 4.5 The actuarial method rests on three assumptions: censoring is non-informative, withdrawals occur on average at the midpoint of each interval, and survival at a given time since time zero does not depend on when a participant enrolled. When a scenario describes a problem, match it to the assumption it threatens and, where you can, state the direction of bias. If people who relapse are more likely to stop attending, censoring is informative and survival is overstated; if most withdrawals happen in the first week of each interval, the half-interval rule overstates their time at risk; and a change in services during recruitment threatens the assumption of stable survival across enrolment dates. Interval width is a trade-off: wide intervals give stable estimates but hide when events happen and make the midpoint assumption less accurate, while narrow intervals show timing in more detail but contain few events each, so their estimates are imprecise. Whatever width you choose, fix it in the protocol before the data are seen, usually at meaningful points such as six-month assessment waves.
1. In a life table, the conditional probabilities of surviving three yearly intervals are 0.90, 0.80 and 0.90. A colleague estimates three-year survival as 1 − (0.10 + 0.20 + 0.10) = 0.60, by adding the conditional probabilities of the event. What is the correct estimate, and why?
2. A cancer registry builds an actuarial life table of survival after diagnosis in yearly intervals. In year 2, 140 people enter the interval, 20 are withdrawn (they moved away or reached the end of the study period) and 13 die. What are the effective number at risk (r) and the conditional probability of death (q) in year 2?
3. A study follows 200 adults discharged after a hip fracture for time to a first readmission, in three-month intervals. In months 0 to 3, 20 are withdrawn and 19 are readmitted. In months 3 to 6, 2 are withdrawn and 16 are readmitted. What is the actuarial estimate of the probability of remaining free of readmission at 6 months?
4. In the first interval of a life table, 300 participants enter, 40 withdraw and 28 have the event. To simplify the table, an analyst counts the 40 withdrawals as fully at risk for the whole interval. How does the analyst's conditional probability of the event compare with the actuarial value?
5. A clinic builds a life table in yearly intervals. Most withdrawals happen in the first weeks of each year, when patients' annual health-plan coverage lapses. Which statement about the actuarial estimate is correct?
6. A public health unit follows 200 adults with prediabetes for three years after a lifestyle program. Withdrawals are participants who moved out of the province. In year 1, 200 enter, 20 withdraw and 19 are diagnosed with type 2 diabetes; in year 2, 22 withdraw and 12 are diagnosed; in year 3, 14 withdraw and 6 are diagnosed. Using the actuarial method, what are the cumulative probability of remaining diabetes-free and the estimated risk of diabetes over three years?
✦ Pass the knowledge check with 100% to continue
The Kaplan-Meier Estimator and Reading Survival Curves
⏱ Estimated reading time: 35 minutes
Overview
Section 2 built cumulative survival from fixed intervals chosen in advance. This section introduces the Kaplan-Meier estimator, which applies the same logic with each interval ending at an observed event time and which has become the standard way to describe survival in clinical and epidemiological research. The section explains how the estimator extends the life table and computes it by hand for the ten high-loneliness participants introduced in Section 1, using a calculator that shows each step. It then explains how to read a published Kaplan-Meier curve: the survival probability and risk at a chosen time, the median survival time, and the censoring marks and numbers at risk that show how much information supports each part of the curve. It closes with the assumptions of the estimator and what a report of a Kaplan-Meier analysis should include.
Learning Objectives for this section
- 5.1 Explain how the Kaplan-Meier estimator extends the actuarial life table by ending each interval at an observed event time.
- 5.2 Calculate a Kaplan-Meier estimate by hand, including tied event times and censoring between event times.
- 5.3 Read the estimated survival probability and cumulative risk at a chosen time from a Kaplan-Meier curve.
- 5.4 Find the median survival time on a Kaplan-Meier curve and explain what "not reached" means.
- 5.5 Interpret censoring marks and the numbers-at-risk table, and explain why the right-hand end of a curve is the least precise part.
- 5.6 Describe the assumptions of the Kaplan-Meier estimator and list what a report of a Kaplan-Meier analysis should include.
5.1 From the Life Table to the Product-Limit Estimator
Edward Kaplan and Paul Meier published the product-limit estimator in 1958 (Kaplan & Meier, 1958). The estimator applies the logic of the life table with one change. Instead of fixed intervals chosen in advance, each interval ends at an observed event time. By this we mean that the analyst does not decide where the intervals fall; the data decide, because a new interval begins every time someone has the event. At every event time the estimator computes the conditional probability of getting past that time among the participants still at risk, and it multiplies these conditional probabilities together, just as the life table multiplied the probabilities of surviving each interval. Because the intervals now end exactly at event times, there is no longer any doubt about whether a censored participant was present when an event occurred. Censored participants are counted as fully at risk at every event time before they leave and are absent after it, so the half-interval assumption of the actuarial method is no longer needed. Participant 5 in Table 8.1, censored at month 8, illustrates the difference: a six-month life table counts this participant as half a person in the interval from 6 to 12 months, whereas the Kaplan-Meier estimator counts them fully at the event times in months 2 and 5 and not at all from month 10 onward.
In symbols, order the distinct event times as t1 < t2 < t3 and so on. At each event time tj, let nj be the number of participants at risk just before that time, meaning those who have neither had the event nor been censored before tj, and let dj be the number who have the event at tj. The conditional probability of getting past tj is (nj − dj) / nj. The Kaplan-Meier estimate of survival at time t, written Ŝ(t), is the product of these conditional probabilities over every event time up to and including t. The hat on S marks a quantity estimated from data.
The definition turns into a short calculation that is repeated at each event time, and subsection 5.2 carries it out by hand.
5.2 Calculating a Kaplan-Meier Estimate by Hand
Each step of the calculation needs only the estimate at the previous event time, the number at risk and the number of events. Equation 8.4 writes one such step in symbols. Calculator 8.4 performs a single step, starting from the third event time in Worked Example 8.3 below: the estimate just before month 5 is 0.900, eight participants are at risk, and two screen positive.
Repeating this step at each event time in turn produces the whole estimate. Worked Example 8.3 applies it to the ten high-loneliness participants from Table 8.1. The rows of Table 8.3, inside the example, are the distinct follow-up times in order. A row with an event changes the estimate; a row with only censoring leaves the estimate unchanged and reduces the number at risk at the next event time.
Worked Example 8.3: Kaplan-Meier estimate for ten high-loneliness participants
Table 8.3. Kaplan-Meier estimate for the ten high-loneliness participants in Table 8.1, with one row for each distinct follow-up time.
| Month | At risk just before (n) | Events (d) | Censored | (n − d) / n | Ŝ(t) |
|---|---|---|---|---|---|
| 2 | 10 | 1 | 0 | 9/10 = 0.900 | 0.900 |
| 3 | 9 | 0 | 1 | no event | 0.900 |
| 5 | 8 | 2 | 0 | 6/8 = 0.750 | 0.900 × 0.750 = 0.675 |
| 8 | 6 | 0 | 1 | no event | 0.675 |
| 10 | 5 | 1 | 0 | 4/5 = 0.800 | 0.675 × 0.800 = 0.540 |
| 12 | 4 | 0 | 1 | no event | 0.540 |
| 15 | 3 | 1 | 0 | 2/3 = 0.667 | 0.540 × 0.667 = 0.360 |
| 24 | 2 | 0 | 2 | no event | 0.360 |
The estimated probability of remaining free of a positive screen for 24 months is 0.360, so the estimated 24-month risk is 1 − 0.360 = 0.640, the value quoted in Section 1. Participant 2, censored at month 3, counts in the risk set at month 2 and is absent from month 5 onward. The two events at month 5 are tied and are handled in a single step with d = 2.
The example also illustrates three conventions that published analyses and software follow. Tied events at the same time are handled together in one step, as the two events at month 5 were. When an event and a censoring are recorded at the same time, the event is assumed to come first, so the censored participant is still counted at risk at that time. The estimate is defined only up to the longest follow-up time; beyond month 24 the data say nothing about these participants.
Equation 8.5 gathers the steps of Table 8.3 into a single expression: the estimate at time t is the product of the conditional probabilities at every event time up to and including t.
The step-by-step Calculator 8.5 takes up to ten participants, each with a follow-up time and a status (1 for an event, 0 for censored). It sorts the times, forms the risk set at each time, and shows the working for all time points at once or for one time point at a time, together with the curve drawn so far. Try changing participant 5 from censored to an event at month 8 and watch every later step change. Then change participant 2's time from 3 to 20 months while keeping the status at 0 and notice that a censored participant who stays longer raises the number at risk at every later event time.
Worked Example 8.3 gives the estimate as a sequence of numbers. Published analyses present it as a curve, and subsection 5.3 explains how to read one.
5.3 Reading Survival and Risk at a Chosen Time
A Kaplan-Meier curve plots the estimate against time as a step function. It starts at 1 at time zero, stays flat between event times, and drops at each event time by an amount that depends on the number of events and the number at risk. Figure 8.5 shows the curve for the ten participants in Table 8.3.
The basic reading is simple: go up from a time on the horizontal axis to the curve and across to the vertical axis, and the value is the estimated probability of remaining event-free at that time; one minus it is the estimated cumulative risk by that time. Four features of Figure 8.5 carry most of its information. Open each of the four tabs below to see how to read the survival at a chosen time, the median survival time, the censoring marks and the numbers at risk, each worked through on this curve.
Reading up from a time on the horizontal axis to the curve and across to the vertical axis gives the estimated probability of remaining event-free at that time. At 12 months the curve is at 0.540, so the estimated 12-month risk of a positive screen is 1 − 0.540 = 0.460. A small question arises when the chosen time is exactly an event time, because the curve has two heights there: the level before the drop and the level after it. The convention is that the curve is right-continuous, by which we mean that the value exactly at an event time is the value after the drop. For example, Ŝ(10) = 0.540 rather than 0.675, because the estimate at month 10 already includes the event that occurred in month 10, and it describes the probability of remaining event-free beyond month 10. Some reports plot the cumulative risk, 1 − Ŝ(t), which rises from 0 as the survival curve falls from 1; the two plots carry the same information.
The median survival time is the earliest time at which the estimated survival falls to 0.50 or below, so that half of the group is estimated to have had the event. Reading across from 0.50 on the vertical axis to the curve and down to the horizontal axis gives a median of 15 months in Figure 8.5, because the curve first falls to or below 0.50 at month 15. When the curve never falls to 0.50 during follow-up, the median is reported as not reached, which means that more than half of the group were still estimated to be event-free when the data ran out. The median is preferred to the mean as a summary of survival time because the mean cannot be computed without knowing the event times of participants who were censored at the end of follow-up. In Figure 8.5, for example, participants 9 and 10 were still event-free at 24 months, and their event times could be 25 months or 10 years; a mean would need a value for each of them. The median avoids this problem, because it depends only on the point at which half of the group has had the event, which the curve shows directly.
The small vertical ticks on the curve mark the times at which participants were censored. They do not change the estimate. A cluster of ticks early in follow-up indicates heavy early loss, which should prompt a question about whether censoring was informative. Many ticks at a single late time usually reflect administrative censoring at the end of the study.
The table beneath the plot gives the number of participants still at risk at regular times. It shows how much information supports each part of the curve. In Figure 8.5 only two participants remain at risk from month 15 onward, so the last part of the curve rests on very few people, and a single additional event would have dropped it from 0.360 to 0.180. Readers should treat the right-hand end of any curve with caution when the numbers at risk are small, and a curve published without a numbers-at-risk table is harder to interpret.
The first tab is the skill this subsection asks for: at 12 months the curve is at 0.540, so the estimated 12-month risk of a positive screen is 0.460, and the axis label should always be checked, because a cumulative risk plot rises where a survival plot falls. The second tab reads the curve in the other direction, from a probability to a time, which gives the median survival time developed in subsection 5.4.
5.4 The Median Survival Time
The median survival time is the earliest time at which the estimated survival falls to 0.50 or below, so that half of the group is estimated to have had the event; in Figure 8.5 it is 15 months, as the Median survival tab showed. Because the curve moves in steps, the median is the time of the step that takes it to 0.50 or below, with no interpolation between event times. When the curve never falls to 0.50 during follow-up, the median is reported as not reached.
A median that is not reached appears as soon as a second group is added. Figure 8.6 adds ten participants from the low-loneliness group to the ten from the high-loneliness group. In the low-loneliness group, participant 1 was censored at month 4, participants 2, 4 and 6 screened positive at months 6, 12 and 20, participants 3 and 5 were censored at months 9 and 18, and the remaining four completed 24 months without a positive screen.
The curves can be compared at a fixed time, by their medians, or by the area beneath them. At 12 months the estimated probability of remaining event-free is 0.540 in the high-loneliness group and 0.762 in the low-loneliness group. The median is 15 months in the high-loneliness group and is not reached in the low-loneliness group, whose curve ends at 0.610, so fewer than half of that group are estimated to have screened positive by 24 months. The area under each curve up to 24 months is the restricted mean survival time, the average number of event-free months within the first 24 (Royston & Parmar, 2013). It is 14.0 months for the high-loneliness participants and 19.9 months for the low-loneliness participants, a difference of about 5.9 event-free months. Each of these comparisons describes the two samples. Whether the difference is larger than chance would produce with ten participants per group is the question for the log-rank test in Section 4.
Both curves in Figure 8.6 rest on only a few participants by the end of follow-up, and subsection 5.5 explains how the censoring marks and the numbers at risk show how far each part of a curve can be trusted.
5.5 Censoring Marks, Numbers at Risk and Precision
The last two tabs under Figure 8.5 cover the features that show how far a curve can be trusted. Censoring marks never move the curve, but their pattern matters: a cluster early in follow-up signals heavy early loss and raises the question of informative censoring, while many marks at one late time, as at month 24 in Figure 8.5, usually reflect administrative censoring. The numbers at risk show how many people support each part of the curve. As they fall, each event causes a larger drop; in Figure 8.5 only two participants remain at risk from month 15, so one more event would have halved the final estimate. The right-hand end of any curve is therefore its least precise part.
Uncertainty in the estimate is usually shown as a 95 percent confidence band around the curve, a shaded region or pair of lines that shows the range of survival values compatible with the data at each time. The standard error behind the band is computed with Greenwood's formula (Greenwood, 1926), which adds a contribution from each event time up to the time of interest. Each contribution grows as the number at risk at that event time shrinks, because a conditional probability estimated from a handful of people is much less certain than one estimated from hundreds. For example, a step based on 2 events among 8 people at risk is far less certain than a step based on 25 events among 100, even though both give a conditional probability of surviving of 0.75. The practical point for study design is that the band widens as the number at risk falls, so precision late in follow-up depends on retaining participants and on enrolling enough of them in the first place.
Precision is one limit on what a curve can show, and subsection 5.6 turns to the assumptions on which the estimate itself rests.
5.6 Assumptions and Reporting
The Kaplan-Meier estimator makes no assumption about the shape of the survival curve, which is why it is called non-parametric. It does make three assumptions about the data. Censoring must be non-informative, as discussed in Section 1. Participants who enrolled early and late must have the same survival prospects at the same time since time zero, as for the life table. Event times must be recorded precisely enough that the order of events and censorings is correct, which is why monthly ascertainment works well in the Campus Connection Follow-up and annual ascertainment would not.
Setting the estimator beside the two shortcuts from Section 1 shows where the first of these assumptions enters. Table 8.4 gives the three estimates of the probability of remaining event-free for 24 months among the ten high-loneliness participants, with the assumption that each approach makes about the three participants censored early.
Table 8.4. Estimated probability of remaining event-free for 24 months among the ten high-loneliness participants under the two shortcuts and the Kaplan-Meier estimator, with the assumption each approach makes about the three early-censored participants.
| Approach | Estimated 24-month survival | What it assumes about the three early-censored participants |
|---|---|---|
| Treat censored participants as event-free | 5/10 event-free = 0.500 | None of them would ever have screened positive |
| Drop censored participants | 2/7 event-free = 0.286 | Their event-free months carry no information |
| Kaplan-Meier | 0.360 | After censoring, each had the same risk as those who remained |
The Kaplan-Meier estimate lies between the two shortcuts, and it is the only one of the three whose assumption is stated in terms that a design can make plausible. Efron (1967) showed that the estimator can be computed by redistributing each censored participant's share of the probability equally among the participants who remain at risk after the censoring time. By this we mean the following. At the start, each of the ten participants carries one tenth of the probability. When participant 2 is censored at month 3, nobody knows what happened to them next, so their one tenth is not thrown away and is not counted as an event; instead it is shared out evenly among the eight participants still under observation, each of whom now carries a little more weight. Sharing it evenly is the same as saying that the censored participant's future would have looked like the future of a typical participant who stayed, which is a concrete way to see the non-informative censoring assumption at work.
Because the estimate depends on these assumptions and on the numbers at risk, a report must give readers what they need to check both. The elements below serve as a checklist for writing a report and for critiquing a published curve.
Reporting a Kaplan-Meier analysis
A report of a Kaplan-Meier analysis should state the time zero, the event definition and the censoring rules; give the number of participants and the number of events in each group; present the curve with censoring marks and a numbers-at-risk table; report survival at one or two prespecified times with 95 percent confidence intervals; and give the median survival time with its confidence interval when it is reached. Bland and Altman (1998) and Clark et al. (2003) give accessible accounts of the method and its presentation.
This section has computed the Kaplan-Meier estimate by hand, shown how to read and compare its curves, and stated its assumptions and the content of a report. The key takeaways and knowledge check that follow review the section. Section 4 then turns from describing survival in each group to formal comparisons between groups.
Key Takeaways
- 5.1 The Kaplan-Meier estimator uses the same chain of conditional probabilities as the life table, but instead of fixed intervals chosen in advance, each interval ends at an observed event time. Two practical consequences follow: you no longer have to choose interval widths, and you no longer need the half-interval rule, because each censored participant is counted as fully at risk at every event time up to their censoring time and is simply absent afterwards. If a question asks how the two methods treat the same person, say participant 5, censored at month 8, the answer is that a six-month life table counts them as half a person in the 6 to 12 month interval, while Kaplan-Meier counts them fully at the event times in months 2 and 5 and not at all from month 10 onward. The life table remains the right tool when times are known only by interval, as in registries that record survival by year since diagnosis, whereas Kaplan-Meier makes fuller use of exact or near-exact times.
- 5.2 To calculate a Kaplan-Meier estimate, list the distinct follow-up times in order and, at each event time, multiply the previous estimate by (n − d) / n, where n is the number still at risk just before that time and d is the number of events at that time. Censored participants never cause a drop; they simply reduce n at the next event time. Three conventions settle the cases students most often find tricky: tied events are handled together in one step with d equal to the number of tied events (6/8 at month 5 in Table 8.3), a participant censored at the same time as an event still counts as at risk at that time, and the estimate stops at the longest follow-up time. A reliable way to get n right is to count the participants whose follow-up time is equal to or later than the event time, which gives 8 at risk at month 5 and 5 at month 10 in Table 8.3. Check your answer by confirming that the estimate falls only at event times and never rises.
- 5.3 To read a Kaplan-Meier curve at a chosen time, go up from that time on the horizontal axis to the curve and across to the vertical axis: the value is the estimated probability of remaining event-free at that time, and one minus it is the estimated cumulative risk by that time. In Figure 8.5 the curve is at 0.540 at 12 months, so the estimated 12-month risk of a positive screen is 1 − 0.540 = 0.460. Between event times the curve is flat, so a time that falls between two drops takes the value after the earlier drop, and at an event time itself the value is the one after the drop. Read the axis label before you answer, because some reports plot the cumulative risk, which rises from 0, rather than survival, which falls from 1. The two plots carry the same information, but confusing them turns a survival of 0.54 into a risk of 0.54.
- 5.4 The median survival time is the earliest time at which the estimated survival falls to 0.50 or below, the point by which half of the group is estimated to have had the event. To find it, read across from 0.50 on the vertical axis until you meet the curve and then down to the time axis; in Figure 8.5 the curve first falls to or below 0.50 at month 15, so the median is 15 months. Because the curve moves in steps, the median is the time of the step that takes it to 0.50 or below, and you should not interpolate between event times. If the curve stays above 0.50 for the whole of follow-up, as the low-loneliness curve does (it ends at 0.610), the median is reported as not reached, which tells you that fewer than half of the group are estimated to have had the event by the end of follow-up. The median is preferred to the mean because the mean cannot be computed without the unknown event times of participants censored at the end of follow-up.
- 5.5 The small vertical ticks on a Kaplan-Meier curve mark censoring times, and they never move the curve. Their pattern is still informative: a cluster of ticks early in follow-up signals heavy early loss and should make you ask whether censoring was informative, while many ticks at one late time usually reflect administrative censoring at the end of the study. The numbers-at-risk table beneath the plot tells you how many people support each part of the curve, and as those numbers fall, each event causes a larger drop and the confidence band widens. In Figure 8.5 only two participants remain at risk from month 15, so a single further event would have dropped the curve from 0.360 to 0.180. Whenever you interpret the right-hand end of a curve, check the numbers at risk first and say that the estimate there is imprecise when they are small, and treat a curve published without a numbers-at-risk table with extra caution.
- 5.6 The Kaplan-Meier estimator makes no assumption about the shape of the survival curve, which is why it is called non-parametric, but it does assume three things about the data: censoring is non-informative, participants who enrolled early and late have the same survival prospects at the same time since time zero, and event times are recorded precisely enough that events and censorings are in the right order. When a scenario describes a change in treatment or services partway through enrolment, the assumption in doubt is stable survival across enrolment dates; when people drop out because they are getting worse, it is non-informative censoring. A complete report, as the reporting checklist in subsection 5.6 sets out, states time zero, the event definition and the censoring rules; gives the number of participants and events in each group; shows the curve with censoring marks and a numbers-at-risk table; and reports survival at one or two prespecified times and the median (when it is reached), each with a 95 percent confidence interval. Use that checklist when you critique a published curve or plan your own report.
1. The same cohort is analyzed twice, once with an actuarial life table in six-month intervals and once with the Kaplan-Meier estimator. One participant is censored at month 8. How does each method use this participant?
2. Twelve adults starting treatment for latent tuberculosis infection are followed for up to 12 months for time to stopping treatment early. The table gives the number who stopped (events) and the number censored at each follow-up time. What is the Kaplan-Meier estimate of the probability of still being on treatment after month 7?
| Month | Events | Censored |
|---|---|---|
| 2 | 1 | 0 |
| 3 | 0 | 1 |
| 4 | 2 | 0 |
| 6 | 0 | 2 |
| 7 | 1 | 0 |
| 10 | 1 | 0 |
| 12 | 0 | 4 |
3. A Kaplan-Meier curve for time to a first relapse is at 1.00 until month 2, steps down to 0.92 at month 2 and to 0.84 at month 5, stays at 0.84 until month 9, and then steps down to 0.77. What are the estimated probability of remaining relapse-free and the estimated cumulative risk of relapse at month 8?
4. A report gives Kaplan-Meier estimates for two groups followed for 24 months. Group A is at 0.85 after month 3, 0.71 after month 6, 0.55 after month 9, 0.48 after month 12 and 0.40 after month 15, with no later events. Group B falls gradually to 0.58 by month 20 and stays there to month 24. What are the median survival times?
5. A Kaplan-Meier curve for 120 participants is at 0.36 at month 30 and drops to 0.30 at month 33, when 6 participants are at risk; it stays at 0.30 to the end of follow-up at month 36. The numbers at risk beneath the plot are 120 at month 0, 84 at month 12, 41 at month 24 and 6 at month 30. A colleague concludes that the risk of the event rises sharply late in follow-up. What is the best response?
6. A cohort of adults starting dialysis was enrolled from 2016 to 2023 and followed for time to a first bloodstream infection. In 2020 the dialysis units adopted a new catheter-care protocol that lowered the risk of infection. Participants enrolled in 2016 provide almost all of the follow-up beyond four years, much of it under the old protocol, while those enrolled after 2020 were under the new protocol from the start. Which assumption of the Kaplan-Meier estimate is most in doubt?
7. A quit-smoking clinic follows 10 clients for up to 12 months after their quit date. The follow-up times in months, with the status in parentheses (1 = relapse to daily smoking, 0 = censored), are: 2 (1), 3 (1), 3 (1), 4 (0), 6 (1), 8 (0), 9 (1), 12 (0), 12 (0) and 12 (0). What are the Kaplan-Meier estimate of the probability of remaining smoke-free at 7 months and the median time to relapse?
8. For the same ten clients, a colleague says, "About 44 percent of clients stay smoke-free for a year, and the end of the curve is as reliable as the beginning." Which response is correct?
✦ Pass the knowledge check with 100% to continue
Comparing Groups: The Log-Rank Test and the Hazard Ratio
⏱ Estimated reading time: 40 minutes
Overview
Sections 2 and 3 described survival in one group at a time, but most time-to-event studies compare groups: participants with and without an exposure, or participants randomized to an intervention or to control. This section introduces the tools for that comparison and closes the lesson with the content of a protocol. The log-rank test asks whether two survival curves differ by more than chance would produce. The hazard ratio, built on the hazard, measures how much faster events occur in one group than in the other and is the time-to-event counterpart of the incidence rate ratio from Lesson 6. Most hazard ratio analyses assume proportional hazards, and even when that assumption holds a hazard ratio differs from a risk ratio when the event is common. The section ends by gathering the decisions that a protocol with a time-to-event outcome must state before data collection begins, including the number of events needed for adequate power.
Learning Objectives for this section
- 6.1 Explain the logic of the log-rank test as a comparison of observed and expected events at each event time.
- 6.2 Define the hazard as the event rate among participants still at risk and estimate it from life-table intervals.
- 6.3 Calculate a hazard ratio as a ratio of incidence rates with its 95 percent confidence interval, and interpret it in words.
- 6.4 Explain the proportional hazards assumption in plain language, identify patterns that suggest it does not hold, and name alternatives to a single hazard ratio.
- 6.5 Explain why a hazard ratio differs from a risk ratio when the event is common.
- 7.1 List what a protocol with a time-to-event outcome must specify, including the number of events needed for adequate power.
6.1 The Log-Rank Test
Figure 8.6 in Section 3 showed that the high-loneliness participants had a lower Kaplan-Meier curve than the low-loneliness participants. The log-rank test asks whether a difference of that size could plausibly arise if the two groups had the same survival at every time.
6.1.1 Observed and Expected Events
The logic of the test builds on the risk set. At each event time, the participants at risk in both groups are pooled, and the events at that time are shared out between the groups in proportion to their numbers at risk. The reasoning is that, if the null hypothesis is true and group membership makes no difference to the risk, then an event is equally likely to happen to any participant who is still at risk, whichever group they belong to. For example, a group that makes up 40 percent of the pooled risk set should, on average, account for 40 percent of the events at that time, much as a team that holds 40 percent of the tickets in a fair draw should expect to win about 40 percent of the prizes. The expected number of events in group A at event time j is therefore the total number of events at that time multiplied by group A's share of the risk set. Doing this at every event time, rather than once for the whole study, matters because the share of each group in the risk set changes as follow-up goes on: a group that has more events early will make up a smaller share of the people left later, and its expected count shrinks accordingly. Equation 8.6 adds these expected numbers over the event times and gives the test statistic that compares them with the observed number of events in group A.
Worked Example 8.4 applies this logic to the twenty participants in Figure 8.6, with the high-loneliness group as group A; its Table 8.5 lists the risk sets and events at each event time. At month 12, one low-loneliness participant screened positive and high-loneliness participant 7 was censored; following the convention from Section 3, participant 7 is counted in the risk set at month 12.
Worked Example 8.4: Observed and expected events at each event time
Table 8.5. Observed and expected events in the high-loneliness group (A) at each event time, for the twenty participants in Figure 8.6.
| Month | At risk, A | Events, A | At risk, B | Events, B | Total events | Expected in A |
|---|---|---|---|---|---|---|
| 2 | 10 | 1 | 10 | 0 | 1 | 1 × 10/20 = 0.500 |
| 5 | 8 | 2 | 9 | 0 | 2 | 2 × 8/17 = 0.941 |
| 6 | 6 | 0 | 9 | 1 | 1 | 1 × 6/15 = 0.400 |
| 10 | 5 | 1 | 7 | 0 | 1 | 1 × 5/12 = 0.417 |
| 12 | 4 | 0 | 7 | 1 | 1 | 1 × 4/11 = 0.364 |
| 15 | 3 | 1 | 6 | 0 | 1 | 1 × 3/9 = 0.333 |
| 20 | 2 | 0 | 5 | 1 | 1 | 1 × 2/7 = 0.286 |
| Total | OA = 5 | OB = 3 | 8 | EA = 3.24 |
The high-loneliness group had 5 events where 3.24 were expected under the null hypothesis, and the low-loneliness group had 3 where 8 − 3.24 = 4.76 were expected. The variance of OA − EA, summed over the event times, is 1.86, so the log-rank statistic is (5 − 3.24)² / 1.86 = 1.67 with one degree of freedom, giving p = 0.20. A simpler approximation that is often taught, (OA − EA)² / EA + (OB − EB)² / EB, gives 1.61 and p = 0.21.
Calculator 8.6 performs the observed-and-expected arithmetic for up to eight event times. It opens with Table 8.5. Moving one event from group A to group B at the same time shows how sensitive a comparison with few events is.
6.1.2 Interpreting the Test
The curves in Figure 8.6 look quite different, yet the test in Worked Example 8.4 does not reject the null hypothesis. With ten participants per group and eight events in total, a large difference in survival is compatible with chance. This is a property of the design and says nothing in favour of equal survival. By this we mean that the study was simply too small to tell the two explanations apart: the data are compatible with a real difference and also with no difference, so a non-significant result here is an absence of evidence rather than evidence that the groups are the same. The information in a time-to-event comparison comes from the events, and eight events provide very little of it; subsection 7.1.2 shows how to plan for enough events. The ratio of observed to expected events also gives a rough estimate of the hazard ratio: (5 ÷ 3.24) ÷ (3 ÷ 4.76) = 2.45.
The test is usually attributed to Mantel (1966) and to Peto and Peto (1972), and Bland and Altman (2004) give a short account for applied readers. Three of its properties matter for interpretation. It gives every event time the same weight, so late differences, where few participants remain at risk, count as much as early ones. It is most powerful when one group has a consistently higher hazard throughout follow-up, the situation described by the proportional hazards assumption in subsection 6.4, and it can miss a real difference when curves cross. The reason is that the test adds up the differences between observed and expected events across all event times. If group A has more events than expected early in follow-up and fewer than expected later, the positive and negative differences partly cancel in the sum, and the total can be close to zero even though the groups clearly differed at each stage. It extends directly to more than two groups and to comparisons within strata of a confounder, the stratified log-rank test, in the same way that the Mantel-Haenszel approach in Lesson 7 extends a single two-by-two table.
The log-rank test addresses whether two curves differ by more than chance would produce. A measure of how much faster events occur in one group needs the hazard, which subsection 6.2 defines.
6.2 The Hazard: An Event Rate Among Those Still at Risk
The hazard at time t is the rate at which events occur among participants who are still event-free at t, expressed per unit of time. It is the incidence rate from Lesson 4 computed over a very short interval around t. By this we mean that the hazard looks only at the people who have made it to time t without the event and asks how quickly events are happening among them right now. It is a measure of the current pace of events, much as a car's fuel consumption display shows how fast fuel is being used at the present moment. The survival probability is more like the fuel gauge: it reflects everything that has happened so far, so it can only stay level or fall as time passes. The hazard, in contrast, can rise, fall or stay constant, because the pace of events at one moment does not have to match the pace at another. The hazard of death after major surgery is highest in the days after the operation and then falls; the hazard of death from most chronic diseases rises with age; and the hazard of a sudden accidental event may be roughly constant.
The life table from Section 2 gives an estimate of the hazard within each interval. Dividing the events in an interval by the person-time at risk in that interval gives the average hazard over the interval. With the half-interval assumption applied to both withdrawals and events, the person-time in an interval of width h is approximately h × (rj − dj / 2). The reasoning follows the same logic as the effective number at risk. A participant who has the event stops contributing person-time at that moment, because they are no longer at risk of a first event, and on average this happens halfway through the interval. The effective number at risk, rj, has already removed half of each withdrawal, so subtracting half of each event as well leaves the average number of people under observation and at risk across the interval. Multiplying that average by the width of the interval gives the person-time. Unlike the conditional probability qj, which covers the whole interval and has no unit, the hazard is a rate and is always stated per unit of time. Table 8.6 applies this approximation to the four six-month intervals of the high-loneliness life table in Worked Example 8.2.
Table 8.6. Estimated hazard of a first positive screen in each six-month interval for the 200 high-loneliness participants in the hypothetical Campus Connection Follow-up.
| Months | Events | Person-months at risk | Hazard per person-month | Per 100 person-months |
|---|---|---|---|---|
| 0 to 6 | 14 | 6 × (194 − 7) = 1,122 | 0.0125 | 1.25 |
| 6 to 12 | 12 | 6 × (169 − 6) = 978 | 0.0123 | 1.23 |
| 12 to 18 | 9 | 6 × (145 − 4.5) = 843 | 0.0107 | 1.07 |
| 18 to 24 | 7 | 6 × (125 − 3.5) = 729 | 0.0096 | 0.96 |
| 0 to 24 | 42 | 3,672 | 0.0114 | 1.14 |
In this hypothetical cohort the hazard of a first positive screen declined slowly over follow-up, from about 1.25 to about 0.96 per 100 person-months. The overall rate in the last row, 42 events over 3,672 person-months, is the average of the interval hazards weighted by person-time.
The overall hazard of 1.14 per 100 person-months summarizes the high-loneliness group, and subsection 6.3 compares it with the hazard in the low-loneliness group.
6.3 The Hazard Ratio as a Ratio of Rates
The hazard ratio compares the hazard in one group with the hazard in another at the same time since time zero. By this we mean that it divides the current pace of events among exposed participants who are still event-free by the current pace among unexposed participants who are still event-free. A hazard ratio of 2, for example, means that at a given point in follow-up, exposed participants who have not yet had the event are having it at twice the rate of comparable unexposed participants. If both hazards are constant over follow-up, the hazard ratio equals the incidence rate ratio from Lesson 6, because a constant hazard is simply an incidence rate that does not change over time. It can then be computed from the events and person-time in each group. Equation 8.7 gives the hazard ratio under constant hazards with its confidence interval.
The 400 low-loneliness participants in the Campus Connection Follow-up had 40 first positive screens over 8,800 person-months, a rate of 0.45 per 100 person-months, compared with 1.14 per 100 person-months in the high-loneliness group. The hazard ratio is (42 ÷ 3,672) ÷ (40 ÷ 8,800) = 2.52, with a 95 percent confidence interval from 1.63 to 3.88. In words, at any point during the 24 months, participants with high loneliness who had not yet screened positive did so at about two and a half times the rate of participants with low loneliness. The standard error depends only on the numbers of events, 42 and 40, which is another way of seeing that events carry the information in a time-to-event comparison. Calculator 8.7 computes the hazard ratio and its confidence interval from the events and person-time in each group, with a preset for the Campus Connection cohort.
In practice, hazard ratios are usually estimated with the Cox proportional hazards model (Cox, 1972). The Cox model does not assume that the hazards are constant. It allows the baseline hazard, which is the hazard in the reference or unexposed group, to take any shape over time, rising, falling or rising and then falling, and it assumes only that the ratio of the hazards stays the same. For example, the hazard of a first positive screen might be highest in the first months of follow-up and lower afterwards in both loneliness groups; the Cox model does not need to describe that shape, provided that the high-loneliness hazard remains the same multiple of the low-loneliness hazard throughout. Like logistic regression for the odds ratio, it can adjust a hazard ratio for confounders, and it is the time-to-event analogue of the regression adjustment described in Lesson 7. HSCI 341 interprets the hazard ratio from a Cox model without fitting one. For protocol writing, the point is that a hazard ratio from a Cox model has the same interpretation as the rate ratio above, provided its central assumption holds.
A single hazard ratio, whether computed from rates or from a Cox model, is a complete summary only if the ratio of the hazards stays the same over follow-up, and subsection 6.4 examines that assumption.
6.4 Proportional Hazards in Plain Language
The proportional hazards assumption states that the ratio of the hazards in the two groups is the same at every time during follow-up. Each hazard may rise or fall, but they rise and fall together. If participants with high loneliness screen positive at two and a half times the rate of participants with low loneliness in month 2, the assumption says they also do so at two and a half times the rate in month 20. A single hazard ratio is then a complete summary of how the groups differ over time.
The assumption fails when the effect of the exposure changes over follow-up. A surgical treatment compared with medical management may carry a higher hazard of death in the weeks after the operation and a lower hazard afterwards, so the hazard ratio is above 1 early and below 1 later, and a single hazard ratio averages these into a number that describes neither period. Figure 8.7 shows schematic hazards and survival curves for a situation in which the assumption holds and for one, like the surgical example, in which it fails.
The hazards themselves cannot be seen on a Kaplan-Meier plot, so the shape of the survival curves is the first check. When the hazards are proportional, the group with the higher hazard loses event-free participants faster at every point in follow-up, so its curve stays below the other curve throughout follow-up and the two curves do not cross. Kaplan-Meier curves that cross, or that separate early and then converge, therefore suggest that the hazards are not proportional, because they show that the group with the faster pace of events early on is no longer the group with the faster pace later. More formal checks compare the log of the cumulative hazard in each group over time or test whether the hazard ratio drifts with time.
When the hazards are not proportional, the protocol can provide alternatives. The analyst can report separate hazard ratios for prespecified periods, such as the first six months and the remainder of follow-up; report the difference in survival at prespecified times; or report the difference in restricted mean survival time, which Royston and Parmar (2013) recommend as a summary that does not depend on proportional hazards. Hernán (2010) adds a further caution. Period-specific hazard ratios compare the participants who remain at risk at each time, and in later periods those participants are a selected group, because the most susceptible members of the higher-risk group have already had the event. Survival curves and risks at fixed times are less vulnerable to this problem, and he concludes that survival curves are more informative than hazard ratios and should be used more widely in observational studies.
Even when the hazards are proportional, a hazard ratio is not a ratio of risks, and subsection 6.5 shows how far the two can differ.
6.5 Why a Hazard Ratio Is Not a Risk Ratio
The hazard ratio and the risk ratio answer different questions. The hazard ratio compares the pace of events among people still at risk at each moment, whereas the risk ratio compares the proportions of each group who have had the event by a fixed time. The two are linked through the survival curves. Under proportional hazards, the survival curve of the exposed group is the survival curve of the unexposed group raised to the power of the hazard ratio. By this we mean that, if the unexposed group's probability of remaining event-free at some time is a number between 0 and 1, the exposed group's probability at the same time is found by raising that number to the power of the hazard ratio. With a hazard ratio of 2, for example, an unexposed survival of 0.90 becomes 0.90 × 0.90 = 0.81 in the exposed group. Because raising a number between 0 and 1 to a power greater than 1 makes it smaller, a hazard ratio above 1 always gives the exposed group a lower survival curve. Equation 8.8 states this relationship.
The relationship shows how far the hazard ratio can differ from the risk ratio at a fixed time. If 90 percent of low-loneliness participants remain event-free at 24 months and the hazard ratio is 2.5, then 0.902.5 = 0.768 of high-loneliness participants remain event-free. The 24-month risks are 0.100 and 0.232, a risk ratio of 2.32. If the event were common, with only half of the unexposed group event-free at 24 months, the same hazard ratio of 2.5 would give risks of 0.500 and 0.823, a risk ratio of 1.65. The reason is that a risk cannot exceed 1: when the event is common, the exposed group's risk has little room to rise above the unexposed group's risk, so the risk ratio is pulled toward 1 even though the hazard ratio, which compares rates among those still at risk, is unchanged. The hazard ratio and the risk ratio are close when the event is rare and diverge as it becomes common, in the same way that the odds ratio and the risk ratio diverged in Lesson 6.
Calculator 8.8 applies Equation 8.8 to translate a hazard ratio into the probability of remaining event-free, the cumulative risk, the risk ratio and the risk difference at a chosen time, and its presets include the uncommon and common events described above.
The check of the proportional hazards assumption, the summary to report if it fails and the choice of effect measure are decisions for the analysis plan, and subsection 7.1 gathers them, with the other decisions in this lesson, into the content of a protocol.
7.1 What a Protocol With a Time-to-Event Outcome Must Specify
The decisions in this lesson must be written into the protocol before data collection begins. Most of them cannot be corrected later, and stating them in advance prevents analytic choices from being shaped by the results. A protocol specifies two kinds of content: the definitions and rules that give the outcome its meaning, and the number of events, and therefore participants, needed to answer the question.
7.1.1 The Elements of the Protocol
Table 8.7 lists the elements with the Campus Connection Follow-up as the example. Each row draws on an earlier part of the lesson: time zero, eligibility, the event and the censoring rules on Section 1, and the analysis on Sections 3 and 4.
Table 8.7. Elements that a protocol with a time-to-event outcome must specify, with the Campus Connection Follow-up as the example.
| Element | What the protocol states | Campus Connection Follow-up |
|---|---|---|
| Time zero | The moment at which eligibility, exposure assignment and follow-up coincide | Date of completing the baseline survey |
| Eligibility at time zero | Criteria that make every participant event-free and at risk | Aged 18 to 29 and a baseline PHQ-9 score below 10 |
| Exposure | Measured at or before time zero, or handled as time-varying | Baseline loneliness, classified as high or low at a prespecified cut-off |
| Event | Criterion, ascertainment method, schedule and dating rule, the same in every group | First monthly PHQ-9 score of 10 or more, dated to that month |
| Follow-up | Maximum duration and assessment schedule | Monthly questionnaires for 24 months |
| Censoring rules | Definitions of loss, withdrawal, administrative end and competing events | Censored at the last completed questionnaire after three consecutive misses, at withdrawal, or at 24 months; deaths recorded as a competing event and, because they are very rare at these ages, censored in the main analysis |
| Informative censoring | Retention procedures, records of reasons, comparisons and sensitivity analyses | Reminders by e-mail and text, a reason recorded for each withdrawal, baseline comparison of censored and retained participants, and a worst-case analysis |
| Analysis | Estimators, tests, effect measure, assumption checks and alternatives | Kaplan-Meier curves with numbers at risk; survival at 12 and 24 months; log-rank test; hazard ratio from a Cox model adjusted for prespecified confounders; proportional hazards check, with restricted mean survival time as the prespecified alternative |
| Sample size | Number of events required, then participants | Computed with Equation 8.9 below |
The last row of Table 8.7, the sample size, needs a calculation of its own, which subsection 7.1.2 sets out.
7.1.2 Planning for Enough Events
The log-rank example in subsection 6.1 showed that a time-to-event comparison with few events has little power, whatever the number of participants. This is because each comparison of observed and expected events happens at an event time, so a participant who remains event-free throughout adds to the risk sets but never supplies a comparison of their own. For this reason, sample size for a time-to-event study is planned in two steps: first the number of events, and then the number of participants needed to produce them. Schoenfeld (1983) derived the number of events needed to detect a given hazard ratio with a two-sided test. The number of participants follows by dividing the required events by the proportion of participants expected to have the event during follow-up. Equation 8.9 gives both quantities.
For a new cohort designed to detect a hazard ratio of 1.8 with a two-sided significance level of 0.05 and 80 percent power, with one third of participants in the high-loneliness group, the formula gives (1.960 + 0.842)² ÷ [(1/3) × (2/3) × (ln 1.8)²] = 102.2, which rounds up to 103 events. If about 15 percent of participants are expected to screen positive within 24 months, the study needs 103 ÷ 0.15 = 687 participants (rounded up) before any allowance for loss to follow-up. The protocol targets a hazard ratio of 1.8, smaller than the 2.52 observed in the hypothetical pilot, because pilot estimates from small samples are imprecise and tend to be too large when a pilot is continued only if its results look promising, and because the target should be the smallest effect that would matter for campus mental health planning.
Calculator 8.9 evaluates Equation 8.9 and adds an allowance for loss to follow-up, with a preset for the Campus Connection protocol.
Worked Example 8.5 shows how the elements of Table 8.7 and this sample size calculation are written as the time-to-event subsection of the Campus Connection Follow-up protocol.
Worked Example 8.5: The time-to-event subsection of the Campus Connection Follow-up protocol
Outcome and follow-up. The primary outcome is time from completion of the baseline survey (time zero) to the first monthly PHQ-9 score of 10 or more. Eligible participants are adults aged 18 to 29 with a baseline PHQ-9 score below 10. Participants will receive an online PHQ-9 at the same point in each month for 24 months, with identical schedules and reminders in both loneliness groups, and an event will be dated to the month of the first qualifying score.
Censoring. Participants who miss three consecutive questionnaires will be censored at the date of their last completed questionnaire. Participants who withdraw will be censored at the date of withdrawal, and those who remain event-free will be censored administratively at 24 months. Deaths will be recorded as competing events and, because they are expected to be very rare at ages 18 to 29, censored in the main analysis. The reason for each withdrawal will be recorded, the baseline characteristics of participants censored before 24 months will be compared with those of participants followed to an event or to 24 months, and the hazard ratio will be recomputed under the assumption that every participant lost to follow-up screened positive at the time of censoring.
Analysis. Kaplan-Meier curves will be presented for each loneliness group with censoring marks and numbers at risk at 0, 6, 12, 18 and 24 months, together with the estimated probability of remaining event-free at 12 and 24 months and 95 percent confidence intervals. The groups will be compared with the log-rank test, and the hazard ratio with its 95 percent confidence interval will be estimated with a Cox model adjusted for the confounders identified in the study's causal diagram. If the proportional hazards assumption is not supported, the difference in restricted mean survival time to 24 months will be reported as the primary comparison.
Sample size. To detect a hazard ratio of 1.8 with 80 percent power at a two-sided significance level of 0.05, with one third of participants in the high-loneliness group, 103 events are required. Assuming that 15 percent of participants screen positive within 24 months, 687 participants are needed, increased to 859 to allow for 20 percent loss to follow-up.
The inflation for loss to follow-up in the last paragraph of Worked Example 8.5 divides 687 by 0.80 and rounds up, the same approach used to inflate a survey sample for expected non-response. Losses reduce the number of observed events, so a protocol that expects heavy loss should either plan a larger cohort or a longer follow-up.
This section has compared groups with the log-rank test and the hazard ratio, set out the proportional hazards assumption and its alternatives, and gathered the design decisions of the whole lesson into the content of a protocol. The note below describes how the lesson applies to writing the time-to-event subsection of a protocol, and the key takeaways and knowledge check that follow review the section before the final review of the lesson.
A protocol that follows participants over time contains a time-to-event subsection that covers each row of Table 8.7, as Worked Example 8.5 does. It states time zero and confirms that eligibility, exposure assignment and the start of follow-up coincide at that moment; defines the event, its ascertainment and its dating rule; lists every expected source of censoring and how each will be recorded; and reports the number of events and participants needed, which Calculator 8.9 computes. For a cross-sectional study, a useful check on the design is to work out what time zero, the event and the censoring rules would be if a follow-up phase were added, and which source of censoring would most threaten the non-informative censoring assumption. Informative censoring and loss to follow-up also belong in the protocol's threats to validity and mitigation subsection, described in Lesson 7 Section 4.
Key Takeaways
- 6.1 The log-rank test asks whether two survival curves differ by more than chance would produce if the groups really had the same survival at every time. At each event time it pools the participants at risk in both groups and shares the events out in proportion to each group's share of the risk set, so the expected number in group A at that time is the total number of events × nA / n; adding these over all event times gives EA, which is compared with the observed OA. When you work through a table such as Table 8.5, recount the risk set in each group at every event time (a participant censored at an event time still counts as at risk), and check that the expected events in the two groups add up to the total number of events. If OA is larger than EA, group A had more events than equal survival would predict, but whether that is more than chance depends on the test statistic and its p-value. A non-significant result with few events, such as p = 0.20 with only eight events in Worked Example 8.4, reflects low power rather than evidence that survival is the same, and your interpretation should say so.
- 6.2 The hazard is the rate at which events occur among the people who are still event-free at a given time, so it is the incidence rate from Lesson 4 computed over a short stretch of follow-up. Unlike survival, which can only stay level or fall, the hazard can rise, fall or stay constant: the hazard of death falls after major surgery, rises with age for most chronic diseases, and may be roughly constant for sudden accidental events. To estimate it from a life-table interval of width h, divide the events by the person-time at risk, approximately h × (r − d/2); for the first six months of the running case this gives 14 / [6 × (194 − 7)] = 14 / 1,122 = 0.0125 per person-month, or 1.25 per 100 person-months. A common trap is to report the conditional probability q = d/r as the hazard. The probability q covers the whole interval and has no time unit, while the hazard is a rate per unit of time, so always state its units.
- 6.3 When the hazards in both groups are roughly constant, the hazard ratio is simply the ratio of the two incidence rates, HR = (a1 / T1) / (a0 / T0), and its 95 percent confidence interval is exp[ln(HR) ± 1.96 × √(1/a1 + 1/a0)]. For the Campus Connection cohort, (42 / 3,672) / (40 / 8,800) = 2.52, with a 95 percent confidence interval from 1.63 to 3.88. Interpret it as a comparison of rates among people still at risk, using a sentence such as: at any point during the 24 months, participants with high loneliness who had not yet screened positive did so at about two and a half times the rate of participants with low loneliness. Then report the confidence interval and whether it excludes 1, and express a ratio below 1 as a lower rate (a hazard ratio of 0.65 is a 35 percent lower hazard); a hazard ratio from a Cox model is read in the same way, provided its proportional hazards assumption holds. Notice that the standard error depends only on the numbers of events, a reminder that events, not participants, carry the information in a time-to-event comparison.
- 6.4 The proportional hazards assumption says that the ratio of the hazards in the two groups stays the same throughout follow-up: each hazard may rise or fall, but they rise and fall together, so a single hazard ratio is a complete summary. You cannot see the hazards directly on a Kaplan-Meier plot, so look at the shape of the curves. Curves that separate steadily and do not cross are consistent with the assumption, while curves that cross, or that separate early and then converge, suggest that the effect changes over time. In that situation a single hazard ratio averages an early effect and a later effect into a number that describes neither period, as with surgery that carries a higher hazard just after the operation and a lower one afterwards. When you critique such a result, name the problem and suggest an alternative: separate hazard ratios for prespecified periods, the difference in survival at prespecified times, or the difference in restricted mean survival time. Remember that steadily separating curves support the assumption but do not prove it, so a formal check is still needed.
- 6.5 A hazard ratio compares event rates among people still at risk, whereas a risk ratio compares the proportions who have had the event by a fixed time, and the two drift apart as the event becomes common. Because a risk cannot exceed 1, when many people in the unexposed group have the event, the exposed group's risk has little room to rise further, so the risk ratio is pulled toward 1 even though the hazard ratio is unchanged. Under proportional hazards you can translate one into the other with S1(t) = S0(t)HR: with a hazard ratio of 2.5 and 90 percent of the unexposed group event-free, the risks are 0.100 and 0.232 (a risk ratio of 2.32), but with only 50 percent event-free they are 0.500 and 0.823 (a risk ratio of 1.65). So if a question or a colleague reads a hazard ratio of 2 as twice the risk, the correction is that this is only approximately true when the event is rare. To find the actual risks, raise the unexposed survival to the power of the hazard ratio, subtract each survival from 1, and then form the risk ratio or risk difference.
- 7.1 A time-to-event outcome is only as good as the decisions made before the first participant is enrolled, so the protocol states each of them in advance: time zero (the moment at which eligibility, exposure assignment and the start of follow-up coincide), eligibility at time zero, the exposure, the event with its ascertainment schedule and dating rule, the length and schedule of follow-up, the censoring rules, the plan for detecting and handling informative censoring, and the analysis, including how proportional hazards will be checked and what will be reported if it fails. The sample size starts from events, not people. With Equation 8.9, first calculate the number of events D needed to detect the target hazard ratio, then divide by the proportion expected to have the event during follow-up to get the number of participants, and finally divide by the proportion expected to be retained to allow for loss to follow-up. In Worked Example 8.5 this gives 103 events, 103 / 0.15 = 687 participants and 687 / 0.80 = 859 participants after allowing for 20 percent loss, with each step rounded up. Two common slips are stopping at the number of events and inflating for loss by multiplying by 1.20 instead of dividing by 0.80; Table 8.7 and Worked Example 8.5 make a good checklist when you write or critique this subsection.
1. A log-rank comparison has two event times. At the first, 30 participants are at risk in group A and 20 in group B, and 5 events occur (4 in A). At the second, 24 are at risk in A and 16 in B, and 5 events occur (4 in A). What is the expected number of events in group A if both groups had the same survival, and what does the comparison with the observed number suggest?
2. In one six-month interval of a life table, the effective number at risk is 98 and 8 events occur. Using the approximation in this section, in which the person-time at risk is the interval width × (r − d/2), what is the estimated hazard per 100 person-months?
3. In a cohort of factory workers, 36 cases of carpal tunnel syndrome occurred over 4,000 person-years in high-repetition jobs and 30 over 10,000 person-years in low-repetition jobs. Assuming constant hazards, the 95 percent confidence interval for the hazard ratio is 1.85 to 4.87. Which statement is correct?
4. A trial compares surgery with medical treatment for time to death. The Kaplan-Meier curves show more deaths after surgery in the first three months, then cross at about month 9, with better survival after surgery from then on. The report gives a single hazard ratio of 0.95 (95 percent confidence interval 0.80 to 1.13) and concludes that surgery makes no difference to survival. What is the best critique?
5. Under proportional hazards, 80 percent of unexposed participants remain event-free at three years and the hazard ratio for the exposure is 2.0. What is the three-year risk ratio?
6. A team plans a cohort study to detect a hazard ratio of 1.5 with a two-sided significance level of 0.05 and 80 percent power, with half of the participants exposed. Schoenfeld's formula gives the events needed as D = 7.849 ÷ [p(1 − p) × (ln HR)²], where p is the proportion exposed, and (ln 1.5)² = 0.1644. If 20 percent of participants are expected to have the event during follow-up, how many participants are needed before any allowance for loss to follow-up?
7. A cohort study follows adults aged 45 to 64 without hypertension for up to five years, comparing adults in food-insecure and food-secure households. The Kaplan-Meier estimates of the probability of remaining free of hypertension at five years are 0.67 in the food-insecure group and 0.80 in the food-secure group, and the hazard ratio is 1.80. A news release states that "adults in food-insecure households were 1.8 times as likely to develop hypertension within five years." Which assessment is correct?
✦ Pass the knowledge check with 100% to continue
Final Review & Assessment
⏱ Estimated time: 25 minutes
Bringing It All Together
This lesson treated time-to-event analysis as a way of estimating incidence when follow-up is incomplete. Section 1 set out the design decisions that give a time-to-event outcome its meaning (time zero, the event and the end of follow-up) and the forms of censoring that make follow-up incomplete. It showed that the shortcuts of treating censored participants as event-free or dropping them misstate the risk, and that the methods of the lesson depend on censoring being non-informative. Sections 2 and 3 estimated the probability of remaining event-free over time, first with the actuarial life table and then with the Kaplan-Meier estimator, and showed how to read survival at a time, the median, censoring marks and numbers at risk from a curve.
Section 4 compared groups. The log-rank test compares observed with expected events, the hazard ratio compares event rates among participants still at risk, and the proportional hazards assumption states that this ratio is the same throughout follow-up. Because the information in these comparisons comes from events, the number of events needed is the starting point of a sample size calculation. Each of these decisions belongs in the protocol, written before any data are collected.
Key Takeaways from this lesson
- You can now describe a time-to-event outcome as a follow-up time and an event status for each participant, specify the three design decisions that give them meaning (time zero, the event with its ascertainment and dating rule, and the end of follow-up), and turn a follow-up record into a time and a status. You can also recognize immortal time bias and lead-time bias as the result of starting the clock at the wrong moment. The most useful check on any design is to confirm that eligibility, exposure assignment and the start of follow-up coincide at time zero for every participant.
- You can distinguish right censoring (from loss to follow-up, withdrawal, moving away and the administrative end of a study) from left censoring, interval censoring and late entry by asking which part of the event time is unknown. You can explain that every method in this lesson assumes non-informative censoring, meaning that people who leave have the same future risk as those who stay. When a scenario describes higher-risk people dropping out, such as participants whose health is worsening, say that survival will be overstated and propose a design step: retention procedures, recorded reasons for withdrawal, a baseline comparison of those censored early, or a worst-case sensitivity analysis.
- You can explain why the two shortcuts fail when follow-up is incomplete: treating censored participants as event-free understates the risk, and dropping them tends to overstate it. You can also use Equation 8.1 to show that the true risk lies between E / N and (E + C) / N. Whenever you see a risk calculated as a simple proportion in a cohort with early losses, check which shortcut was used and which way it is biased.
- You can build an actuarial life table by hand, using r = l − w/2, q = d/r and p = 1 − q for each interval and multiplying the p values to obtain cumulative survival, and you can describe its assumptions: non-informative censoring, withdrawals at the midpoint on average and stable survival across enrolment dates. The practical reminder is to carry each row forward correctly, with l − w − d entering the next interval, and to report the risk as one minus the final cumulative survival.
- You can calculate a Kaplan-Meier estimate by hand, multiplying (n − d) / n at each event time while keeping censored participants in the risk set until they leave, and you can read a Kaplan-Meier curve for survival and risk at a chosen time, the median survival time (or "not reached"), the censoring marks and the numbers at risk. The most useful reminder is to count the risk set carefully at every event time and to check the numbers at risk before you trust the right-hand end of any curve.
- You can interpret the log-rank test as a comparison of observed and expected events, remembering that a non-significant result with few events reflects low power rather than equal survival. You can calculate and interpret a hazard ratio as a ratio of event rates among those still at risk, explain proportional hazards as a hazard ratio that stays the same over follow-up (doubtful when curves cross or converge), and explain why a hazard ratio moves further from the risk ratio as the event becomes common. When you put a hazard ratio into words, describe it as a rate among those still event-free rather than as a risk, and use S1(t) = S0(t)HR when you need the actual risks.
- You can plan the time-to-event subsection of a protocol, covering time zero, eligibility, the event and its ascertainment, follow-up, censoring rules, the plan for informative censoring and the analysis. You can also calculate the number of events needed to detect a target hazard ratio and turn it into a number of participants with an allowance for loss to follow-up. Remember that the sample size starts from events: divide the events by the proportion expected to have the event, then divide by the proportion expected to be retained.
Core Concepts Reviewed
Section 1: time-to-event data, time zero, the event, follow-up, right, left and interval censoring, late entry, informative and non-informative censoring, competing events, and immortal time and lead-time bias.
Section 2: the actuarial life table, conditional probabilities of the event and of survival, the effective number at risk and the half-interval assumption, and cumulative survival as a running product.
Section 3: the Kaplan-Meier product-limit estimator, risk sets at event times, ties and censoring conventions, survival at a time, median survival, censoring marks, numbers at risk and restricted mean survival time.
Section 4: the log-rank test, the hazard, the hazard ratio as a ratio of rates, proportional hazards, the relationship between hazard ratios and risk ratios, protocol elements and the number of events needed.
Final Knowledge Assessment
Complete all 17 questions below with 100% accuracy to finish this lesson. You must also pass every section knowledge check before submitting.
1. A team uses pharmacy and hospital records to compare time to a first hip fracture among adults aged 65 and older who start one of two sleep medications, drug X or drug Y. Which choice of time zero best follows the principle taught in this lesson?
2. A province introduces lung cancer screening for long-term smokers. Its annual report notes that five-year survival from diagnosis is 60 percent for screen-detected cancers and 20 percent for cancers found after symptoms appeared, and concludes that screening extends life. What is the main problem with this conclusion, and what comparison would avoid it?
3. A study of time to a first chlamydia infection among college students tests each student once a year for three years. A student who tests negative at year 1 and positive at year 2 is recorded as having the event at year 2. Which statement is correct?
4. An online cohort follows adults who start a smartphone program for problem drinking, with weekly check-ins, for time to a return to heavy drinking. Participants who miss four weekly check-ins in a row are censored at their last check-in. Staff notice that people who return to heavy drinking often stop checking in before reporting it. Which statement is correct?
5. In a cohort of 40 participants followed for two years, 10 had the event, 8 were censored before two years and 22 completed follow-up event-free. A report states that the two-year risk was 25 percent (10 of 40). Which statement best describes this estimate?
6. In a life table with three-month intervals, 80 participants enter the third interval, 16 withdraw during it and 9 have the event. Cumulative survival at the end of the second interval is 0.80. What is the cumulative survival at the end of the third interval?
7. Three analysts compute the conditional probability of the event for the same life-table interval, in which 50 participants enter, 10 withdraw and 4 have the event. Analyst 1 counts the withdrawals as fully at risk, Analyst 2 uses the actuarial half-interval rule and Analyst 3 removes the withdrawals entirely. Which statement is correct?
8. Twelve participants are followed for up to 12 months. The table gives the number of events and the number censored at each follow-up time. What are the Kaplan-Meier estimate after month 9 and the median survival time?
| Month | Events | Censored |
|---|---|---|
| 1 | 2 | 0 |
| 3 | 0 | 2 |
| 5 | 1 | 0 |
| 6 | 0 | 1 |
| 9 | 2 | 0 |
| 12 | 0 | 4 |
9. A Kaplan-Meier analysis of time to a first readmission among 400 adults discharged after heart failure reports the estimates in the table below. Which statement is correct?
| Month | Number at risk | Ŝ(t) |
|---|---|---|
| 0 | 400 | 1.00 |
| 6 | 310 | 0.82 |
| 12 | 220 | 0.71 |
| 18 | 95 | 0.64 |
| 24 | 12 | 0.52 |
10. A cohort compares time to a first diagnosis of hypertension between adults living in neighbourhoods with high traffic noise (group A) and adults in quieter neighbourhoods (group B). The log-rank output gives OA = 46, EA = 34.5, OB = 30 and EB = 41.5, with χ² = 7.4 on 1 degree of freedom and p = 0.007. Which interpretation is correct?
11. A cohort study of hospital nurses reports a hazard ratio of 1.40 (95 percent confidence interval 1.10 to 1.78) for a first needlestick injury, comparing nurses on rotating night shifts with nurses on day shifts. Which sentence interprets this result correctly?
12. In a cohort study, the Kaplan-Meier curves for two groups separate sharply in the first six months and then slowly come back together, ending at almost the same value at 36 months. The analysis plan calls for a single hazard ratio from a Cox model. Which response is most appropriate?
13. A colleague writes that a hazard ratio of 2.0 means that exposed people were twice as likely as unexposed people to have the event by five years. In this cohort, 50 percent of unexposed people had the event by five years, and proportional hazards holds. What is the five-year risk ratio?
14. A protocol aims to detect a hazard ratio of 2.0 with a two-sided significance level of 0.05 and 80 percent power, with one quarter of participants exposed. The events needed are D = 7.849 ÷ [p(1 − p) × (ln HR)²], where p is the proportion exposed, and (ln 2.0)² = 0.4805. About 10 percent of participants are expected to have the event, and 20 percent loss to follow-up is expected. How many participants should be enrolled?
15. A team is drafting the time-to-event subsection of a protocol for a study that compares time to a first relapse after discharge from a treatment program between participants offered peer mentoring and participants not offered it. Which of these draft statements is written correctly?
16. A city plans a cohort study of the time to a first return to homelessness among adults housed through its Housing First program, comparing scattered-site apartments with a supportive housing building. The wait from acceptance into the program to moving in averages about three months for the building and about two weeks for scattered-site apartments. A colleague proposes to start each participant's clock on the date of acceptance into the program. What would this create?
17. In the Housing First study, a return to homelessness is identified as a first stay in any city shelter, recorded in the city's shelter database, and participants are followed for two years with case-worker contacts every three months. Which source of censoring is most likely to be informative, and what would it do to the estimated probability of remaining housed?
✦ Pass every section knowledge check (100%) before submitting