'surv' Object Confidence Bands Optimized by Area

Given a certain coverage level, obtains simultaneous confidence bands for the survival and cumulative hazard functions such that the area between is minimized. Produces an approximate solution based on local time arguments.


README

This package approaches simultaneous confidence bands for survival functions purely from an optimization perspective: given a certain coverage level, obtain bands such that the area between is minimized. optband imports LambertW and utils and provides an approximate solution based off local time arguments for both the survival and cumulative-hazard functions.

Installation

install.packages("devtools", repos="http://cran.rstudio.com/")
#> The downloaded binary packages are in
#>  /var/folders/0g/wnxynt411mj4nn_wmt2kj5n40000gn/T//RtmpGG74z5/downloaded_packages
library(devtools)
devtools::install_github("seasamgo/optband")
library(optband)

Methods

opt.ci(survi, conf.level = 0.95, fun = 'surv', tl = NA, tu = NA, samples = 1)

opt.ci takes a survfit object from the survival package with the desired 1 − α coverage level, function of interest (either 'surv' for the survival function or 'cumhaz' for the cumulative-hazard function), optional upper or lower bounds for data truncation, and the number of samples to consider (1 or 2). Defaults are α = 0.05, fun = 'surv', tl = NA, tu = NA, samples = 1.

Other methods/functions are internal and include cumhaz.var, func.sum, modify.surv.fun, psi, riemsum, and surv.range. For more, please view their corresponding help file.

Example

Obtain confidence band for bladder cancer data set inherent to the survival package:

library(survival)
 
## 1-sample case
dat <- bladder[bladder$enum==1,]
S <- survival::survfit(Surv(stop, event) ~ 1, type = "kaplan-meier", data = dat)
opt.S <- optband::opt.ci(S)

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("optband")

0.2.1 by Sam Tracy, a year ago


https://github.com/seasamgo/optband


Report a bug at http://github.com/seasamgo/optband/issues


Browse source code at https://github.com/cran/optband


Authors: Tom Chen & Sam Tracy


Documentation:   PDF Manual  


GPL-2 | GPL-3 license


Imports utils, LambertW

Suggests stats, survival, km.ci, knitr, rmarkdown


See at CRAN