Learn R Programming

lrstat (version 0.2.13)

survQuantile: Brookmeyer-Crowley Confidence Interval for Quantiles of Right-Censored Time-to-Event Data

Description

Obtains the Brookmeyer-Crowley confidence interval for quantiles of right-censored time-to-event data.

Usage

survQuantile(
  time = NA_real_,
  event = NA_real_,
  cilevel = 0.95,
  transform = "loglog",
  probs = c(0.25, 0.5, 0.75)
)

Value

A data frame containing the estimated quantile and confidence interval corresponding to each specified probability. It includes the following variables:

  • prob: The probability to calculate the quantile.

  • quantile: The estimated quantile.

  • lower: The lower limit of the confidence interval.

  • upper: The upper limit of the confidence interval.

  • cilevel: The confidence interval level.

  • transform: The transformation of the survival function to use to construct the confidence interval.

Arguments

time

The vector of possibly right-censored survival times.

event

The vector of event indicators.

cilevel

The confidence interval level. Defaults to 0.95.

transform

The transformation of the survival function to use to construct the confidence interval. Options include "linear", "loglog", "log", "asinsqrt", and "logit". Defaults to "loglog".

probs

The vector of probabilities to calculate the quantiles. Defaults to c(0.25, 0.5, 0.75).

Author

Kaifeng Lu, kaifenglu@gmail.com

Examples

Run this code

survQuantile(
  time = c(33.7, 3.9, 10.5, 5.4, 19.5, 23.8, 7.9, 16.9, 16.6,
           33.7, 17.1, 7.9, 10.5, 38),
  event = c(0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1),
  probs = c(0.25, 0.5, 0.75))

Run the code above in your browser using DataLab