survfit
plot.survfit(survfit, conf.int=<<see below>>, mark.time=T,
mark=3, col=1, lty=1, lwd=1, cex=1, log=F,
xscale=1, yscale=1, firstx=0, firsty=1, xmax,
ymin=0, fun, xlab="", ylab="", xaxs="S", ...)
survfit,
usually returned by the
survfit function.
FALSE, no labeling is done.
If
TRUE,
then curves are marked at each censoring time which is not also a death time.
If
mark.time is a numeric vector,
then curves are marked at the specified time points.
Survival curve objects created from a
coxph
model does not include the censoring times.
If your
survfit object was created
from a
coxph object
you cannot use the
TRUE value for this argument,
you must provide a numeric vector of times.
lines help file contains
examples of the possible marks.
The vector is reused cyclically if it is shorter than the number of curves.
1.
1.
1.
TRUE the y axis wll be
on a log scale.
Alternately, one of the standard character strings "x", "y", or "xy"
can be given to specific logarithmic horizontal and/or vertical axes.
lines(surv.exp(...))", say,
will perform as it did without the
yscale argument.
NA
the plot will start at the first time point of the curve.
xlim graphical parameter,
warning messages about out of bounds points are not generated.
ymin=0 ensures that the y axis
will go down to 0. The parameter is ignored if the
fun
argument is present, or if it has been set to
NA, or
if the survival probabilities go below
ymin. Use
ylim to decrease the range of the y axis.
fun=log is an alternative way
to draw a log-survival curve
(but with the axis labeled with log(S) values),
and
fun=sqrt would generate a curve
on square root scale.
Four often used transformations can be specified with a character
argument instead:
"log"
is the same as using the
log=T option,
"event" plots cumulative events (f(y) = 1-y),
"cumhaz" plots
the cumulative hazard function (f(y) = -log(y)),
and
"cloglog" creates
a complimentary log-log survival plot (f(y) = log(-log(y))
along with log scale for the x-axis).
"S" for a survival curve or a standard x axis style as listed in
par.
Survival curves are usually displayed with the curve touching the y-axis,
but not touching the bounding box of the plot on the other 3 sides.
Type
"S" accomplishes this by manipulating the plot range and then using
the
"i" style internally.
x
and
y,
containing the coordinates of the last point on each of the curves
(but not the confidence limits).
This may be useful for labeling.
The
log=T option does extra work to avoid log(0),
and to try to create a pleasing result.
If there are zeros, they are plotted by default
at 0.8 times the smallest non-zero value on the curve(s).
leukemia.surv <- survfit(Surv(time, status) ~ group,
data=leukemia)
plot(leukemia.surv, lty=2:3)
legend(100, .9, c("Maintenance", "No Maintenance"), lty=2:3)
title("Kaplan-Meier Curves\nfor AML Maintenance Study")
lsurv2 <- survfit(Surv(time, status) ~ group, leukemia,
type='fleming')
plot(lsurv2, lty=2:3, fun="cumhaz",
xlab="Months", ylab="Cumulative Hazard")