plot.cmp.rel | R Documentation |
Plot method for cmp.rel. Plots the cumulative probability of death due to disease and due to population reasons
## S3 method for class 'cmp.rel' plot( x, main = " ", curvlab, ylim = c(0, 1), xlim, wh = 2, xlab = "Time (days)", ylab = "Probability", lty = 1:length(x), xscale = 1, col = 1, lwd = par("lwd"), curves, conf.int, all.times = FALSE, ... )
x |
a list, with each component representing one curve in the plot,
output of the function |
main |
the main title for the plot. |
curvlab |
Curve labels for the plot. Default is |
ylim |
yaxis limits for plot. |
xlim |
xaxis limits for plot (default is 0 to the largest time in any of the curves). |
wh |
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. |
xlab |
X axis label. |
ylab |
y axis label. |
lty |
vector of line types. Default |
xscale |
Scale of the X axis. Default is in days (1). |
col |
vector of colors. If |
lwd |
vector of line widths. If |
curves |
Vector if integers, specifies which curves should be plotted.
May take values |
conf.int |
Vector if integers, specifies which confidence intervals
should be plotted. May take values |
all.times |
By default, the disease specific mortality estimate is
plotted as a step function between event or censoring times. If set to
|
... |
additional arguments passed to the initial call of the plot function. |
By default, the graph is plotted as a step function for the cause specific mortality and as a piecewise linear function for the population mortality. It is evaluated at all event and censoring times even though it constantly changes also between these time points.
If the argument all.times
is set to TRUE
, the plot is
evaluated at all times that were used for numerical integration in the
cmp.rel
function (there, the default is set to daily intervals). If
only specific time points are to be added, this should be done via argument
add.times
in cmp.rel
.
No value is returned.
rs.surv
data(slopop) data(rdata) fit <- cmp.rel(Surv(time,cens)~sex,rmap=list(age=age*365.241), ratetable=slopop,data=rdata,tau=3652.41) plot(fit,col=c(1,1,2,2),xscale=365.241,conf.int=c(1,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.