← Methods repository
CONCEPTADVANCEDPYTHON · R · SASlast reviewed 2026-10-11 · updated 2026-08-25 · 5 citations

Competing Risks (Cause-Specific Hazard, Cumulative Incidence, and Fine-Gray)

Time-to-event methods that distinguish the rate of an event among people still event-free (cause-specific hazard), the probability of that event before a competing event (cumulative incidence), and a regression model linked to cumulative incidence (Fine–Gray subdistribution hazard).

Inferential Statisticscompeting-risksfine-graysubdistribution-hazardcause-specific-hazardcumulative-incidence-functionaalen-johansensurvival-analysiscompeting-mortality
On this page
Methods reference only. Use primary source citations and local policy before applying this in a study protocol, regulatory submission, payer dossier, or clinical decision.
In plain language

Some events stop another event from happening: a patient who dies cannot later have a first hospitalization. Competing-risk analysis tracks these events separately. The cumulative incidence is the probability of hospitalization before death; hazard models describe different rate comparisons and must not be read as absolute probabilities.

When to use it
—When estimating absolute first-event incidence in the presence of competing events; there is no universal frequency threshold.
—Choose from the estimand. Cause-specific models can also yield CIF predictions by combining all cause-specific hazards.
—When the deliverable is a probability at a horizon rather than a time summary; the two are often reported together.
Watch out for
—Requires correct competing-event and observation-censoring coding.
—The subdistribution HR is not a risk ratio; model assumptions and predicted absolute risks need separate assessment.
—Does not summarize "event-free time gained" in intuitive time units the way RMST/mean-time-lost does.

A competing event precludes the event of interest under the stated endpoint definition. Death before a first hospitalization is the standard example. Treatment switching or transplantation is not automatically a competing event: it may instead be an intercurrent event, a censoring rule for a specified estimand, or a transition in a multistate model. Decide from the scientific question before coding the event indicator.

Three quantities, three interpretations

  • Cause-specific hazard: the instantaneous event rate among people still free of all first events. A cause-specific Cox model codes competing events as censored at their occurrence. This is a valid way to fit that model even when competing events are common or differ across groups. It does not require independent latent event times for the competing causes. Independent observation censoring, conditional on modeled covariates, and model assumptions remain relevant.
  • Cumulative incidence function (CIF): the probability of the event of interest before a competing event by time t. Aalen–Johansen estimates it by adding the event-of-interest hazard increments weighted by the probability of remaining free of all events just beforehand. People leave the observed risk set at either event. For two causes, CIF1(t) + CIF2(t) + event-free survival(t) = 1.
  • Fine–Gray subdistribution hazard: a hazard defined using an extended risk set that includes people with prior competing events, with weights accounting for observation censoring when needed. Its regression coefficient is a subdistribution hazard ratio. Under the model it indicates the direction of the CIF association, but is neither a risk ratio nor a probability difference. Predict the CIF at a specified horizon to report absolute risk.

The cause-specific and subdistribution hazard ratios can differ in direction because the CIF depends on hazards for every competing cause. A treatment associated with fewer competing deaths can leave more people able to experience the event of interest. Neither hazard ratio by itself establishes a biological mechanism or a causal effect: conditioning on remaining event-free can select different survivors across groups (Hernán 2010).

Pros, cons, and trade-offs

  • CIF versus 1 minus Kaplan–Meier with competing events censored: use CIF for observed-world absolute incidence. The Kaplan–Meier complement generally overestimates that incidence when competing events occur. There is no universal 10% threshold below which competing events may be ignored; relevance depends on the estimand and the size of the discrepancy.
  • Cause-specific Cox versus Fine–Gray: choose the hazard scale that answers the question. Cause-specific models can also generate adjusted CIF predictions by combining models for all causes. Fine–Gray provides another route to modeling a CIF. Neither is universally mandatory; reporting absolute risks and relevant cause-specific results can help interpretation.
  • CIF versus restricted mean time lost: CIF is probability by a horizon; integration of the CIF yields expected time lost to that cause over a specified horizon. Report the scale useful for the decision rather than treating these summaries as interchangeable.

When NOT to use — and when interpretation is misleading

  • Do not use Fine–Gray simply because deaths occur. For all-cause mortality, death is the event itself. For repeated hospitalizations followed by death, first-event CIF discards recurrent burden; consider recurrent-event or multistate methods.
  • Do not recode informative loss to follow-up as a competing event. The event may still happen after observation stops. Address censoring with assumptions and, where justified, methods such as IPCW.
  • Do not describe a subdistribution HR of 0.79 as a 21% reduction in absolute risk or a risk ratio of 0.79. Obtain predicted risks first.
  • Do not interpret a cause-specific HR as an automatic causal effect on biology. Confounding, measurement, model fit, and survivor selection remain relevant.

