Learn R Programming

RISCA (version 0.9)

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

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.

Examples

Run this code
# NOT RUN {
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