Why Fine-Gray Data Need More Than a Zero-or-One Indicator
To prepare data for Fine-Gray regression, each person’s follow-up must retain two kinds of information: whether the target event occurred and what happened to the person’s follow-up if it did not. A target event, a competing event, and right censoring can all receive a zero in a target-specific event indicator, but they are not the same observation. A competing event is an observed event of another type; right censoring means the event time is not observed beyond the censoring time.
This distinction matters at the data-construction stage. The Fine-Gray analysis concerns the cumulative incidence of a particular cause, while its treatment of people who experience a competing cause is not the same as treating them as ordinary right-censored observations in a standard Cox model. The data must therefore preserve the original event type and observed follow-up time so that software implementing Fine-Gray regression can identify competing events and use them appropriately. The later mechanics of its risk sets are a separate issue.
Thus, \(K\) is a multi-category record of what happened, while \(\Delta_1\) is a binary indicator for the target cause. Retaining both is good practice even when a software interface also accepts a target indicator. If there are several competing causes, each should retain its own code rather than being collapsed in the source data. A model can then select the target cause without losing the ability to audit the event classifications.
Constructing a Basic Analysis Record
For a simple baseline-covariate analysis, a person-level record commonly contains an identifier, \(Y\), \(K\), \(\Delta_1\), and the covariates measured at the defined baseline. The time origin and time unit must be consistent for all participants. For example, if time is measured from randomization in days, both event and censoring times must use days from randomization—not one from enrollment and another from treatment start.
The construction follows the observed history. If the target event occurs first, use its event time and set \(K=1\). If a competing event occurs first, use that event time and its cause code, even though \(\Delta_1=0\). If the person has no observed event before follow-up ends, use the last known event-free time as \(Y\), set \(K=0\), and set \(\Delta_1=0\). A person who experiences an event is no longer at risk of a later first event in this setup; do not record a later event as the first-event outcome.
Worked Example: Coding Target Events, Competing Events, and Censoring
Suppose a hypothetical study follows eight participants from enrollment. The target event is cause 1, and causes 2 and 3 are competing events. The table gives each person’s observed time and what ended their event-free follow-up. Times are in days.
| Person | Observed outcome | Time (days) | \(Y\) | \(K\) | \(\Delta_1\) |
|---|---|---|---|---|---|
| A | Target event | 3 | 3 | 1 | 1 |
| B | Competing cause 2 | 2 | 2 | 2 | 0 |
| C | Right-censored | 4 | 4 | 0 | 0 |
| D | Target event | 5 | 5 | 1 | 1 |
| E | Competing cause 3 | 4 | 4 | 3 | 0 |
| F | Right-censored | 1 | 1 | 0 | 0 |
| G | Target event | 2 | 2 | 1 | 1 |
| H | Competing cause 2 | 6 | 6 | 2 | 0 |
For person B, the observed event is cause 2 at day 2, so \(Y=\min(T,C)=2\), \(K=2\), and \(\Delta_1=I(K=1)=0\). For person C, follow-up ends without an observed event at day 4, so \(Y=4\), \(K=0\), and \(\Delta_1=0\). Both indicators are zero, but the \(K\) values and the underlying meanings differ. For person A, \(Y=3\), \(K=1\), and \(\Delta_1=I(1=1)=1\). The table preserves the information needed to distinguish all three outcomes.
A basic count check gives three target events (A, D, and G), three competing events (B, E, and H), and two censored records (C and F). These counts add to eight, the number of participants. Such a check does not prove that every record is correct, but a mismatch is an immediate signal to investigate.
Target Selection and Software-Ready Records
The target cause is part of the specification of the analysis, not a property of the person-level record alone. If the scientific question changes from cause 1 to cause 2, the event-type data \(K\) remain unchanged, but the target indicator must be rebuilt. For cause 2, the corresponding indicator is \(I(K=2)\). Retaining a single, explicitly labelled event-type variable makes this change auditable and helps prevent accidental use of the wrong cause.
Worked Example: Rebuilding the Indicator for a Different Target
Use the records for persons A, B, C, and E in the table above, but now define cause 2—not cause 1—as the target. Their observed event-type codes are \(1,2,0,3\), respectively.
The new indicator is \(\Delta_2=I(K=2)\). The calculations are:
The observed times stay at 3, 2, 4, and 4 days, respectively; the cause codes also stay at 1, 2, 0, and 3. Only the target-specific indicator changes. If the original cause labels had been discarded and all non-target observations stored simply as zero, it would no longer be possible to recover which observations were cause 2 events when changing the target.
Software interfaces differ in how they request these data. Some accept the event time and a categorical status that identifies censoring and all event causes, with the target cause supplied separately. Others require a target indicator as well as the original event type. Follow the interface’s documented conventions, and verify which value means censoring and which value identifies the target. A generic binary-event routine for ordinary Cox regression does not become a Fine-Gray routine merely because its event indicator has been coded as target versus non-target.
This is also why the two zeros in the first example cannot be treated as interchangeable during preparation. If the competing event is recorded as though it were an ordinary censoring time and the analysis is then passed to a standard cause-specific Cox procedure, that procedure will use its own cause-specific risk-set logic. Fine-Gray procedures must know which records are competing events, rather than just being told that the target event was not observed.
Justifying the Record Construction
The mapping from the observed history to \(Y\), \(K\), and \(\Delta_1\) is direct, but it is useful to make the logic explicit. For each participant, the first observed endpoint is either an event or the end of observation. If an event occurs before censoring, its time and cause are observed. If censoring occurs first, the event time and cause are not observed, and the censoring time is the end of usable follow-up.
If \(T\le C\), the event is observed at \(T\), so \(Y=T\) and the cause \(J\) is recorded. If \(C<T\), follow-up ends first, so \(Y=C\) and \(K=0\).
When the event is observed, set \(K=1\) if \(J=1\), and set \(K=J\) if \(J\ne 1\). This keeps competing causes distinct from censoring.
Apply the definition \(\Delta_1=I(K=1)\). The indicator is 1 only for an observed target event; it is 0 for a competing event or right censoring.
Under the stipulated convention that an event observed at the censoring time is counted as observed, the comparison in step 1 uses \(T\le C\). If the study’s data protocol uses a different rule for exact ties, apply that rule consistently and document it. The essential requirement is not a particular software’s tie-handling convention; it is that the event status at a tied time is classified according to the prespecified protocol and that the event time is not silently changed.
Assumptions, Diagnostics, and Failure Modes
Correct data coding does not by itself establish that a Fine-Gray analysis is appropriate or that its estimates are unbiased. The outcome must be defined as the first occurrence among mutually exclusive causes, and the recorded cause must correspond to the stated target and competing causes. The censoring mechanism also matters: inference typically relies on censoring being independent of the event process, possibly conditional on the covariates included in the analysis, or on an appropriate model for that censoring. Coding cannot fix informative loss to follow-up or unmeasured differences that make censoring depend on event risk.
Before fitting, perform checks that target the construction rather than the later model:
- Confirm that every person has one coherent follow-up time and exactly one final status: target event, a specified competing event, or censoring.
- Check that every event time and censoring time is nonnegative, is in the same time units, and is measured from the same time origin.
- Tabulate \(K\) and compare the counts with the source records. Check that \(\Delta_1=1\) exactly when \(K=1\).
- Inspect records with unusually short or long follow-up, missing status, or an event time inconsistent with the source chronology.
- Verify the software’s cause-code convention and confirm that competing events are not being interpreted as ordinary censoring by the chosen procedure.
A common error is to code every non-target record as censored at its observed time and discard the original status. The reasoning is that the target event did not occur, so the person must be censored. The correction is that “target event not observed” is not a sufficient description: a competing event was observed, whereas right censoring leaves the event outcome unknown after the last observed event-free time. Store the original event type and let an implementation designed for Fine-Gray regression handle competing-event records according to its method.
Another error is to extend a competing-event participant’s follow-up by manually adding rows for later times. The required input for a typical person-level Fine-Gray analysis is not a hand-created sequence of fictitious post-event observations. Preserve the observed event time and competing-cause code in the source records, and use a Fine-Gray procedure that constructs the analysis representation it requires. The pseudo-risk-set construction and its weighting are technical components of the method, not a reason to invent additional observed follow-up.
How This Coding Differs From Cause-Specific Cox Data
For the cause-specific Cox model for a selected cause, a competing event ends that person’s membership in the risk set for that cause at the competing-event time. The cause-specific analysis consequently treats the competing event as a removal from that cause’s risk set. Fine-Gray regression has a different risk-set construction, designed for modeling the subdistribution hazard associated with the target cause. The distinction is not achieved by changing the numerical value of a binary indicator alone.
| Record feature | Cause-specific Cox for the target cause | Fine-Gray data preparation |
|---|---|---|
| Target event | Event for the selected cause | Event for the selected target cause |
| Competing event | Ends follow-up in that cause-specific risk set | Must remain identifiable as a competing event for the Fine-Gray procedure |
| Right censoring | Follow-up ends without an observed event | Follow-up ends without an observed event |
| Information to retain | Observed time and cause-specific event status | Observed time, original event type, and target-specific indicator or equivalent status input |
The table compares the data distinctions, not the interpretations of the fitted coefficients. Cause-specific and Fine-Gray models answer different questions and use different risk sets. For data preparation, the practical message is narrower: do not pass a target-versus-not-target binary variable to a procedure unless that procedure also has enough information and the correct method to distinguish competing events from censoring.
Fine-Gray regression also has limits. It does not make a poorly defined target outcome meaningful, repair incorrect event dates, or remove the need to assess modeling assumptions. Missing or misclassified causes can alter both the target-event count and the competing-event distribution. If causes are not mutually exclusive as recorded, or if recurrent events rather than first events are the intended outcome, the simple record definition here is not sufficient without first defining a suitable analysis framework.
Check Your Understanding
For each question, identify the coding or calculation required. Solutions follow the questions.
- A participant has a competing event at day 7, and the target cause is cause 1. What are \(Y\), \(K\), and \(\Delta_1\)?
- A participant is right-censored at day 9 without an observed event. What are \(Y\), \(K\), and \(\Delta_1\)?
- For a record with \(K=3\), calculate the indicator for target cause 3 and explain whether the observed time changes.
- Why is a competing event incorrectly described if it is stored only as “censored” and its cause code is discarded?
Solutions. (1) \(Y=7\), \(K\) is the code for that competing cause, and \(\Delta_1=0\). (2) \(Y=9\), \(K=0\), and \(\Delta_1=0\). (3) \(\Delta_3=I(K=3)=1\); the observed time does not change because changing the target changes the indicator, not the recorded history. (4) A competing event is an observed event of another cause, while censoring means the event outcome is unobserved after follow-up ends. Discarding the cause code makes those histories indistinguishable and prevents the Fine-Gray procedure from recognizing the competing event.