Data-source operational depth

  • Claims: build mutually exclusive first-event records from reconciled event, death, and end-of-observation dates. An inpatient discharge-death flag misses out-of-hospital deaths. Assess the specific mortality source. Medicare enrollment mortality and FFS utilization have different capture mechanisms; lack of FFS medical claims during Medicare Advantage enrollment does not itself prove death is missing.
  • EHR: assess deaths outside the health system and visit-driven outcome capture. A missing visit is not proof of event-free survival. Interval-observed progression requires additional attention beyond an ordinary exact-date competing-risk model.
  • Registry: distinguish adjudicated cause of death from all-cause mortality and uncertain causes. Linkage may improve ascertainment, but assess its completeness and selection.
  • Linked data: specify date precedence, same-day event/death rules, source agreement, and sensitivity analyses. Loss of linkage and competing death are different mechanisms.

Worked claims example

The five records below are synthetic. For first febrile-neutropenia (FN) hospitalization by day 180 after chemotherapy initiation, death before FN is competing and data end is censoring. Compare Aalen–Johansen CIF with the incorrect use of 1 minus Kaplan–Meier as the FN probability. If comparing actual treatment groups, additional design and confounding work would be required; this arithmetic example makes no treatment-effect claim.

Interpreting the output

A cause-specific HR of 0.68 is a comparison of FN rates among the respective groups still event-free. A Fine–Gray HR of 0.79 is a comparison on the subdistribution-hazard scale. These illustrative values do not specify either group's absolute FN risk. Report estimated CIFs, a defined time horizon and uncertainty before translating results into a risk comparison.

Decision diagram

flowchart TD
  S["Start: alive and event-free"] --> E["Event of interest"]
  S --> D["Competing death"]
  S --> C["Observation ends before either event"]
  D --> AJ["Aalen-Johansen: leave event-free risk set; update all-event survival"]
  D --> CS["Cause-specific Cox: code as censored at death"]
  D --> FG["Fine-Gray: remain in extended risk set"]
  C --> O["Observation-censoring assumptions remain necessary"]
Aalen–Johansen and Fine–Gray do not use the same risk set. Coding death as censored is correct for a cause-specific Cox model, but 1 minus a Kaplan–Meier curve that censors death is not the observed-world event probability.
flowchart TD
  Q{"What quantity answers the question?"} -->|Probability before a competing event| CIF["Cumulative incidence at a defined horizon"]
  Q -->|Rate among those still event-free| CS["Cause-specific hazard model"]
  CIF --> AJ["Descriptive: Aalen-Johansen"]
  CIF --> AD["Adjusted: combine cause-specific models or use a CIF model"]
  AD --> FG["Fine-Gray is one option; its HR is not a risk ratio"]
  CS --> R["Report model assumptions and avoid automatic causal interpretation"]
  AJ --> R
  FG --> R
Choose the method from the estimand. Competing-event frequency does not determine whether a cause-specific Cox model is valid, and Fine–Gray is not required to estimate an adjusted CIF.

Worked example

Scenario

Five synthetic patients begin follow-up at chemotherapy initiation. Two have FN admissions, two die first, and one reaches day 180 event-free. Estimate FN probability before death, distinguishing it from the Kaplan–Meier complement with deaths censored.

Dataset

Synthetic first-event records; event type 1 = FN, 2 = death, 0 = observation ends.

person_idfu_daysevent_typeevent_label
1001451FN hospitalization
1002602Death (competing)
1003901FN hospitalization
10041202Death (competing)
10051800Censored (end of window)
FIG. 1 — DESIGN TIMELINE
Five follow-up bars end at FN on days 45 and 90, death on days 60 and 120, or censoring on day 180. Labels show a 40% FN CIF versus a 46.7% Kaplan–Meier complement.
Each patient leaves the observed event-free risk set at FN, death, or censoring. Aalen–Johansen accounts for competing death through survival free of all events before each FN increment, yielding 40% FN incidence.

Steps

