This function plots the estimated potential cumulative incidence functions or treatment effect curve with pointwise confidence intervals.
A fitted object returned by the function surv.tteICE or scr.tteICE.
Which plot to create: ate indicates to plot the estimated treatment effect; inc indicates to plot the estimated cumulative incidence function.
A logical variable indicating the type of curve to display. If decrease = FALSE (default), the function displays the cumulative incidence functions (CIFs) or their differences. If decrease = TRUE, the function instead displays the survival functions or their differences.
Confidence level for the interval. If conf.int = NULL, no confidence interval is provided.
Number of resampling in bootstrapping. By default, nboot = 0, meaning no bootstrap is performed and the standard error is computed using the explicit analytical formula.
Sets the random seed used when generating bootstrap samples.
Label for x-axis.
A numeric vector of length 2 giving the limits of the x-axis. If xlim=NULL (default), the range is determined automatically from the data.
A numeric vector of length 2 giving the limits of the y-axis. If ylim=NULL (default), the range is determined automatically by the type of plot
A named list of additional plot configurations. See details in functions plot_ate and plot_inc
Other augments in function plot.default or function curve
Plot the results from a tteICE object
## 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))
}
#> Warning: `seed` is supplied but `nboot = 0`; seed will be ignored.
#> Warning: `seed` is supplied but `nboot = 0`; seed will be ignored.
#> Warning: `seed` is supplied but `nboot = 0`; seed will be ignored.
#> Warning: `seed` is supplied but `nboot = 0`; seed will be ignored.
#> Warning: `seed` is supplied but `nboot = 0`; seed will be ignored.
## 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"))
}
#> Warning: `seed` is supplied but `nboot = 0`; seed will be ignored.
#> Warning: `seed` is supplied but `nboot = 0`; seed will be ignored.
#> Warning: `seed` is supplied but `nboot = 0`; seed will be ignored.
#> Warning: `seed` is supplied but `nboot = 0`; seed will be ignored.
#> Warning: `seed` is supplied but `nboot = 0`; seed will be ignored.