Learn R Programming

RISCA (version 1.0.7)

plot.survrisca: Plot Method for 'survrisca' Objects

Description

A plot of survival curves is produced. In the RISCA package, it concerns the functions ipw.survival and gc.survival.

Usage

# S3 method for survrisca
plot(x, ..., col=1, lty=1, lwd=1, type="s", max.time=NULL,
min.y=0, max.y=1, grid.lty=NULL)

Arguments

x

An object of class survrisca, returned by the functions ipw.survival gc.survival.

...

Additional arguments affecting the plot.

col

A numeric vector with the color of the survival curves. The default is 1 for black.

lty

A numeric vector with the type of the survival curves. The default is 1.

lwd

A numeric vector with the type of the survival curves. The default is 1.

type

A character string giving the type of plot : "p" for points, "l" for lines, "b" for both points and lines, "c" for empty points joined by lines, "o" for overplotted points and lines. The default is "s" for step function.

max.time

The maximum time of the x-asis. The default is NULL, it corresponds to the maximum follow-up time observed in the database from which the survrisca object was estimated.

min.y

The minimum of the y-axis. The default is 0.

max.y

The maximum of the y-axis. The default is 1.

grid.lty

A character or (integer) numeric with the line type of the grid lines. The default is NULL for no grid.

Author

Yohann Foucher <Yohann.Foucher@univ-poitiers.fr>

Florent Le Borgne <fleborgne@idbc.fr>

Examples

Run this code
data(dataDIVAT2)

res.km <- ipw.survival(times=dataDIVAT2$times, failures=dataDIVAT2$failures,
  variable=dataDIVAT2$ecd, weights=NULL)

plot(res.km, ylab="Graft and patient survival",
 xlab="Time post-transplantation (years)", col=c(1,2), grid.lty=1)

Run the code above in your browser using DataLab