Plot cumulative incidence functions
Plot function for etmCIF
objects. The function plots cumulative
incidence curves, possibly with pointwise confidence intervals.
## S3 method for class 'etmCIF' plot(x, which.cif, xlim, ylim, ylab = "Cumulative Incidence", xlab = "Time", col = 1, lty, lwd = 1, ci.type = c("none", "bars", "pointwise"), ci.fun = "cloglog", ci.col = col, ci.lty = 3, legend = TRUE, legend.pos, curvlab, legend.bty = "n", pos.ci = 27, ci.lwd = 3, ...)
x |
A |
which.cif |
A numeric vector indicating which CIFs should be
plotted. When missing, only the CIF of interest is plotted
(determined through the |
xlim |
x-axis limits for the plot. By default, |
ylim |
y-axis limits. Default is |
ylab |
Label for y-axis. Default is |
xlab |
Label for x-axis. Default is "Time" |
col |
Vector describing colours used for the CIF curves. Default is black |
lty |
Vector of line type |
lwd |
Thickness of the lines |
ci.type |
One of |
ci.fun |
Transformation used for the confidence intervals. Default is "clolog", and is a better choice for cumulative incidences. Other choices are "log" and "log-log" |
ci.col |
Colour for the pointwise confidence interval curves. Default is same as the CIF curves |
ci.lty |
Line type for the confidence intervals. Default is 3 |
legend |
Logical. Whether to draw a legend. Default is |
legend.pos |
A vector giving the legend's position. See
|
curvlab |
A character or expression vector to appear in the legend. Default is CIF + event label |
legend.bty |
Box type for the legend. Default is none ("n") |
pos.ci |
If |
ci.lwd |
Thickness of the confidence interval segment (for
|
... |
Further graphical arguments |
The function relies on plot.etm
and lines.etm
with more
or less the same options. Exception is the drawing of the confidence
intervals, for which several displays are possible.
No value returned
Arthur Allignol arthur.allignol@gmail.com
data(abortion) cif.ab <- etmCIF(survival::Surv(entry, exit, cause != 0) ~ group, abortion, etype = cause, failcode = 3) cif.ab plot(cif.ab, ci.type = "bars", pos.ci = 24, col = c(1, 2), lty = 1, curvlab = c("Control", "Exposed")) plot(cif.ab, which = c(1, 2))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.