drsurv: Bootstrap pointwise confidence bands for survival ratio and...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/drsurv.R

Description

Estimate the survival ratio and survival difference accompanied by their pointwise confidence bands to provide a comparison of the survival prospects (S(t)) for independent and paired survival problems.

Usage

1
2
drsurv(time, status, factor, ref = NULL, tgrid = NULL, paired = FALSE, id = NULL,
  clevel = 0.95, nboot = 1000)

Arguments

time

a vector of the observed survival times.

status

a binary vector indicating the censoring status (typically 0 = 'censored', 1 = 'event').

factor

a binary vector indicating the group levels.

ref

the reference level (typically a string) used as the level to compare the survival prospects with.

tgrid

a sequence of follow-up time points to calculate survival estimates for.

paired

a logical indicator whether the survival data is paired. The defaults is paired = FALSE.

id

a pair identifier variable which must be provided for paired survival data problems (i.e. when paired = TRUE).

clevel

the confidence level used for constructing the pointwise confidence bands. The default is clevel = 0.95.

nboot

an integer indicating the number of bootstrap replicates. The defaults is nboot = 1000.

Value

A list of objects including a data frame of the estimates of survival ratio and survival difference accompanied by their pointwise confidence bands. In addition, it includes the confidence level used, the factor levels, the number of bootstrap replicates, whether an independent or paired design was used and the p-value from the log-ranke test of equality for independent designs.

Author(s)

Amirhossein Jalali, Shirin Moghaddam, Davood Roshan, John Newell

References

Newell, J., Kay, J. W., & Aitchison, T. C. (2006). Survival ratio plots with permutation envelopes in survival data problems. Computers in biology and medicine, 36(5), 526-541.

See Also

Surv, ggsurv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
require(survival)

##### Independent survival data

data(lung)
fit1 <- drsurv(time = lung$time, status = lung$status, factor = lung$sex)
ggsurv(fit1)

##### Paired survival data
data(retinopathy)
fit2 <- drsurv(retinopathy$futime, retinopathy$status, retinopathy$trt,
  paired = TRUE, id = retinopathy$id)
head(fit2$surv)
ggsurv(fit2, statistics = "all")

survRatio documentation built on Nov. 19, 2020, 9:07 a.m.