R/scr_whileon_eff.R
scr.whileon.eff.RdThis function estimates the potential cumulative incidence function based on efficient influence functions using while on treatment strategy (semicompeting risks data structure). Cox models are employed for survival models. This strategy can be understood as the competing risks model, which gives the subdistribution of the primary event.
scr.whileon.eff(A, Time, status, Time_int, status_int, X = NULL, subset = NULL)Treatment indicator, 1 for treatment and 0 for control.
Time to the primary (terminal) event.
Indicator of the primary (terminal) event, 1 for event and 0 for censoring.
Time to the intercurrent event.
Indicator of the intercurrent event, 1 for event and 0 for censoring.
Baseline covariates.
Subset, either numerical or logical.
A list including
Time points in the treated group.
Time points in the control group.
Estimated cumulative incidence function in the treated group.
Estimated cumulative incidence function in the control group.
Standard error of the estimated cumulative incidence function in the treated group.
Standard error of the estimated cumulative incidence function in the control group.
Time points in both groups.
Estimated treatment effect (difference in cumulative incidence functions).
Standard error of the estimated treatment effect.
P value of testing the treatment effect based on the efficient influence function of the restricted mean survival time lost by the end of study.