1Order the records by follow-up time: 45, 60, 90, 120, 180 days.
2Both Aalen–Johansen and cause-specific Cox remove people from the observed event-free risk set at either event. Fine–Gray has a different, extended risk-set definition.
3For the Kaplan–Meier FN curve with death coded as censored, survival falls to 4/5 at day 45 and is multiplied by 2/3 at day 90. The three then at risk are patients 1003, 1004 and 1005; patient 1004 dies later at day 120.
4The corresponding 1-minus-KM estimate is 1 - (4/5)*(2/3) = 0.4667. It does not estimate FN probability before death.
5For Aalen–Johansen, the day-45 FN increment is 1*(1/5) = 0.20. Event-free survival then becomes 0.80.
6At day 60, the death contributes no FN increment. It reduces survival free of all events to 0.80*(3/4) = 0.60 and removes patient 1002 from the risk set.
7At day 90, the FN increment is 0.60*(1/3) = 0.20. Adding the FN increments gives 0.20 + 0.20 = 0.40.
8After the second death, the death CIF is also 0.40 and event-free survival is 0.20. These sum with the FN CIF to one.

Result

FN cumulative incidence by day 180 is 0.40 (40%). The Kaplan–Meier complement is 0.4667 (46.7%), an overstatement of approximately 6.7 percentage points for this synthetic dataset.

Trade-offs

vs. 1 minus Kaplan–Meier with competing events censored
Pros of this
—Estimates the observed-world probability of the event before a competing event.
vs. Cause specific hazards (Cox) regression
Pros of this
—Fine–Gray links covariates to a CIF through a subdistribution-hazard model.
vs. RMST / restricted mean time lost to each cause
Pros of this
—The CIF answers probability-by-time-t questions directly and is the standard absolute-risk currency for labels and HTA.

Code example

Execution not verified · inspect inputs and dependencies before use

Arm-stratified Aalen-Johansen cumulative incidence from a claims-shaped, one-row-per-person analytic table. Required input (already cleaned, mutually-exclusive first-event coding done upstream): cohort : person_id, arm (str), fu_time (days from index to first event/censor, float), event_type (int) where 0 =...

requires: pandas · lifelines
import pandas as pd
from lifelines import AalenJohansenFitter, CoxPHFitter

EOI = 1            # event of interest
HORIZONS = [365, 730]   # 12 and 24 months, in days

def cif_by_arm(cohort: pd.DataFrame, horizons=HORIZONS) -> pd.DataFrame:
    """Aalen-Johansen CIF of the event of interest, per arm, at fixed horizons.

    The CIF weights each event-of-interest hazard increment by survival free
    of all events just before that time. A competing event reduces this
    survival and removes that person from subsequent observed risk sets.
    """
    rows = []
    for arm, g in cohort.groupby("arm"):
        ajf = AalenJohansenFitter(calculate_variance=True)
        # event_of_interest=1 tells lifelines which code is the EOI; all other
        # non-zero codes are handled as competing (not as censoring).
        ajf.fit(g["fu_time"], g["event_type"], event_of_interest=EOI)
        cif = ajf.cumulative_density_
        ci = ajf.confidence_interval_
        for h in horizons:
            # step function: value at the last observed time <= horizon
            at = cif.loc[cif.index <= h]
            lo = ci.loc[ci.index <= h]
            rows.append({
                "arm": arm, "horizon_days": h,
                "cif_eoi": float(at.iloc[-1, 0]) if len(at) else 0.0,
                "cif_lower": float(lo.iloc[-1, 0]) if len(lo) else 0.0,
                "cif_upper": float(lo.iloc[-1, 1]) if len(lo) else 0.0,
            })
    return pd.DataFrame(rows)

def cause_specific_cox(cohort: pd.DataFrame, covariates: list[str]) -> CoxPHFitter:
    """Cause-specific HR for the EOI: code competing events as censored (0),
    EOI as the event (1). This models the conditional cause-specific event rate
    among people still event-free,
    NOT the probability scale -- pair it with cif_by_arm()."""
    d = cohort.copy()
    d["event"] = (d["event_type"] == EOI).astype(int)  # competing -> 0 (censored)
    cph = CoxPHFitter()
    cph.fit(d[["fu_time", "event"] + covariates], duration_col="fu_time", event_col="event")
    return cph

Citations

FOUNDATIONAL / METHODS
  1. [1]Fine JP, Gray RJ. A proportional hazards model for the subdistribution of a competing risk. Journal of the American Statistical Association. 1999;94(446):496-509.
  2. [2]Austin PC, Lee DS, Fine JP. Introduction to the analysis of survival data in the presence of competing risks. Circulation. 2016;133(6):601-609.
  3. [3]Hernán MA. The hazards of hazard ratios. Epidemiology. 2010;21(1):13-15.
APPLIED EXAMPLES
  1. [4]Lau B, Cole SR, Gange SJ. Competing risk regression models for epidemiologic data. American Journal of Epidemiology. 2009;170(2):244-256.
REPORTING & GUIDANCE
  1. [5]Austin PC, Fine JP. Practical recommendations for reporting Fine-Gray model analyses for competing risk data. Statistics in Medicine. 2017;36(27):4391-4400.