Description Usage Arguments Details Value Author(s) See Also Examples
Computes, and then plots, an exact nonparametric confidence band for the population survivor function based on its one-sample Kaplan-Meier estimate and the modified B-J statistic. The confidence level, which can be specified by the user, must be a proportion between 0 and 1.
1 |
sobj |
a one-sample Kaplan-Meier estimate, provided in the form of a |
conf.level |
confidence level, a proportion between 0 and 1. The default value is 0.95 |
... |
Additional arguments, such as axis labels, scaling, etc., to pass
to the generic |
An exact nonparametric confidence band with the specified level of confidence is plotted as
lower and upper estimates of the
survivor function. These estimates are calculated by the function confband. Option
lty=2 in the display distinguishes the nonparametric confidence band from the Kaplan-Meier estimate which, by default,
is plotted as a solid line (lty=1)
The function returns two outputs, a scalar, which is printed, and a plot. The scalar value is the required quantile from the exact null distribution of the sample-specific modified B-J statistic derived from the single-sample nonparametric Kaplan-Meier estimate.
David E. Matthews dematthews@uwaterloo.ca
1 2 3 4 5 6 7 8 9 10 | ## plot an exact, nonparametric, 95% confidence band for leukemia patient
## remission experience based on data from 20 patients receiving
## Treatment B
time<-c(1,1,2,2,3,4,5,8,8,9,11,12,14,16,18,21,27,31,38,44)
status<-c(rep(1,16),0,1,0,1)
fit<-survfit(Surv(time,status)~1)
plotbands(fit,xlab="Time (in months)",ylab="Probability")
## Repeat the same calculations, but require only 80% confidence
plotbands(fit,0.80,xlab="Time (in months)",ylab="Probability")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.