Red Door Analytics
Resources · Primer

What is the cumulative incidence function?

What the cumulative incidence function is, how the Aalen–Johansen estimator builds it from a small example, how to compare groups and what to report.

Primer6 min readUpdated 22 October 2026Reviewed 22 October 2026

The cumulative incidence function (CIF) gives the probability of having had a particular event by time t when other events can happen first. In a study where patients can relapse or die without relapsing, the CIF for relapse at 12 months is the probability of having relapsed by 12 months, with a patient who died first counted as someone who did not relapse. It is the risk of an event when competing risks are present, and it is built from the rates of every event, not only of the one you are interested in.

With a single type of event the CIF is one minus the Kaplan–Meier estimate. With competing events the two differ, and the CIF is the one that estimates the risk (Austin et al., 2016).

Definition

Let T be the time of the first event of any type. The cumulative incidence of event type k is Fk(t)=Pr(T≤t, type k)=∫0tS(u)hk(u)du, where S(u) is the probability of having had no event of any type by time u, and hk(u) is the cause-specific hazard of type k. In words: the probability of still being event-free, times the rate of type k at that moment, added up over time.

  • Every cause-specific hazard matters. S(u) falls whenever any event happens, so the cumulative incidence of one event depends on the hazards of all the others. A group with a higher rate of the competing event can have a lower cumulative incidence of the event of interest at the same cause-specific hazard.
  • The pieces add up. At every time, the cumulative incidences of all event types and the probability of being event-free sum to 1.

How it is estimated, step by step

The usual nonparametric estimator is the Aalen–Johansen estimator, which, like Kaplan–Meier, assumes that censoring is unrelated to the outcome. At each time at which an event of type k happens, add the probability of being event-free just before that time multiplied by the share of the patients at risk who had the event. Patients who are censored leave the risk set without adding anything, and a patient who has a competing event leaves it too, having already been counted in the fall of S.

A small example. Ten patients are followed after treatment. Relapse is event 1 and death without relapse event 2. The times in months are: 2 relapse, 3 death, 4 censored, 5 relapse, 6 death, 8 relapse, 9 censored, 11 death, 12 relapse, 14 censored.

  • Month 2: 10 at risk, one relapse. Before it the probability of being event-free is 1, so the cumulative incidence of relapse rises by 1 × 1/10 = 0.1000. Event-free falls to 0.9000.
  • Month 3: a death among 9 at risk. Relapse is unchanged at 0.1000, and event-free falls to 0.9000 × 8/9 = 0.8000. The cumulative incidence of death is 0.9000 × 1/9 = 0.1000.
  • Month 4: a patient is censored, leaving 7 at risk. Nothing else changes.
  • Month 5: 7 at risk, one relapse. Relapse rises by 0.8000 × 1/7 = 0.1143, to 0.2143. Event-free falls to 0.6857.
  • Month 6: a death among 6 at risk. Event-free falls to 0.5714, and death reaches 0.2143.
  • Month 8: 5 at risk, one relapse. Relapse rises by 0.5714 × 1/5 = 0.1143, to 0.3286. Event-free falls to 0.4571.
  • Months 9 to 11: a censoring at month 9, then a death among 3 at risk at month 11. Death reaches 0.3667, and event-free falls to 0.3048.
  • Month 12: 2 at risk, one relapse. Relapse rises by 0.3048 × 1/2 = 0.1524, to 0.4810. Event-free falls to 0.1524.

By month 12 the cumulative incidence of relapse is 0.4810, that of death without relapse 0.3667, and the probability of being event-free 0.1524, which add to 1 apart from rounding. One minus Kaplan–Meier, with the three deaths treated as censored, would give 0.6914 for relapse. It counts the patients who died as if they could still relapse, which is the mistake explained in Censoring a competing event.

Reading a cumulative incidence curve

  • It is a risk. Read the value at a time as the probability of having had the event by then, with the competing events allowed for. It is no higher than one minus Kaplan–Meier, which treats the patients who had a competing event as if they could still have the event.
  • It never falls. A flat stretch means that no event of that type was seen there, which does not mean the hazard is zero. The curve for one event can level off because few patients are left event-free, whichever event removed them.
  • Plot every event. The curves of all events, stacked, fill the space up to the probability of having had any event, and what is left is the probability of being event-free.

Comparing groups and adding covariates

  • Gray's test compares the cumulative incidence of one event between groups (Gray, 1988).
  • Cause-specific hazard models, one for each event, describe how covariates change the rates. Their predictions combine into a cumulative incidence for a given patient, which needs the model of every event.
  • The Fine–Gray model is a regression for the cumulative incidence itself, through the subdistribution hazard (Fine and Gray, 1999).
  • Report both views. Latouche et al. (2013) argue that a competing risks analysis should report the cause-specific hazards and the cumulative incidences side by side.

What to report

  • The number of patients with each event, the competing events included, and the number censored.
  • The cumulative incidence of the event of interest and of each competing event at stated times, with 95% confidence intervals.
  • How the events were defined and which patients count as having had a competing event.
  • The number at risk below the plot, remembering that it excludes patients who have had a competing event.
  • Which estimator was used, and, for a hazard ratio, whether it is cause-specific or subdistribution.

In software

In R, cuminc() in the cmprsk package estimates cumulative incidence and tests it between groups, and survfit() in the survival package gives Aalen–Johansen estimates when the event status is a factor. In Stata, the user-written stcompet (Coviello and Boggess, 2004) estimates it and stcrreg fits the Fine–Gray model. After a merlin model for each cause, predict with cif and outcome(#) gives the model-based cumulative incidence of that cause, as in Joint longitudinal and competing risks models; Competing risks in merlin fits the cause-specific models.

Want to learn more?

Need this applied to your own data?

Tell us what you're modelling and we'll point you to the closest worked example — or build one with you.

Get in touch Start a project