Functions & Formulae

Each applied formula has its own function page, with a signature, implementations, and tests.

Cause-specific cumulative incidence and subdistribution hazard from competing event records

c(t_i, e_i) = (S(t), F_1(t), F_2(t), H_1(t), H_2(t), lambda_1(t)); F_1(t) = integral_0^t S(u) * h_1(u) du

Takes records of the time to each patient's first event, with the event type or a censoring flag, and returns event-free survival S(t), the cumulative incidence F_1(t) and F_2(t) of each cause, the cumulative cause-specific hazards H_1(t) and H_2(t) and the subdistribution hazard lambda_1(t). The constant-hazard closed form of the cumulative incidence is live as HE-FM-TP-004 with Delta read as t, and its k-exit form adds only more terms, so neither is restated. The survival part of each step takes the form of the Kaplan-Meier step HE-FM-ADMC-002 with all causes counted as events, and the error of one minus Kaplan-Meier for one cause is HE-ER-AR-002. For two groups, HE-FM-COMR-004 carries the factor in HE-FM-COMR-003 to the subdistribution relative hazard sdRH(t). Notation follows the Competing Risks article.

  • Cumulative incidence step of each cause at an observed event time

    S = S_prev * (1 - (d_1 + d_2) / n); F_1 = F_1_prev + S_prev * d_1 / n; F_2 = F_2_prev + S_prev * d_2 / n

    Updates the probability of having had each competing event when first events are observed at a time s. A patient reaches cause 1 at s only by staying free of every event until just before s and then having cause 1, so the increment is S_prev times the share d_1 / n of the risk set, a pathway probability of the form HE-FM-CHN-002. Adding these increments over the event times estimates the integral in the Function row, as Table 1 of Andersen and colleagues does. S falls with both causes together, in the form of HE-FM-ADMC-002 with d_j equal to d_1 + d_2, a record written for administrative censoring (HE-AS-ADMC-002), with the same product given by Andersen and colleagues under independent censoring. Because S_prev carries the competing events, each cumulative incidence depends on the other cause.

  • Nelson-Aalen step of each cumulative cause-specific hazard

    H_1 = H_1_prev + d_1 / n; H_2 = H_2_prev + d_2 / n; H_all = H_1 + H_2

    Adds the share of the risk set having each cause at time s to the running total for that cause, the Nelson-Aalen estimator applied to cause-specific hazards, an increment the Breslow baseline step of a Cox model also has at a coefficient of 0 (derived). A patient with the competing event leaves the risk set as if censored, a treatment Andersen and colleagues accept for cause-specific hazards. The two running totals add up to the cumulative hazard of any event. The slope of the curve estimates the hazard, the input a state-transition model needs, and a straight line over time is what the constant hazards of HE-FM-TP-004 would produce (derived). A running total is not a probability, and once competing events exist 1 minus exp of minus H_1 does not convert it to one (HE-AS-CUMH-001).

  • Subdistribution hazard from the cause-specific hazard, competing cumulative incidence and event-free survival

    lambda_1 = h_1 / (1 + F_2 / S)

    Converts a cause-specific hazard h_1 at time t into the subdistribution hazard lambda_1 of the same event. The subdistribution risk set keeps patients who have already had the competing event, and F_2 / S sizes that group against those still event free, so the same events are spread over a larger risk set. Lau and colleagues print this relation as equation (A1), crediting Beyersmann and colleagues. It agrees with their equation (3), f* over 1 minus F*, because S + F_1 + F_2 = 1 (derived). Under constant hazards F_2 and S come from HE-FM-TP-004 with Delta read as t, and the result then falls with time from h_1 when the competing hazard is above 0 (derived, checked on a grid of hazards and times).

  • Subdistribution relative hazard implied by a cause-specific relative hazard at a given time

    A_1 = 1 + F_12 / S_1; A_0 = 1 + F_02 / S_0; sdRH = csRH * A_0 / A_1

    Gives the ratio of subdistribution hazards between an exposed and an unexposed group at time t from the cause-specific relative hazard. Lau and colleagues print the relation as equation (5) in the direction csRH = (A_1 / A_0) sdRH, and it is solved here for sdRH. Each of A_1 and A_0 is the factor 1 + F_2 / S of HE-FM-COMR-003 in one group. When the competing hazard is 0 in both groups, both factors are 1 and the two ratios agree, as Lau and colleagues state. A treatment with a constant cause-specific relative hazard does not in general have a constant sdRH, which the article's drug shows at 1 and 10 years (derived).

This set of formulae is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/concept/competing-risks/formulae