This function nonparametrically estimates the potential cumulative incidence function
using while on treatment strategy (competing risks data structure). This strategy can be understood
as the competing risks model, which gives the subdistribution of the primary event.
surv.whileon(A, Time, cstatus, weights = rep(1, length(A)), subset = NULL)
Arguments
- A
Treatment indicator, 1 for treatment and 0 for control.
- Time
Time to event.
- cstatus
Indicator of event, 1 for the primary event, 2 for the intercurrent event, 0 for censoring.
- weights
Weight for each subject.
- subset
Subset, either numerical or logical.
Value
A list including
- time1
Time points in the treated group.
- time0
Time points in the control group.
- cif1
Estimated cumulative incidence function in the treated group.
- cif0
Estimated cumulative incidence function in the control group.
- se1
Standard error of the estimated cumulative incidence function in the treated group.
- se0
Standard error of the estimated cumulative incidence function in the control group.
- time
Time points in both groups.
- ate
Estimated treatment effect (difference in cumulative incidence functions).
- se
Standard error of the estimated treatment effect.
- p.val
P value of testing the treatment effect based on Gray test.
Details
The while on treatment strategy considers the measure of outcome variables taken only up to
the occurrence of intercurrent events. The failures of primary outcome events should not be
counted in the cumulative incidences if intercurrent events occurred. The difference in
counterfactual cumulative incidences under this strategy is
\tau(t) = P(T(1) < t, R(1) \geq t) - P(T(0) < t, R(0) \geq t),
representing the difference in probabilities of experiencing primary outcome events without
intercurrent events during (0,t) under active treatment and placebo. The cumulative
incidence function is also known as the cause-specific cumulative incidence or subdistribution
function.
The while on treatment strategy is closely related to the competing risks model. However,
for causal interpretations, it is worth emphasizing that the hazard of R(1) may differ
from that of R(0), leading to vast difference in the underlying features of individuals
who have not experienced the primary outcome event between treatment conditions at any time
t \in (0,t^*), where t^* is the end of study. When the scientific question of
interest is the impact of treatment on the primary outcome event, the estimand \tau(t)
is hard to interpret if a systematic difference in the risks of intercurrent events between two
treatment conditions under comparison is anticipated.