Type: | Package |
Title: | Treatment Effect Estimation for Time-to-Event Data with Intercurrent Events |
Version: | 1.0.1 |
Author: | Yuhao Deng [aut], Yi Zhou [cre] |
Maintainer: | Yi Zhou <yzhou@pku.edu.cn> |
Description: | Analyzing treatment effects in clinical trials with time-to-event outcomes is complicated by intercurrent events. This package implements methods for estimating and inferring the cumulative incidence functions for time-to-event (TTE) outcomes with intercurrent events (ICEs) under the five strategies outlined in the ICH E9 (R1) addendum, see Deng (2025)<doi:10.1002/sim.70091>. This package can be used for analyzing data from both randomized controlled trials and observational studies. In general, we have a primary outcome event and possibly an intercurrent event. Two data structures are allowed: competing risks, where only the time to the first event is recorded, and semicompeting risks, where the times to both the primary outcome event and intercurrent event (or censoring) are recorded. For estimation methods, users can choose nonparametric estimation (which does not use covariates) and semiparametrically efficient estimation. |
URL: | https://github.com/mephas/tteICE |
BugReports: | https://github.com/mephas/tteICE/issues |
License: | GPL-3 |
Encoding: | UTF-8 |
Language: | en-US |
LazyData: | True |
RoxygenNote: | 7.3.3 |
Imports: | cmprsk, MASS, survival, shiny, shinythemes, shinyWidgets, DT, psych |
Depends: | R (≥ 3.5) |
Suggests: | knitr, rmarkdown |
NeedsCompilation: | no |
Packaged: | 2025-10-15 06:05:06 UTC; zhouy |
Repository: | CRAN |
Date/Publication: | 2025-10-20 19:40:02 UTC |
Data from Section 1.3 of Klein and Moeschberger (1997)
Description
The bmt
data frame has 137 rows and 22 columns.
Usage
bmt
Format
This data frame contains the following columns:
- group
Disease Group 1-ALL, 2-AML Low Risk, 3-AML High Risk
- t1
Time To Death Or On Study Time
- t2
Disease Free Survival Time (Time To Relapse, Death Or End Of Study)
- d1
Death Indicator 1-Dead 0-Alive
- d2
Relapse Indicator 1-Relapsed, 0-Disease Free
- d3
Disease Free Survival Indicator 1-Dead Or Relapsed, 0-Alive Disease Free)
- ta
Time To Acute Graft-Versus-Host Disease
- da
Acute GVHD Indicator 1-Developed Acute GVHD 0-Never Developed Acute GVHD)
- tc
Time To Chronic Graft-Versus-Host Disease
- dc
Chronic GVHD Indicator 1-Developed Chronic GVHD 0-Never Developed Chronic GVHD
- tp
Time To Platelet Recovery
- dp
Platelet Recovery Indicator 1-Platelets Returned To Normal, 0-Platelets Never Returned to Normal
- z1
Patient Age In Years
- z2
Donor Age In Years
- z3
Patient Sex: 1-Male, 0-Female
- z4
Donor Sex: 1-Male, 0-Female
- z5
Patient CMV Status: 1-CMV Positive, 0-CMV Negative
- z6
Donor CMVStatus: 1-CMV Positive, 0-CMV Negative
- z7
Waiting Time to Transplant In Days
- z8
FAB: 1-FAB Grade 4 Or 5 and AML, 0-Otherwise
- z9
Hospital: 1-The Ohio State University, 2-Alferd, 3-St. Vincent, 4-Hahnemann
- z10
MTX used as a Graft-Versus-Host-Prophylactic: 1-Yes 0-No
Source
Klein and Moeschberger (1997) Survival Analysis Techniques for Censored and Truncated Data, Springer.
Examples
data(bmt)
Graphical results of tteICE
Description
This function plots the estimated potential cumulative incidence functions or treatment effect curve with pointwise confidence intervals.
Usage
## S3 method for class 'tteICE'
plot(
x,
type = c("ate", "inc")[1],
decrease = FALSE,
conf.int = 0.95,
nboot = 0,
seed = 0,
xlab = "Time",
xlim = NULL,
ylim = NULL,
plot.configs = list(),
...
)
Arguments
x |
A fitted object returned by the function |
type |
Which plot to create: |
decrease |
A logical variable indicating the type of curve to display. If |
conf.int |
Confidence level for the interval. If |
nboot |
Number of resampling in bootstrapping. By default, |
seed |
Sets the random seed used when generating bootstrap samples. |
xlab |
Label for x-axis. |
xlim |
A numeric vector of length 2 giving the limits of the x-axis. If |
ylim |
A numeric vector of length 2 giving the limits of the y-axis. If |
plot.configs |
A named |
... |
Other augments in function |
Value
Plot the results from a tteICE object
See Also
Examples
## load data
data(bmt)
bmt = transform(bmt, d4=d2+d3)
A = as.numeric(bmt$group>1)
## plot cumulative incidence functions with p-values
for (st in c('composite','natural','removed','whileon','principal')){
fit = surv.tteICE(A, bmt$t2, bmt$d4, st)
plot(fit, type="inc", decrease=TRUE, ylim=c(0,1),
plot.configs=list(show.p.value=TRUE))
}
## plot treatment effects for semicompeting risk data
for (st in c('composite','natural','removed','whileon','principal')){
fit = scr.tteICE(A, bmt$t1, bmt$d1, bmt$t2, bmt$d2, st)
plot(fit, type="ate", ylim=c(-1,1), xlab="time",
plot.configs=list(col="red"))
}
Plot the estimated treatment effect
Description
This function plots the estimated treatment effect, defined as the difference in potential cumulative incidences under treated and control groups, along with pointwise confidence intervals.
Usage
plot_ate(
fit,
decrease = FALSE,
conf.int = 0.95,
nboot = 0,
seed = 0,
xlab = "Time",
ylim = c(-1, 1),
xlim = NULL,
plot.configs = list(ylab = NULL, main = NULL, lty = 1, lwd = 2, col = "black",
add.null.line = TRUE, null.line.lty = 2, ci.lty = 5, ci.lwd = 1.5, ci.col =
"darkgrey"),
...
)
Arguments
fit |
A fitted object returned by the function |
decrease |
A logical variable indicating the type of curve difference to display. If |
conf.int |
Confidence level for the interval. If |
nboot |
Number of resampling in bootstrapping. By default, |
seed |
Sets the random seed used when generating bootstrap samples. |
xlab |
Label for x-axis. |
ylim |
A numeric vector of length 2 giving the limits of the y-axis. Defaults to |
xlim |
A numeric vector of length 2 giving the limits of the x-axis. If |
plot.configs |
A named
|
... |
Additional graphical arguments passed to function |
Value
Plot the average treatment effect (ATE) results from a tteICE object
See Also
plot.default
,
points
,
curve
,
plot.tteICE
Examples
## Load data and fit the model
data(bmt)
bmt = transform(bmt, d4=d2+d3)
A = as.numeric(bmt$group>1)
## Model with competing risk data
fit1 = surv.tteICE(A, bmt$t2, bmt$d4, 'composite')
## Plot asymptotic confidence intervals based on explicit formulas
plot_ate(fit1, ylim=c(-0.4,0.4))
## Plot bootstrap confidence intervals (may take some seconds)
plot_ate(fit1, nboot=200, ylim=c(-0.4,0.4))
## Model with semicompeting risk data
fit2 = scr.tteICE(A, bmt$t1, bmt$d1, bmt$t2, bmt$d2, "composite")
## Plot asymptotic confidence intervals based on explicit formulas
plot_ate(fit2, ylim=c(-0.4,0.4),
plot.configs=list(add.null.line=FALSE))
## Plot bootstrap confidence intervals
plot_ate(fit2, nboot=200, ylim=c(-0.4,0.4),
plot.configs=list(add.null.line=FALSE, lty=2, main=""))
Plot the estimated cumulative incidence function (CIF)
Description
This function plots the estimated potential cumulative incidence function, along with pointwise confidence intervals.
Usage
plot_inc(
fit,
decrease = FALSE,
conf.int = 0.95,
nboot = 0,
seed = 0,
xlab = "Time",
xlim = NULL,
ylim = c(0, 1),
plot.configs = list(ylab = NULL, main = NULL, cex = 0.9, lty = 1, lwd = 2, ci.lty = 5,
ci.lwd = 1.5, legend = c("Treated", "Control"), col = c("brown", "darkcyan"),
legend.cex = 0.9, show.p.value = TRUE),
...
)
Arguments
fit |
A fitted object returned by the function |
decrease |
A logical variable indicating the type of curve to display. If |
conf.int |
Confidence level for the interval. If |
nboot |
Number of resampling in bootstrapping. By default, |
seed |
Sets the random seed used when generating bootstrap samples. |
xlab |
Label for x-axis. |
xlim |
A numeric vector of length 2 giving the limits of the x-axis. If |
ylim |
A numeric vector of length 2 giving the limits of the y-axis. Defaults to |
plot.configs |
A named
|
... |
Additional graphical arguments passed to function |
Value
Plot the cumulative incidence function results from a tteICE object
See Also
plot.default
,
points
,
curve
,
plot.tteICE
Examples
## load data and fit the model
data(bmt)
bmt = transform(bmt, d4=d2+d3)
A = as.numeric(bmt$group>1)
## Model with competing risk data
fit1 = surv.tteICE(A, bmt$t2, bmt$d4, 'treatment')
## plot asymptotic confidence intervals based on explicit formulas
plot_inc(fit1, ylim=c(0,1),
plot.configs=list(legend=c('AML','ALL'), show.p.value=FALSE) )
## plot bootstrap confidence intervals (may take some seconds)
plot_inc(fit1, nboot=200, ylim=c(0,1),
plot.configs=list(legend=c('AML','ALL')) )
## Model with semicompeting risk data
fit2 = scr.tteICE(A, bmt$t1, bmt$d1, bmt$t2, bmt$d2, "composite")
## plot asymptotic confidence intervals based on explicit formulas
plot_inc(fit2, ylim=c(0,1), plot.configs=list(add.null.line=FALSE))
## plot bootstrap confidence intervals
plot_inc(fit2, nboot=200, ylim=c(0,1),
plot.configs=list(lty=2, lwd=3,main="Title"))
Print a short summary of the estimated treatment effect
Description
This function summarize the results
Usage
## S3 method for class 'tteICE'
print(x, digits = 3, ...)
Arguments
x |
A fitted object returned by the function |
digits |
The digits of the results |
... |
Other augments in function |
Value
Print the summary of a tteICE object
See Also
Examples
## load data
data(bmt)
bmt = transform(bmt, d4=d2+d3)
A = as.numeric(bmt$group>1)
## print the results
for (st in c('composite','natural','removed','whileon','principal')){
fit = surv.tteICE(A, bmt$t2, bmt$d4, st)
print(fit)
}
for (st in c('composite','natural','removed','whileon','principal')){
fit = scr.tteICE(A, bmt$t1, bmt$d1, bmt$t2, bmt$d2, st)
print(fit, digits=2)
}
Risk prediction at specific time points
Description
This function predicts the potential cumulative incidence function and treatment effect at specific time points.
Usage
riskpredict(fit, timeset = NULL, nboot = 0, seed = 0)
Arguments
fit |
A fitted object returned by the function |
timeset |
Time at which to predict the risk. If |
nboot |
Number of resampling in bootstrapping. By default, |
seed |
Sets the random seed used when generating bootstrap samples. |
Value
A matrix. The meanings of each row are: time points, potential cumulative incidences (under treated and under control), treatment effects, standard errors, and P-values.
See Also
scr.tteICE
, surv.tteICE
, surv.boot
Examples
## load data
data(bmt)
bmt = transform(bmt, d4=d2+d3)
A = as.numeric(bmt$group>1)
X = as.matrix(bmt[,c('z1','z3','z5')])
## Composite variable strategy,
## nonparametric estimation without covariates
fit1 = scr.tteICE(A, bmt$t1, bmt$d1, bmt$t2, bmt$d2, "composite")
riskpredict(fit1, timeset=c(670,2000))
Fit the CIF using composite variable strategy for semicompeting risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using composite variable strategy (semicompeting risks data structure). This strategy adopts the first occurrence of either the intermediate or primary event as the event of interest.
Usage
scr.composite(
A,
Time,
status,
Time_int,
status_int,
weights = rep(1, length(A)),
subset = NULL
)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
weights |
Weight for each subject. |
subset |
Subset, either numerical or logical. |
Details
The composite variable strategy addresses the problem of intercurrent events by expanding the
outcome variables. It aggregates the intercurrent event and the primary outcome event into a single
composite outcome variable. The idea is not new in the context of progression-free survival,
where the composite outcome variable is defined as the occurrence of either a non-terminal event
(e.g., cancer progression) or a terminal event (e.g., death). One widely used composite outcome
variable has the form Q(w) = \min\{T(w), R(w)\}
for w = 1, 0
. When this simple form
is adopted, the difference in counterfactual cumulative incidences is
\tau(t) = P( Q(1) < t ) - P( Q(0) < t ),
representing the difference in probabilities of experiencing either intercurrent events or primary
outcome events during (0,t)
under active treatment and placebo.
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 logrank test.
See Also
Fit the CIF using composite variable strategy for semicompeting risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using composite variable strategy (semicompeting risks data structure). Cox models are employed for survival models. This strategy adopts the first occurrence of either the intermediate or primary event as the event of interest.
Usage
scr.composite.eff(
A,
Time,
status,
Time_int,
status_int,
X = NULL,
subset = NULL
)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
Details
The composite variable strategy addresses the problem of intercurrent events by expanding the
outcome variables. It aggregates the intercurrent event and the primary outcome event into a single
composite outcome variable. The idea is not new in the context of progression-free survival,
where the composite outcome variable is defined as the occurrence of either a non-terminal event
(e.g., cancer progression) or a terminal event (e.g., death). One widely used composite outcome
variable has the form Q(w) = \min\{T(w), R(w)\}
for w = 1, 0
. When this simple form
is adopted, the difference in counterfactual cumulative incidences is
\tau(t) = P( Q(1) < t ) - P( Q(0) < t ),
representing the difference in probabilities of experiencing either intercurrent events or primary
outcome events during (0,t)
under active treatment and placebo.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Fit the CIF using hypothetical strategy (I) for semicompeting risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using hypothetical strategy (semicompeting risks data structure). The intercurrent event is only permitted under treated if it would occur under control.
Usage
scr.natural(
A,
Time,
status,
Time_int,
status_int,
weights = rep(1, length(A)),
subset = NULL
)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
weights |
Weight for each subject. |
subset |
Subset, either numerical or logical. |
Details
The hypothetical strategy envisions a hypothetical clinical trial condition where the occurrence
of intercurrent events is restricted in certain ways. By doing so, the distribution of potential
outcomes under the hypothetical scenario can capture the impact of intercurrent events explicitly
through a pre-specified criterion. We use T'(w)
, w = 1, 0
to denote the time to the
primary outcome event in the hypothetical scenario. The time-dependent treatment effect specific
to this hypothetical scenario is written as
\tau(t) = P(T'(1) < t) - P(T'(0) < t),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
in the pre-specified hypothetical scenario under active treatment and placebo.
The key question is how to envision T'(w)
. We manipulate the hazard specific to intercurrent
event \lambda_2(t; w)
while assuming the hazard specific to the primary outcome event
\lambda_1(t; w)
remains unchanged. Specifically, we envision that the intercurrent events that
occurred when individuals were assigned to test drugs were only permitted if these intercurrent events
would have also occurred if these individuals had been assigned to the placebo. In this hypothetical
scenario, when assigned to placebo, individuals would be equally likely to experience intercurrent
events as they are assigned to placebo in the real-world trial in terms of the hazards; when assigned
to test drug, the hazard of intercurrent events would be identical to that if assigned to placebo in
the real-world trial. That is, \lambda_2'(t;0) = \lambda_2'(t;1) = \lambda_2(t;0)
. The treatment
effect corresponds to the natural direct effect, with the hazard of intercurrent events set at
the level under control. Markovness is assumed in estimation.
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 logrank test.
See Also
Fit the CIF using hypothetical strategy (I) for semicompeting risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using hypothetical strategy (semicompeting risks data structure). Cox models are employed for survival models. The intercurrent event is only permitted under treated if it would occur under control.
Usage
scr.natural.eff(A, Time, status, Time_int, status_int, X = NULL, subset = NULL)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
Details
The hypothetical strategy envisions a hypothetical clinical trial condition where the occurrence
of intercurrent events is restricted in certain ways. By doing so, the distribution of potential
outcomes under the hypothetical scenario can capture the impact of intercurrent events explicitly
through a pre-specified criterion. We use T'(w)
, w = 1, 0
to denote the time to the
primary outcome event in the hypothetical scenario. The time-dependent treatment effect specific
to this hypothetical scenario is written as
\tau(t) = P(T'(1) < t) - P(T'(0) < t),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
in the pre-specified hypothetical scenario under active treatment and placebo.
The key question is how to envision T'(w)
. We manipulate the hazard specific to intercurrent
event \lambda_2(t; w)
while assuming the hazard specific to the primary outcome event
\lambda_1(t; w)
remains unchanged. Specifically, we envision that the intercurrent events that
occurred when individuals were assigned to test drugs were only permitted if these intercurrent events
would have also occurred if these individuals had been assigned to the placebo. In this hypothetical
scenario, when assigned to placebo, individuals would be equally likely to experience intercurrent
events as they are assigned to placebo in the real-world trial in terms of the hazards; when assigned
to test drug, the hazard of intercurrent events would be identical to that if assigned to placebo in
the real-world trial. That is, \lambda_2'(t;0) = \lambda_2'(t;1) = \lambda_2(t;0)
. The treatment
effect corresponds to the natural direct effect, with the hazard of intercurrent events set at
the level under control. Markovness is assumed in estimation.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Fit the CIF using principal stratum strategy for semicompeting risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using principal stratum strategy (semicompeting risks data structure). The estimand is defined in a subpopulation where intercurrent events would never occur regardless of treatment conditions.
Usage
scr.principal(
A,
Time,
status,
Time_int,
status_int,
weights = rep(1, length(A)),
subset = NULL
)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
weights |
Weight for each subject. |
subset |
Subset, either numerical or logical. |
Details
The principal stratum strategy aims to stratify the population into subpopulations based on the joint
potential occurrences of intercurrent events under the two treatment assignments (R(1), R(0))
.
Suppose we are interested in a principal stratum comprised of individuals who would never experience
intercurrent events, regardless of which treatment they receive. This principal stratum can be indicated
by \{R(1)=R(0)=\infty\}
. The treatment effect is now defined within this subpopulation,
\tau(t) = P(T(1) < t \mid R(1)=R(0)=\infty) - P(T(0) < t \mid R(1)=R(0)=\infty),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
under active treatment and placebo in the subpopulation that will not experience intercurrent events
regardless of treatment during (0,t)
. A principal ignorability assumption is made for identification.
If the size of the target principal stratum is small, the results could be highly variable.
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, which is not available under this strategy.
See Also
Fit the CIF using principal stratum strategy for semicompeting risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using principal stratum strategy (semicompeting risks data structure). Cox models are employed for survival models. The estimand is defined in a subpopulation where intercurrent events would never occur regardless of treatment conditions.
Usage
scr.principal.eff(
A,
Time,
status,
Time_int,
status_int,
X = NULL,
subset = NULL
)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
Details
The principal stratum strategy aims to stratify the population into subpopulations based on the joint
potential occurrences of intercurrent events under the two treatment assignments (R(1), R(0))
.
Suppose we are interested in a principal stratum comprised of individuals who would never experience
intercurrent events, regardless of which treatment they receive. This principal stratum can be indicated
by \{R(1)=R(0)=\infty\}
. The treatment effect is now defined within this subpopulation,
\tau(t) = P(T(1) < t \mid R(1)=R(0)=\infty) - P(T(0) < t \mid R(1)=R(0)=\infty),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
under active treatment and placebo in the subpopulation that will not experience intercurrent events
regardless of treatment during (0,t)
. A principal ignorability assumption is made for identification.
If the size of the target principal stratum is small, the results could be highly variable.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Fit the CIF using hypothetical strategy (II) for semicompeting risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using hypothetical strategy (semicompeting risks data structure). The intercurrent event is assumed to be absent in the hypothetical scenario.
Usage
scr.removed(
A,
Time,
status,
Time_int,
status_int,
weights = rep(1, length(A)),
subset = NULL
)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
weights |
Weight for each subject. |
subset |
Subset, either numerical or logical. |
Details
The hypothetical strategy envisions a hypothetical clinical trial condition where the occurrence
of intercurrent events is restricted in certain ways. By doing so, the distribution of potential
outcomes under the hypothetical scenario can capture the impact of intercurrent events explicitly
through a pre-specified criterion. We use T'(w)
, w = 1, 0
to denote the time to the
primary outcome event in the hypothetical scenario. The time-dependent treatment effect specific
to this hypothetical scenario is written as
\tau(t) = P(T'(1) < t) - P(T'(0) < t),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
in the pre-specified hypothetical scenario under active treatment and placebo.
The key question is how to envision T'(w)
. We manipulate the hazard specific to intercurrent
event \lambda_2(t; w)
while assuming the hazard specific to the primary outcome event
\lambda_1(t; w)
remains unchanged. Specifically, we envision that intercurrent events are
absent in the hypothetical scenario for all individuals, so \lambda_2'(t;0) = \Lambda_2'(t;1) = 0
.
This hypothetical scenario leads to an estimand called the marginal cumulative incidence. The treatment
effect corresponds to the controlled direct effect with the intercurrent events removed.
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 logrank test.
See Also
Fit the CIF using hypothetical strategy (II) for semicompeting risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using hypothetical strategy (semicompeting risks data structure). Cox models are employed for survival models. The intercurrent event is assumed to be absent in the hypothetical scenario.
Usage
scr.removed.eff(A, Time, status, Time_int, status_int, X = NULL, subset = NULL)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
Details
The hypothetical strategy envisions a hypothetical clinical trial condition where the occurrence
of intercurrent events is restricted in certain ways. By doing so, the distribution of potential
outcomes under the hypothetical scenario can capture the impact of intercurrent events explicitly
through a pre-specified criterion. We use T'(w)
, w = 1, 0
to denote the time to the
primary outcome event in the hypothetical scenario. The time-dependent treatment effect specific
to this hypothetical scenario is written as
\tau(t) = P(T'(1) < t) - P(T'(0) < t),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
in the pre-specified hypothetical scenario under active treatment and placebo.
The key question is how to envision T'(w)
. We manipulate the hazard specific to intercurrent
event \lambda_2(t; w)
while assuming the cause-specific hazard specific to the primary outcome event
under no intercurrent events \lambda_1(t; w)
remains unchanged. Specifically, we envision that
intercurrent events are absent in the hypothetical scenario for all individuals, so
\lambda_2'(t;0) = \Lambda_2'(t;1) = 0
. This hypothetical scenario leads to an estimand called the
marginal cumulative incidence. The treatment effect corresponds to the controlled direct effect with the
intercurrent events removed.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Fit the CIF using treatment policy strategy for semicompeting risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using treatment policy strategy (semicompeting risks data structure). This strategy ignores the intercurrent event and uses the time to the primary event as it was recorded.
Usage
scr.treatment(
A,
Time,
status,
Time_int,
status_int,
weights = rep(1, length(A)),
subset = NULL
)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
weights |
Weight for each subject. |
subset |
Subset, either numerical or logical. |
Details
The treatment policy strategy addresses the problem of intercurrent events by expanding
the initial treatment conditions to a treatment policy. This strategy is applicable
only if intercurrent events do not hinder primary outcome events. The treatments under
comparison are now two treatment policies: (w, R(w))
, where w = 1, 0
. One policy
(1,R(1))
involves administering the test drug, along with any naturally occurring
intercurrents, whereas the other policy (0,R(0))
involves administering a placebo,
along with any naturally occurring intercurrents. Thus, the potential outcomes are
T(1,R(1))
and T(0,R(0))
. Instead of comparing the test drug and placebo themselves,
the contrast of interest is made between the two treatment policies. The difference in
cumulative incidences under the two treatment policies is then
\tau(t) = P(T(1, R(1)) < t) - P(T(0, R(0)) < t),
representing the difference in probabilities of experiencing primary outcome events during
(0,t)
under active treatment and placebo.
The average treatment effect \tau^{\text{tp}}(t)
has a meaningful causal interpretation
only when T(1, R(1))
and T(0, R(0))
are well defined. Because the treatment policy
includes the occurrence of the intercurrent event as natural, the entire treatment policy is
determined by manipulating the initial treatment condition $w$ only. Therefore, we can simplify
the notations T(w, R(w)) = T(w)
in defining estimands. As such,
\tau(t) = P(T(1)) < t) - P(T(0) < t)
as the intention-to-treat analysis.
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 logrank test.
See Also
Fit the CIF using treatment policy strategy for semicompeting risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using treatment policy strategy (semicompeting risks data structure). Cox models are employed for the survival model. This strategy ignores the intercurrent event and uses the time to the primary event as it was recorded.
Usage
scr.treatment.eff(
A,
Time,
status,
Time_int,
status_int,
X = NULL,
subset = NULL
)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
Details
The treatment policy strategy addresses the problem of intercurrent events by expanding
the initial treatment conditions to a treatment policy. This strategy is applicable
only if intercurrent events do not hinder primary outcome events. The treatments under
comparison are now two treatment policies: (w, R(w))
, where w = 1, 0
. One policy
(1,R(1))
involves administering the test drug, along with any naturally occurring
intercurrents, whereas the other policy (0,R(0))
involves administering a placebo,
along with any naturally occurring intercurrents. Thus, the potential outcomes are
T(1,R(1))
and T(0,R(0))
. Instead of comparing the test drug and placebo themselves,
the contrast of interest is made between the two treatment policies. The difference in
cumulative incidences under the two treatment policies is then
\tau(t) = P(T(1, R(1)) < t) - P(T(0, R(0)) < t),
representing the difference in probabilities of experiencing primary outcome events during
(0,t)
under active treatment and placebo.
The average treatment effect \tau^{\text{tp}}(t)
has a meaningful causal interpretation
only when T(1, R(1))
and T(0, R(0))
are well defined. Because the treatment policy
includes the occurrence of the intercurrent event as natural, the entire treatment policy is
determined by manipulating the initial treatment condition $w$ only. Therefore, we can simplify
the notations T(w, R(w)) = T(w)
in defining estimands. As such,
\tau(t) = P(T(1)) < t) - P(T(0) < t)
as the intention-to-treat analysis.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Fit the CIF for time-to-event data with intercurrent events for semicompeting risks data
Description
This function estimates the potential cumulative incidence function for time-to event data under ICH E9 (R1) to address intercurrent events. The input data should be of a semicompeting risks structure.
Usage
scr.tteICE(
A,
Time,
status,
Time_int,
status_int,
strategy = "composite",
cov1 = NULL,
method = "np",
weights = NULL,
subset = NULL,
na.rm = FALSE
)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
strategy |
Strategy to address intercurrent events, |
cov1 |
Baseline covariates. |
method |
Estimation method, |
weights |
Weight for each subject. |
subset |
Subset, either numerical or logical. |
na.rm |
Whether to remove missing values. |
Details
- Background
Intercurrent events refer to the events occurring after treatment initiation of clinical trials that affect either the interpretation of or the existence of the measurements associated with the clinical question of interest. The International Conference on Harmonization (ICH) E9 (R1) addendum proposed five strategies to address intercurrent events, namely, treatment policy strategy, composite variable strategy, while on treatment strategy, hypothetical strategy, and principal stratum strategy. To answer a specific scientific question, a strategy with a particular estimand is chosen before the study design.
- Model
We adopt the potential outcomes framework that defines a causal estimand as the contrast between functionals of potential outcomes. Consider a randomized controlled trial with
n
individuals randomly assigned to one of two treatment conditions, denoted byw
, wherew = 1
represents the active treatment (a test drug) andw = 0
represents the control (placebo). Assume that all patients adhere to their treatment assignments and do not discontinue treatment. Associated with individuali = 1, ..., n
are two potential time-to-event primary outcomesT_i(1)
andT_i(0)
, if any, which represent the time durations from treatment initiation to the primary outcome event under two treatment assignments respectively. LetR_i(1)
andR_i(0)
denote the occurrence time of potential intercurrent events, if any, under the two treatment assignments, respectively. Intercurrent events are considered as absent if no post-treatment intercurrent events occur until the end of study.- Estimand
We adopt the potential cumulative incidences under both treatment assignments as the target estimands. Potential cumulative incidences describe the probability of time-to-event outcomes occurring at each time point. We define the treatment effect as the contrast of two potential cumulative incidences. Cumulative incidences are model-free and collapsible, enjoying causal interpretations.
Value
A list including the fitted object and input variables.
References
Deng, Y., Han, S., & Zhou, X. H. (2025). Inference for Cumulative Incidences and Treatment Effects in Randomized Controlled Trials With Time-to-Event Outcomes Under ICH E9 (R1). Statistics in Medicine. doi:10.1002/sim.70091
See Also
Examples
## load data
data(bmt)
bmt = transform(bmt, d4=d2+d3)
A = as.numeric(bmt$group>1)
X = as.matrix(bmt[,c('z1','z3','z5')])
## Composite variable strategy,
## nonparametric estimation without covariates
fit1 = scr.tteICE(A, bmt$t1, bmt$d1, bmt$t2, bmt$d2, "composite")
fit10 = scr.tteICE(A, bmt$t1, bmt$d1, bmt$t2, bmt$d2, "aa")
## Hypothetical strategy (natural effects),
## nonparametric estimation with inverse probability weighting
fit2 = scr.tteICE(A, bmt$t1, bmt$d1, bmt$t2, bmt$d2, "natural", X, method='ipw')
## nonparametric estimation with weights as non-standardized inverse probability score
ps = predict(glm(A ~ X, family='binomial'), type='response')
w = A/ps + (1-A)/(1-ps)
fit2 = scr.tteICE(A, bmt$t1, bmt$d1, bmt$t2, bmt$d2, "natural", weights=w)
## Hypothetical strategy (removing intercurrent events),
## semiparametrically efficient estimation with covariates
fit3 = scr.tteICE(A, bmt$t1, bmt$d1, bmt$t2, bmt$d2, "removed", X, method='eff')
Fit the CIF using while on treatment strategy for semicompeting risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using while on treatment strategy (semicompeting risks data structure). This strategy can be understood as the competing risks model, which gives the subdistribution of the primary event.
Usage
scr.whileon(
A,
Time,
status,
Time_int,
status_int,
weights = rep(1, length(A)),
subset = NULL
)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
weights |
Weight for each subject. |
subset |
Subset, either numerical or logical. |
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.
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.
See Also
Fit the CIF using while on treatment strategy for semicompeting risks data, based on efficient influence functions
Description
This 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.
Usage
scr.whileon.eff(A, Time, status, Time_int, status_int, X = NULL, subset = NULL)
Arguments
A |
Treatment indicator, 1 for treatment and 0 for control. |
Time |
Time to the primary (terminal) event. |
status |
Indicator of the primary (terminal) event, 1 for event and 0 for censoring. |
Time_int |
Time to the intercurrent event. |
status_int |
Indicator of the intercurrent event, 1 for event and 0 for censoring. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
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.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Estimate the hazard ratio with intercurrent events
Description
This function estimates the hazard ratio for time-to event data under ICH E9 (R1) to address intercurrent events. Multiple strategies except the principal stratum strategy are allowed.
Usage
surv.HR(
A,
Time,
cstatus,
strategy = "composite",
cov1 = NULL,
conf.int = 0.95,
weights = NULL,
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. |
strategy |
Strategy to address intercurrent events, |
cov1 |
Baseline covariates. |
conf.int |
Level of the confidence interval. |
weights |
Weight for each subject (not applied to the while on treatment strategy). |
subset |
Subset, either numerical or logical. |
Details
For the treatment policy and hypothetical strategies, the hazard ratio (HR) is given by the Cox
regression regarding intercurrent events as censoring. For the composite variable strategy, the
hazard ratio is given by the Cox regression regarding the first occurrence of either intercurrent
event or primary event as the event of interest. For the while on treatment strategy, the hazard
ratio is given by the Fine-Gray subdistribution model. There is no existing method to estimate the
hazard ratio using principal stratum strategy.
The weakness of using hazard ratio to infer treatment effects is critical. First, the hazard ratio
relies on model specification. Second, the hazard ratio is not collapsible. Therefore, the hazard
ratio should only be treated as a descriptive or exploratory measure of the treatment effect.
Value
A list including
- logHR
Estimated log hazard ratio (logHR) of the treatment effect on the primary event.
- se
Standard error of the estimated log hazard ratio (logHR).
- CI
Confidence interval of the hazard ratio (HR).
- p.val
P value of the hazard ratio.
Examples
data(bmt)
bmt = transform(bmt, d4=d2+d3)
A = as.numeric(bmt$group>1)
## composite variable strategy
fit = surv.HR(A, bmt$t2, bmt$d4, "composite")
## while on treatment strategy
X = bmt[,c('z1','z3','z5')]
fit = surv.HR(A, bmt$t2, bmt$d4, "whileon", cov1=X)
Calculate the standard error for the estimated CIF and treatment effect
Description
This function calculates the standard error for the estimated potential cumulative incidence function and treatment effect. Two methods to calculate the standard error are considered: the asymptotic standard error based on the explicit formula and bootstrapping.
Usage
surv.boot(fit, nboot = 0, seed = 0)
Arguments
fit |
A fitted object from |
nboot |
Number of resamplings in the boostrapping method. If |
seed |
Seed for bootstrapping. |
Value
A list including
- time
Time points in both groups.
- 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.
- ate
Estimated treatment effect (difference in cumulative incidence functions).
- se
Standard error of the estimated treatment effect.
- strategy
Strategy used.
- method
Estimation method used.
See Also
Fit the CIF using composite variable strategy for competing risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using composite variable strategy (competing risks data structure). This strategy adopts the first occurrence of either the intermediate or primary event as the event of interest.
Usage
surv.composite(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. |
Details
The composite variable strategy addresses the problem of intercurrent events by expanding the
outcome variables. It aggregates the intercurrent event and the primary outcome event into a single
composite outcome variable. The idea is not new in the context of progression-free survival,
where the composite outcome variable is defined as the occurrence of either a non-terminal event
(e.g., cancer progression) or a terminal event (e.g., death). One widely used composite outcome
variable has the form Q(w) = \min\{T(w), R(w)\}
for w = 1, 0
. When this simple form
is adopted, the difference in counterfactual cumulative incidences is
\tau(t) = P( Q(1) < t ) - P( Q(0) < t ),
representing the difference in probabilities of experiencing either intercurrent events or primary
outcome events during (0,t)
under active treatment and placebo.
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 logrank test.
See Also
surv.composite.eff
, surv.tteICE
Fit the CIF using composite variable strategy for competing risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using composite variable strategy (competing risks data structure). Cox models are employed for survival models. This strategy adopts the first occurrence of either the intermediate or primary event as the event of interest.
Usage
surv.composite.eff(A, Time, cstatus, X = NULL, 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. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
Details
The composite variable strategy addresses the problem of intercurrent events by expanding the
outcome variables. It aggregates the intercurrent event and the primary outcome event into a single
composite outcome variable. The idea is not new in the context of progression-free survival,
where the composite outcome variable is defined as the occurrence of either a non-terminal event
(e.g., cancer progression) or a terminal event (e.g., death). One widely used composite outcome
variable has the form Q(w) = \min\{T(w), R(w)\}
for w = 1, 0
. When this simple form
is adopted, the difference in counterfactual cumulative incidences is
\tau(t) = P( Q(1) < t ) - P( Q(0) < t ),
representing the difference in probabilities of experiencing either intercurrent events or primary
outcome events during (0,t)
under active treatment and placebo.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Fit the CIF using hypothetical strategy (I) for competing risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using hypothetical strategy (competing risks data structure). The intercurrent event is only permitted under treated if it would occur under control.
Usage
surv.natural(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. |
Details
The hypothetical strategy envisions a hypothetical clinical trial condition where the occurrence
of intercurrent events is restricted in certain ways. By doing so, the distribution of potential
outcomes under the hypothetical scenario can capture the impact of intercurrent events explicitly
through a pre-specified criterion. We use T'(w)
, w = 1, 0
to denote the time to the
primary outcome event in the hypothetical scenario. The time-dependent treatment effect specific
to this hypothetical scenario is written as
\tau(t) = P(T'(1) < t) - P(T'(0) < t),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
in the pre-specified hypothetical scenario under active treatment and placebo.
The key question is how to envision T'(w)
. We manipulate the hazard specific to intercurrent
event \lambda_2(t; w)
while assuming the hazard specific to the primary outcome event
\lambda_1(t; w)
remains unchanged. Specifically, we envision that the intercurrent events that
occurred when individuals were assigned to test drugs were only permitted if these intercurrent events
would have also occurred if these individuals had been assigned to the placebo. In this hypothetical
scenario, when assigned to placebo, individuals would be equally likely to experience intercurrent
events as they are assigned to placebo in the real-world trial in terms of the hazards; when assigned
to test drug, the hazard of intercurrent events would be identical to that if assigned to placebo in
the real-world trial. That is, \lambda_2'(t;0) = \lambda_2'(t;1) = \lambda_2(t;0)
. The treatment
effect corresponds to the natural direct effect with the hazard of intercurrent events set at
the level under control.
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 logrank test.
See Also
Fit the CIF using hypothetical strategy (I) for competing risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using hypothetical strategy (competing risks data structure). Cox models are employed for survival models. The intercurrent event is only permitted under treated if it would occur under control.
Usage
surv.natural.eff(A, Time, cstatus, X = NULL, 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. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
Details
The hypothetical strategy envisions a hypothetical clinical trial condition where the occurrence
of intercurrent events is restricted in certain ways. By doing so, the distribution of potential
outcomes under the hypothetical scenario can capture the impact of intercurrent events explicitly
through a pre-specified criterion. We use T'(w)
, w = 1, 0
to denote the time to the
primary outcome event in the hypothetical scenario. The time-dependent treatment effect specific
to this hypothetical scenario is written as
\tau(t) = P(T'(1) < t) - P(T'(0) < t),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
in the pre-specified hypothetical scenario under active treatment and placebo.
The key question is how to envision T'(w)
. We manipulate the hazard specific to intercurrent
event \lambda_2(t; w)
while assuming the hazard specific to the primary outcome event
\lambda_1(t; w)
remains unchanged. Specifically, we envision that the intercurrent events that
occurred when individuals were assigned to test drugs were only permitted if these intercurrent events
would have also occurred if these individuals had been assigned to the placebo. In this hypothetical
scenario, when assigned to placebo, individuals would be equally likely to experience intercurrent
events as they are assigned to placebo in the real-world trial in terms of the hazards; when assigned
to test drug, the hazard of intercurrent events would be identical to that if assigned to placebo in
the real-world trial. That is, \lambda_2'(t;0) = \lambda_2'(t;1) = \lambda_2(t;0)
. The treatment
effect corresponds to the natural direct effect with the hazard of intercurrent events set at
the level under control.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Fit the CIF using principal stratum strategy for competing risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using principal stratum strategy (competing risks data structure). The estimand is defined in a subpopulation where intercurrent events would never occur regardless of treatment conditions.
Usage
surv.principal(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. |
Details
The principal stratum strategy aims to stratify the population into subpopulations based on the joint
potential occurrences of intercurrent events under the two treatment assignments (R(1), R(0))
.
Suppose we are interested in a principal stratum comprised of individuals who would never experience
intercurrent events, regardless of which treatment they receive. This principal stratum can be indicated
by \{R(1)=R(0)=\infty\}
. The treatment effect is now defined within this subpopulation,
\tau(t) = P(T(1) < t \mid R(1)=R(0)=\infty) - P(T(0) < t \mid R(1)=R(0)=\infty),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
under active treatment and placebo in the subpopulation that will not experience intercurrent events
regardless of treatment during (0,t)
. A principal ignorability assumption is made for identification.
If the size of the target principal stratum is small, the results could be highly variable.
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, which is not available under this strategy.
See Also
surv.principal.eff
, surv.tteICE
Fit the CIF using principal stratum strategy for competing risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using principal stratum strategy (competing risks data structure). Cox models are employed for survival models. The estimand is defined in a subpopulation where intercurrent events would never occur regardless of treatment conditions.
Usage
surv.principal.eff(A, Time, cstatus, X = NULL, 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. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
Details
The principal stratum strategy aims to stratify the population into subpopulations based on the joint
potential occurrences of intercurrent events under the two treatment assignments (R(1), R(0))
.
Suppose we are interested in a principal stratum comprised of individuals who would never experience
intercurrent events, regardless of which treatment they receive. This principal stratum can be indicated
by \{R(1)=R(0)=\infty\}
. The treatment effect is now defined within this subpopulation,
\tau(t) = P(T(1) < t \mid R(1)=R(0)=\infty) - P(T(0) < t \mid R(1)=R(0)=\infty),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
under active treatment and placebo in the subpopulation that will not experience intercurrent events
regardless of treatment during (0,t)
. A principal ignorability assumption is made for identification.
If the size of the target principal stratum is small, the results could be highly variable.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Fit the CIF using hypothetical strategy (II) for competing risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using hypothetical strategy (competing risks data structure). The intercurrent event is assumed to be absent in the hypothetical scenario.
Usage
surv.removed(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. |
Details
The hypothetical strategy envisions a hypothetical clinical trial condition where the occurrence
of intercurrent events is restricted in certain ways. By doing so, the distribution of potential
outcomes under the hypothetical scenario can capture the impact of intercurrent events explicitly
through a pre-specified criterion. We use T'(w)
, w = 1, 0
to denote the time to the
primary outcome event in the hypothetical scenario. The time-dependent treatment effect specific
to this hypothetical scenario is written as
\tau(t) = P(T'(1) < t) - P(T'(0) < t),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
in the pre-specified hypothetical scenario under active treatment and placebo.
The key question is how to envision T'(w)
. We manipulate the hazard specific to intercurrent
event \lambda_2(t; w)
while assuming the hazard specific to the primary outcome event
\lambda_1(t; w)
remains unchanged. Specifically, we envision that intercurrent events are
absent in the hypothetical scenario for all individuals, so \lambda_2'(t;0) = \Lambda_2'(t;1) = 0
.
This hypothetical scenario leads to an estimand called the marginal cumulative incidence. The treatment
effect corresponds to the controlled direct effect with the intercurrent events removed.
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 logrank test.
See Also
Fit the CIF using hypothetical strategy (II) for competing risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using hypothetical strategy (competing risks data structure). Cox models are employed for survival models. The intercurrent event is assumed to be absent in the hypothetical scenario.
Usage
surv.removed.eff(A, Time, cstatus, X = NULL, 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. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
Details
The hypothetical strategy envisions a hypothetical clinical trial condition where the occurrence
of intercurrent events is restricted in certain ways. By doing so, the distribution of potential
outcomes under the hypothetical scenario can capture the impact of intercurrent events explicitly
through a pre-specified criterion. We use T'(w)
, w = 1, 0
to denote the time to the
primary outcome event in the hypothetical scenario. The time-dependent treatment effect specific
to this hypothetical scenario is written as
\tau(t) = P(T'(1) < t) - P(T'(0) < t),
representing the difference in probabilities of experiencing primary outcome events during (0,t)
in the pre-specified hypothetical scenario under active treatment and placebo.
The key question is how to envision T'(w)
. We manipulate the hazard specific to intercurrent
event \lambda_2(t; w)
while assuming the hazard specific to the primary outcome event
\lambda_1(t; w)
remains unchanged. Specifically, we envision that intercurrent events are
absent in the hypothetical scenario for all individuals, so \lambda_2'(t;0) = \Lambda_2'(t;1) = 0
.
This hypothetical scenario leads to an estimand called the marginal cumulative incidence. The treatment
effect corresponds to the controlled direct effect with the intercurrent events removed.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Fit the CIF using treatment policy strategy for competing risks data
Description
This function nonparametrically estimates the potential cumulative incidence function using treatment policy strategy (competing risks data structure). This strategy ignores the intercurrent event and uses the time to the primary event as it was recorded.
Usage
surv.treatment(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. |
Details
The treatment policy strategy addresses the problem of intercurrent events by expanding
the initial treatment conditions to a treatment policy. This strategy is applicable
only if intercurrent events do not hinder primary outcome events. The treatments under
comparison are now two treatment policies: (w, R(w))
, where w = 1, 0
. One policy
(1,R(1))
involves administering the test drug, along with any naturally occurring
intercurrents, whereas the other policy (0,R(0))
involves administering a placebo,
along with any naturally occurring intercurrents. Thus, the potential outcomes are
T(1,R(1))
and T(0,R(0))
. Instead of comparing the test drug and placebo themselves,
the contrast of interest is made between the two treatment policies. The difference in
cumulative incidences under the two treatment policies is then
\tau(t) = P(T(1, R(1)) < t) - P(T(0, R(0)) < t),
representing the difference in probabilities of experiencing primary outcome events during
(0,t)
under active treatment and placebo.
The average treatment effect \tau^{\text{tp}}(t)
has a meaningful causal interpretation
only when T(1, R(1))
and T(0, R(0))
are well defined. Because the treatment policy
includes the occurrence of the intercurrent event as natural, the entire treatment policy is
determined by manipulating the initial treatment condition $w$ only. Therefore, we can simplify
the notations T(w, R(w)) = T(w)
in defining estimands. As such,
\tau(t) = P(T(1)) < t) - P(T(0) < t)
as the intention-to-treat analysis.
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 logrank test.
See Also
surv.treatment.eff
, surv.tteICE
Fit the CIF using treatment policy strategy for competing risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using treatment policy strategy (competing risks data structure). Cox models are employed for the survival model. This strategy ignores the intercurrent event and uses the time to the primary event as it was recorded.
Usage
surv.treatment.eff(A, Time, cstatus, X = NULL, 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. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
Details
The treatment policy strategy addresses the problem of intercurrent events by expanding
the initial treatment conditions to a treatment policy. This strategy is applicable
only if intercurrent events do not hinder primary outcome events. The treatments under
comparison are now two treatment policies: (w, R(w))
, where w = 1, 0
. One policy
(1,R(1))
involves administering the test drug, along with any naturally occurring
intercurrents, whereas the other policy (0,R(0))
involves administering a placebo,
along with any naturally occurring intercurrents. Thus, the potential outcomes are
T(1,R(1))
and T(0,R(0))
. Instead of comparing the test drug and placebo themselves,
the contrast of interest is made between the two treatment policies. The difference in
cumulative incidences under the two treatment policies is then
\tau(t) = P(T(1, R(1)) < t) - P(T(0, R(0)) < t),
representing the difference in probabilities of experiencing primary outcome events during
(0,t)
under active treatment and placebo.
The average treatment effect \tau^{\text{tp}}(t)
has a meaningful causal interpretation
only when T(1, R(1))
and T(0, R(0))
are well defined. Because the treatment policy
includes the occurrence of the intercurrent event as natural, the entire treatment policy is
determined by manipulating the initial treatment condition $w$ only. Therefore, we can simplify
the notations T(w, R(w)) = T(w)
in defining estimands. As such,
\tau(t) = P(T(1)) < t) - P(T(0) < t)
as the intention-to-treat analysis.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Fit the CIF for time-to-event with intercurrent events for competing risks data
Description
This function estimates the potential cumulative incidence function for time-to event data under ICH E9 (R1) to address intercurrent events. The input data should be of a competing risks structure.
Usage
surv.tteICE(
A,
Time,
cstatus,
strategy = "composite",
cov1 = NULL,
method = "np",
weights = NULL,
subset = NULL,
na.rm = FALSE
)
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. |
strategy |
Strategy to address intercurrent events, |
cov1 |
Baseline covariates. |
method |
Estimation method, |
weights |
Weight for each subject. |
subset |
Subset, either numerical or logical. |
na.rm |
Whether to remove missing values. |
Details
- Background
Intercurrent events refer to the events occurring after treatment initiation of clinical trials that affect either the interpretation of or the existence of the measurements associated with the clinical question of interest. The International Conference on Harmonization (ICH) E9 (R1) addendum proposed five strategies to address intercurrent events, namely, treatment policy strategy, composite variable strategy, while on treatment strategy, hypothetical strategy, and principal stratum strategy. To answer a specific scientific question, a strategy with a particular estimand is chosen before the study design.
- Model
We adopt the potential outcomes framework that defines a causal estimand as the contrast between functionals of potential outcomes. Consider a randomized controlled trial with
n
individuals randomly assigned to one of two treatment conditions, denoted byw
, wherew = 1
represents the active treatment (a test drug) andw = 0
represents the control (placebo). Assume that all patients adhere to their treatment assignments and do not discontinue treatment. Associated with individuali = 1, ..., n
are two potential time-to-event primary outcomesT_i(1)
andT_i(0)
, if any, which represent the time durations from treatment initiation to the primary outcome event under two treatment assignments respectively. LetR_i(1)
andR_i(0)
denote the occurrence time of potential intercurrent events, if any, under the two treatment assignments, respectively. Intercurrent events are considered as absent if no post-treatment intercurrent events occur until the end of study.- Estimand
We adopt the potential cumulative incidences under both treatment assignments as the target estimands. Potential cumulative incidences describe the probability of time-to-event outcomes occurring at each time point. We define the treatment effect as the contrast of two potential cumulative incidences. Cumulative incidences are model-free and collapsible, enjoying causal interpretations.
Value
A list including the fitted object and input variables.
References
Deng, Y., Han, S., & Zhou, X. H. (2025). Inference for Cumulative Incidences and Treatment Effects in Randomized Controlled Trials With Time-to-Event Outcomes Under ICH E9 (R1). Statistics in Medicine. doi:10.1002/sim.70091
See Also
Examples
## load data
data(bmt)
bmt = transform(bmt, d4=d2+d3)
A = as.numeric(bmt$group>1)
X = as.matrix(bmt[,c('z1','z3','z5')])
## Composite variable strategy,
## nonparametric estimation without covariates
fit1 = surv.tteICE(A, bmt$t2, bmt$d4, "composite")
## Hypothetical strategy (natural effects),
## nonparametric estimation with inverse probability weighting
fit2 = surv.tteICE(A, bmt$t2, bmt$d4, "natural", X, method='ipw')
## nonparametric estimation with weights as inverse propensity score
ps = predict(glm(A ~ X, family='binomial'), type='response')
w = A/ps + (1-A)/(1-ps)
fit2 = surv.tteICE(A, bmt$t2, bmt$d4, "natural", weights=w)
## Hypothetical strategy (removing intercurrent events),
## semiparametrically efficient estimation with covariates
fit3 = surv.tteICE(A, bmt$t2, bmt$d4, "removed", X, method='eff')
Fit the CIF using while on treatment strategy for competing risks data
Description
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.
Usage
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. |
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.
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.
See Also
Fit the CIF using while on treatment strategy for competing risks data, based on efficient influence functions
Description
This function estimates the potential cumulative incidence function based on efficient influence functions using while on treatment strategy (competing 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.
Usage
surv.whileon.eff(A, Time, cstatus, X = NULL, 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. |
X |
Baseline covariates. |
subset |
Subset, either numerical or logical. |
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.
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 the efficient influence function of the restricted mean survival time lost by the end of study.
See Also
Shiny app for tteICE
Description
This function opens the Rshiny app for tteICE. R Shiny application can be used for generating plots and basic analysis results. It provides a point-and-click interface, so users can obtain results without writing R code directly.
Usage
tteICEShiny()
Value
Rshiny interface
Examples
if(interactive()){
tteICEShiny()
}