Plot Method for kaplanMeier

USAGE:

plot.kaplanMeier(kmfit, conf.int=<<see below>>, col=1, lty=1, lwd=1,  
                 xlab="Survival Time", ylab="Proportion Surviving",  
                 xaxs=<<see below>>, add = F, ...) 

REQUIRED ARGUMENTS:

kmfit
an object of class "kaplanMeier", usually returned by the kaplanMeier function.

OPTIONAL ARGUMENTS:

conf.int
determines whether confidence intervals will be plotted. The default is to do so if there is only 1 curve, i.e., no strata.
col
a vector of integers specifying colors for each curve. The default value is 1.
lty
a vector of integers specifying line types for each curve. The default value is seq(length(kmfit$fits)).
lwd
a vector of numeric values for line widths. The default value is 1.
xlab
character string for labeling the x-axis. Default is "Survival Time".
ylab
character string for labeling the y-axis. Default is "Proportion Surviving".
xaxs
the x axis style, as listed in par. Survival curves are traditionally drawn with the curve touching the bounding box on the left edge, but not touching it on the right edge. This corresponds to neither of the two standard S axis styles of "e" (neither touches) or "i" (both touch). If xaxis is missing or NULL the internal axis style is used (xaxs= i) but only after the right endpoint has been extended by 4%.
add
logical value (FLAG) indicating whether (if TRUE) to add the survival curves to the current plot. Default is FALSE.
...
for passing additional arguments to the plot function. In particular main and xlim arguments may be used to add a main title to the plot and to set the x-axis limits to something other than the default.

SIDE EFFECTS:

A plot of survival curves is produced, one curve for each strata, on the current graphics device.

DETAILS:

This function may be used as both a high level and low level graphics function via the add argument. When add = T the survival curves supplied by kmfit are added to the current plot. For stratified fits, you can select survival curves for particular strata and add them to an existing plot by extracting the "fits" component of the kaplanMeier fit object and then selecting the desired strata components. See the EXAMPLES section below to see how this is done.

SEE ALSO:

, .

EXAMPLES:

#simple stratified example 
leukemia.kap <- kaplanMeier(censor(time, status) ~ group, data = leukemia) 
plot(leukemia.kap, lty = 2:3) 
title("Kaplan-Meier Curves\nfor AML Maintenance Study") 
# example using the 'add' argument 
lung.kap <- kaplanMeier(censor(time, status) ~ inst, data = lung,  
                na.action = na.exclude) 
# plot all the strata for the lung.kap fit 
plot(lung.kap) 
# plot only strata 1 and 5. Note: You must call 'plot.kaplanMeier' explicitly  
#  because once you extract the fits component, the '"kaplanMeier"' class  
#  structure is lost. 
plot.kaplanMeier(lung.kap$fits[c(1,5)]) 
#overlay stratum 9, adding confidence intervals 
plot.kaplanMeier(lung.kap$fits[9], add = T, conf.int = T, lty = 4)