Plot method for cuminc. Creates labeled line plots from appropriate
list input, for example, the output from cuminc()
.
# S3 method for cuminc
plot(x, main=" ", curvlab, ylim=c(0, 1), xlim, wh=2,
xlab="Years", ylab="Probability", lty=1:length(x), color=1, lwd=par('lwd'),
...)
No value is returned.
a list, with each component representing one curve in the plot. Each
component of x
is itself a list whose first component gives the x values
and 2nd component the y values to be plotted. Although written for
cumulative incidence curves, can in principle be used for any set of lines.
the main title for the plot.
Curve labels for the plot. Default is names(x)
, or if that is missing,
1:nc
, where nc
is the number of curves in x
.
yaxis limits for plot
xaxis limits for plot (default is 0 to the largest time in any of the curves)
if a vector of length 2, then the upper right coordinates of the legend; otherwise the legend is placed in the upper right corner of the plot
X axis label
y axis label
vector of line types. Default 1:nc
(nc
is the number of
curves in x
). For color displays, lty=1, color=1:nc
, might
be more appropriate. If length(lty)<nc
, then lty[1]
is
used for all.
vector of colors. If length(color)<nc
, then the color[1]
is
used for all.
vector of line widths. If length(lwd)<nc
, then lwd[1]
is used for all.
additional arguments passed to the initial call of the plot function.
cuminc