Learn R Programming

condSURV (version 2.0.4)

plot.survCS: Plot for an object of class "survCS".

Description

It draws the estimated conditional survival probabilities.

Usage

# S3 method for survCS
plot(
  x = object,
  y = NULL,
  conf = NULL,
  type = NULL,
  conftype = NULL,
  col = 1:6,
  confcol = 1:6,
  lty = 1,
  conflty = 2,
  xlab = "Time",
  ylab = "Survival",
  ylim = NULL,
  xlim = NULL,
  ...
)

Value

No value is returned.

Arguments

x

An object of class "survCS".

y

NULL

conf

Draw the confidence intervals into the plot. By default it is NULL, they are drawn if the "surv" object contains them.

type

The type of plot that should be drawn. See details par for possible options. Defaults to "s" for the draw be stair steps.

conftype

The type of plot that should be drawn for confidence intervals. See details par for possible options. Defaults to "s" for the draw be stair steps.

col

Vector of colors. Colors are used cyclically.

confcol

Vector of colors for the confidence intervals. Colors are used cyclically.

lty

The line type. Line types can either be specified as an integer (0 = blank, 1 = solid (default), 2 = dashed, 3 = dotted, 4 = dotdash, 5 = longdash, 6 = twodash). See details in par.

conflty

The line type for confidence intervals. Line types can either be specified as an integer (0 = blank, 1 = solid (default), 2 = dashed, 3 = dotted, 4 = dotdash, 5 = longdash, 6 = twodash).

xlab

A title for the x axis: see title.

ylab

A title for the y axis: see title.

ylim

The y limits of the plot.

xlim

The x limits of the plot.

...

Other options.

Author

Luis Meira-Machado and Marta Sestelo

Examples

Run this code

fit1 <- survCOND(survCS(time1, event1, Stime, event) ~ 1, x = 365,
   data = colonCS, method = "LDM", conf = TRUE)

plot(fit1, xlab = "Time (days)", ylab = "S(y|365)", ylim = c(0.5, 1))

fit4 <- survCOND(survCS(time1, event1, Stime, event) ~ rx,
   x = 365, data = colonCS, method = "LDM")

plot(fit4, xlab = "Time (days)", ylab = "S(y|365)", ylim = c(0.5, 1))


Run the code above in your browser using DataLab