Skip to contents

Plots the estimated survival function from an icsurvfit object. If model="NP", the nonparametric estimate is plotted. For model="PO" or "PH", the survival curve for a specific covariate value z can be overlaid. By default, it plots a step function.

Usage

# S3 method for class 'icsurvfit'
plot(
  object,
  z = NULL,
  xlab = "Time",
  ylab = "Survival rate",
  lty = 1,
  frame.plot = FALSE,
  add = FALSE,
  ylim = c(0, 1),
  ...
)

Arguments

object

An object of class "icsurvfit" returned by icsurvfit.

z

Numeric (vector of) covariate values for which to plot the survival curve. If NULL (default) and model is nonparametric, plots the baseline curve.

xlab, ylab

Axis labels.

lty

Line type. Default is 1.

frame.plot

Logical indicating whether to draw a box around the plot.

add

Logical indicating whether to add the curve to an existing plot. If FALSE (default), a new plot is created.

ylim

Numeric vector of length 2 specifying the \(y\)-axis range.

...

Additional graphical parameters passed to plot or lines.