Learn R Programming

popEpi (version 0.2.1)

plot.survtab: plot method for survtab objects

Description

Plotting for survtab objects

Usage

## S3 method for class 'survtab':
plot(x, y = NULL, subset = NULL, conf.int = NULL,
  col = NULL, lty = NULL, ylab = NULL, xlab = NULL, ...)

Arguments

x
a survtab output object
y
survival a character vector of variable names to plot; e.g. c("surv.obs","r.e2")
subset
a logical condition; obj is subset accordingly before plotting
conf.int
logical; if TRUE, adds any confidence intervals present in obj for variables in y
col
line colour; one value for each survival variable; will be recycled
lty
line type; one value for each survival variable; will be recycled
ylab
label for Y-axis
xlab
label for X-axis
...
additional arguments passed on to plot and lines.survtab; e.g. ylim can be defined this way

Examples

Run this code
x <- lexpand(sire, fot=seq(0,5,1/12), status=status, pophaz=popmort)
st <- survtab(x)
plot(st, "r.e2")

plot(st, c("surv.obs", "r.e2"), conf.int=TRUE, col=1:2, xlim=c(0,5))

Run the code above in your browser using DataLab