Why Event Coding Matters
A cumulative incidence analysis starts with a record for each subject: how long the subject was observed, and what happened by the end of that observation. The record must distinguish a terminal event of a specified cause from right censoring. It must also preserve a third situation that is easy to mishandle: a terminal event is known to have occurred, but its cause cannot be determined. That is an event with an unresolved cause, not a censored observation.
The distinction is consequential. A subject censored while known to be event-free contributes follow-up up to the censoring time. A subject with an observed terminal event has experienced an event at its recorded time, even if the cause label is missing. Coding the latter as censored erases known event information and changes the data presented to any subsequent estimator. This tutorial focuses on constructing and checking these records; it does not calculate a cumulative incidence estimator.
Time, Event Status, and Cause
Suppose each subject is followed from a defined origin, such as enrollment, until the first terminal event or the end of observation. Let \(T_i\) denote the time to the first terminal event for subject \(i\), if it occurs, and let \(J_i\) denote its cause, taking one of the values \(1,\ldots,K\). Let \(C_i\) be the time at which observation ends because of right censoring. For example, censoring can occur at the planned end of follow-up or at the last time the subject is known to be event-free.
If a terminal event is observed before observation ends, then \(Y_i=T_i\), and the record carries the event cause when known. If observation ends first, then \(Y_i=C_i\), and the subject is coded as right-censored. A tie between the event and censoring times must be handled using the study’s prespecified observation and date-resolution rules; the code should not be chosen after inspecting which choice is convenient.
This notation describes the record when observation is complete enough to determine which event or censoring time was observed. In actual data, the event time or cause may be uncertain, dates may conflict, or the event indicator may be missing. Such uncertainty should be represented and investigated rather than silently converted to a known cause or to censoring.
Building a Data Record
A robust data set makes event occurrence and event cause separately recoverable. One practical layout has a follow-up time field, an event indicator, and a cause field. The event indicator distinguishes a known terminal event from right censoring; the cause field identifies the event type or records that the cause is unresolved. The particular numeric codes are study-specific and must be documented. For instance, a code of 0 may mean censoring in one data set and “unknown cause” in another, so a number alone is not self-explanatory.
| Record status | Follow-up time | Event indicator | Cause field |
|---|---|---|---|
| Known terminal event | Time of event | Event | One specified cause |
| Terminal event, cause unresolved | Time of event | Event | Unknown or unresolved |
| Right censoring | Last time known event-free | No event observed | Not applicable |
A single status field can also represent these cases, provided that distinct, documented values are used for every known cause, right censoring, and unresolved event cause. A separate event indicator is often safer because it prevents an unknown cause from being mistaken for a censoring code. Either layout is acceptable if it preserves the same information and downstream software is given the correct coding map.
Worked Example: Turning Follow-Up Notes Into Records
Consider eight hypothetical subjects followed from day 0. The study has two terminal event causes: cause 1 and cause 2. The notes report: A had cause 1 on day 4; B had cause 2 on day 7; C had no event and was last confirmed event-free on day 5; D had cause 1 on day 3; E had a terminal event on day 6 but its cause could not be established; F was event-free at the planned end of observation on day 8; G had cause 2 on day 2; and H had cause 1 on day 9.
| Subject | Observed time \(Y_i\) (days) | Record status | Reason |
|---|---|---|---|
| A | 4 | Event, cause 1 | Cause 1 occurred on day 4 |
| B | 7 | Event, cause 2 | Cause 2 occurred on day 7 |
| C | 5 | Right-censored | Last known event-free on day 5 |
| D | 3 | Event, cause 1 | Cause 1 occurred on day 3 |
| E | 6 | Event, cause unresolved | Terminal event established on day 6 |
| F | 8 | Right-censored | Event-free through planned follow-up |
| G | 2 | Event, cause 2 | Cause 2 occurred on day 2 |
| H | 9 | Event, cause 1 | Cause 1 occurred on day 9 |
For subject E, the observed time is day 6 because the event is established at that time. The cause field is unresolved, but the event indicator remains “event.” For C and F, by contrast, no terminal event has been established during observation, so their records are right-censored at days 5 and 8. Treating E as censored would incorrectly claim that E was known to be event-free through day 6.
Why Cause Ambiguity Limits What Can Be Estimated
When all terminal events have known causes and follow-up is complete through a fixed horizon, the empirical cumulative incidence for a cause is the proportion of the cohort that experienced that cause by the horizon. If some event causes are unresolved, the exact cause-specific proportion cannot generally be recovered from the recorded data alone. Confirmed counts remain useful, but they are not the full cause-specific counts.
Worked Example: Confirmed Counts Versus Unresolved Causes
In a hypothetical cohort of 20 subjects, everyone’s event status is known through a fixed horizon, so there is no censoring before that horizon. By the horizon, 4 subjects have confirmed cause 1 events, 3 have confirmed cause 2 events, 1 has a terminal event with unresolved cause, and 12 have had no terminal event.
The proportions with confirmed cause 1 and cause 2 events are, respectively,
These are proportions with confirmed causes, not necessarily the exact empirical cumulative incidences for the two causes. If the unresolved event was cause 1, the cause 1 proportion would be \(5/20=25\%\) and the cause 2 proportion would remain \(3/20=15\%\). If it was cause 2, the corresponding proportions would be \(4/20=20\%\) and \(4/20=20\%\). Under the stated two-cause possibilities, the compatible ranges are therefore 20%–25% for cause 1 and 15%–20% for cause 2. These ranges express uncertainty about the cause assignment; they are not confidence intervals.
This simple calculation relies on the example’s complete status information through the horizon. With right censoring before the horizon, dividing confirmed event counts by the cohort size would not generally estimate cumulative incidence at that horizon. Estimation under censoring requires additional methods and assumptions, which are treated separately in the course.
Checks, Corrections, and Competing Data Layouts
Before analysis, compare the event indicator, event date, cause code, censoring date, and source documentation. The basic consistency rules are straightforward: a known event requires an event time and a valid cause; an unresolved event requires an event time and an explicit unresolved-cause status; a right-censored record requires a censoring time and no established terminal event by that time. A record that violates one of these rules needs review.
Worked Example: Resolving a Conflicting Status Record
A hypothetical database entry says that a subject had a terminal event on day 14, gives cause code 0, and lists last contact on day 18. The codebook defines cause codes 1 and 2 as known event causes and 0 as “no event observed.” Those fields conflict: a terminal event is recorded, but the status code says no event.
The analyst should not automatically set the subject’s follow-up time to day 18 and code right censoring. First, check the source record and codebook to determine whether the event report is valid and what code 0 means in this data set. If the event on day 14 is confirmed but its cause cannot be resolved, the corrected analysis record has \(Y_i=14\), event status “event,” and cause “unresolved.” The day-18 contact does not replace the established event time.
If review instead shows that the day-14 entry was an erroneous event report and the subject was confirmed event-free through day 18, then the record can be right-censored at day 18. If neither account can be resolved, retain a data-quality flag and document the ambiguity; do not choose a status merely to make the row fit the expected codes.
There are two common data layouts. A single categorical status field is compact and can be convenient for software, but only if every category has a unique, documented meaning. Separate event-indicator and cause fields make the distinction between “no event” and “event, cause unknown” more visible and easier to validate. Neither layout repairs poor ascertainment: both require reliable definitions of the origin, terminal event, event time, causes, and end of observation.
Cause adjudication, treating an unresolved cause as a separate category, or using a justified imputation strategy are possible responses to missing cause information. They answer different questions and rely on different information or assumptions. Assigning every unresolved event to a known cause without support is not a neutral data-cleaning choice. Likewise, coding an unresolved event as censoring does not solve the missing-cause problem: it changes a known event into an apparent event-free observation. If unresolved causes remain, report their number and consider how the conclusions depend on plausible cause assignments.
Derivation and Assumptions Behind the Record
The observed-time formula follows directly from what can be seen during follow-up. If the terminal event occurs no later than observation ends, \(T_i\le C_i\), the event time is observed and is earlier than or equal to the censoring time. Thus \(Y_i=\min(T_i,C_i)=T_i\). If observation ends before a terminal event, \(C_i<T_i\), then the event time is not observed; the known follow-up ends at \(C_i\), so \(Y_i=\min(T_i,C_i)=C_i\). This gives the event-versus-censoring record, while cause information is attached only when a terminal event has occurred and its cause is established.
For this representation to be meaningful, the time origin and time units must be consistent across subjects; the terminal event must be defined; causes must be mutually exclusive labels for the relevant first terminal event; and the end of observation must be recorded. A right-censored subject must be known to be event-free through the recorded censoring time. These are requirements for defining the data record, distinct from the assumptions needed to estimate cumulative incidence. In particular, independent censoring is a separate assumption for estimation; correct coding alone does not establish it.
Common Mistakes and Limits
- Wrong: “The cause is missing, so the subject is censored.” Correction: If the terminal event is established, retain its event time and code the cause as unresolved.
- Wrong: “A follow-up date exists, so that must be the observed time.” Correction: Use the event time when an event is established during follow-up; use the last known event-free time only for right censoring.
- Wrong: “The count of confirmed events equals the cumulative incidence.” Correction: It equals the cause-specific event proportion only when cause information is complete and follow-up status is complete for the stated horizon. Unresolved causes make exact cause-specific counts uncertain.
- Wrong: “Code 0 always means censored.” Correction: Codes are meaningful only through the data dictionary. Verify whether a value means censoring, unknown cause, or something else.
- Wrong: “Valid coding guarantees a valid estimate.” Correction: Coding preserves observed information, but estimates also depend on appropriate study definitions, data quality, and the assumptions of the chosen method.
The introductory material on cumulative incidence as an event probability motivates why cause-specific outcomes matter. Here the practical limitation is more basic: if event occurrence, time, or cause is not reliably recorded, a later calculation cannot recover the missing information by itself. Clear coding makes that limitation visible instead of disguising it.
Check Your Understanding
Answer each question using the distinction between event occurrence, cause, and right censoring.
- A subject has a confirmed terminal event on day 11, but the cause cannot be determined. What follow-up time and status should be recorded?
- A subject is confirmed event-free at day 6 and has no later contact. What time and status should be recorded?
- In a complete, uncensored cohort of 30 subjects through a fixed horizon, 5 have confirmed cause 1 events and 2 have cause-unresolved events. What is the confirmed cause 1 proportion, and what range is compatible with assigning the two unresolved events to cause 1 or another cause?
- A row lists an event on day 9, a codebook status of “censored,” and last contact on day 13. What should an analyst do before creating the analysis record?
Solutions. (1) Record \(Y_i=11\), event status, and an unresolved cause; do not code the subject as right-censored. (2) Record \(Y_i=6\) and right-censoring, because no terminal event is established through the last known event-free time. (3) The confirmed cause 1 proportion is \(5/30=0.1667\), or 16.7%. If both unresolved events were cause 1, it would be \(7/30=0.2333\), or 23.3%; if neither were cause 1, it would remain 16.7%. Thus the compatible range is 16.7%–23.3%, assuming the two unresolved events belong to other causes or cause 1 and status is complete through the horizon. (4) Check the source data and codebook, because the reported event and censoring status conflict. If the day-9 event is confirmed but its cause is unresolved, record an event at day 9 with unresolved cause; if the event report is disproved and event-free follow-up through day 13 is confirmed, record right censoring at day 13. If unresolved, flag and document the conflict rather than silently selecting a status.