A function for constructing confidence bands for a survival curve. This is in contrast to pointwise confidence intervals for the survival curve.

1 2 3 |

`x` |
An object of class |

`confType` |
The type of confidence ban. There are three options: |

`confLevel` |
Confidence level. Only numerical values of |

`type` |
The type of method used to construct the confidence band. Available options are EP ( |

`tL` |
A minimum time to be considered. The default is the first observed or censored time. |

`tU` |
A maximum time to be considered. The default it the last observed time. |

See References.

Returns an object of class `"confBands"`

, which is a list of three items:

`time` |
A vector of times. |

`lower` |
A vector of the lower band values corresponding to the times. |

`upper` |
A vector of the upper band values corresponding to the times. |

David M Diez

Klein JP, Moeschberger ML (2003). Survival Analysis: Techniques for Censored and Truncated Data. Springer Verlag, New York.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
#=====> 5. Kaplan-Meier confidence bands <=====#
data(bmt)
attach(bmt)
mySurv <- Surv(t2[group==1], d3[group==1])
#pdf("confBand.pdf", 7, 4.5)
#par(mar=c(3.9, 3.9, 2.5, 1), mgp=c(2.6, 0.7, 0))
plot(survfit(mySurv ~ 1), xlim=c(100, 600), xlab='time',
ylab='Estimated Survival Function',
main='Reproducing Confidence Bands, bone marrow transplant')
myCB <- confBands(mySurv)
lines(myCB, lty=3)
legend(100, 0.3, legend=c('K-M survival estimate',
'pointwise intervals','EP confidence bands'), lty=1:3)
#dev.off()
detach(bmt)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.