Learn R Programming

survival (version 2.6)

print.survfit: Print a Short Summary of a Survival Curve

Description

Print number of observations, number of events, the mean survival and its standard error, and the median survival with confidence limits for the median.

Usage

print.survfit(x, scale=1,digits = max(options()$digits - 4, 3),print.n=getOption("survfit.print.n"),...)

Arguments

x
the result of a call to the survfit function.
scale
a numeric value to rescale the survival time, e.g., if the input data to survfit were in days, scale=365 would scale the printout to years.

Value

  • x, with the invisible flag set.

Side Effects

the number of observations (see below), the number of events, the mean survival and its standard error, and the median survival with its confidence interval are printed. If there are multiple curves, there is one line of output for each.

Details

The mean and its variance are based on a truncated estimator. That is, if the last observation(s) is not a death, then the survival curve estimate does not go to zero and the mean is undefined. In such a case, the estimator is based on an assumption that the true curve goes to zero just beyond the last observed follow up time; it will systematically underestimate the true mean.

The median and its confidence interval are defined by drawing a horizontal line at 0.5 on the plot of the survival curve and its confidence bands. The intersection of the line with the lower CI band defines the lower limit for the median's interval, and similarly for the upper band. If any of the intersections is not a point, then we use the smallest point of intersection, e.g., if the survival curve were exactly equal to 0.5 over an interval.

The "number of observations" is not well-defined for counting process data. Previous versions of this code used the number at risk at the first time point. This is misleading if many individuals enter late or change strata. The original S code for the current version uses the number of records, which is misleading with time-dependent covariates. Four possibilities are provided, controlled by print.n or by options(survfit.print.n): "none" prints NA, "records" prints the number of records, "start" prints the number at the first time point and "max" prints the maximum number at risk. The initial default is "start".

References

Miller, Rupert G., Jr. (1981) Survival Analysis, Wiley, New York, p 71.

See Also

summary.survfit

Examples

Run this code
##effect of print.n
data(heart)
a<-coxph(Surv(start,stop,event)~age+strata(transplant),data=heart)
b<-survfit(a)
print(b,print.n="none")
print(b,print.n="records")
print(b,print.n="start")
print(b,print.n="max")

Run the code above in your browser using DataLab