# plot.cmp.rel: Plot the crude probability of death In relsurv: Relative Survival

 plot.cmp.rel R Documentation

## Plot the crude probability of death

### Description

Plot method for cmp.rel. Plots the cumulative probability of death due to disease and due to population reasons

### Usage

```## 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,
...
)
```

### Arguments

 `x` a list, with each component representing one curve in the plot, output of the function `cmp.rel`. `main` the main title for the plot. `curvlab` 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`. `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 `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)

### Details

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`.

### Value

No value is returned.

`rs.surv`

### Examples

```
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))

```

relsurv documentation built on March 18, 2022, 5:15 p.m.