wkmQuantile: wkmQuantile

Description Usage Arguments Value References Examples

View source: R/quantiles.R

Description

Estimate arbitrary quantiles of a survival distribution based on the (weighted) Kaplan-Meier

Usage

1
2
wkmQuantile(tau, formula, data, conf.level = 0.95, null.value = NULL,
  rr.subset = rep(TRUE, nrow(data)))

Arguments

tau

number between 0 and 1 specifiying the quantile to estimate

formula

an object of class '"formula"' specifying the conditional survival model

data

data frame containing the variables in formula

conf.level

confidence level (or NULL if no confidence interval should be calculated)

null.value

true value of quantile or NULL if no p-value should be calculated

rr.subset

logical vector defining subset of observations to use for response rate estimation (default: use all observations)

Value

An object of class '"survQuantile"'

References

brookmeyer_confidence_1982

Examples

1
2
3
4
5
6
T <- c(rexp(100, 1), rexp(100, 2))
C <- c(rexp(100, 1), rexp(100, 2))
Y <- pmin(T, C)
D <- T <= C
Z <- rep(c(0,1), c(100, 100))
wkmQuantile(0.5, Surv(Y, D) ~ strata(Z), data.frame(Y=Y, D=D, Z=Z))

mbrueckner/AHR documentation built on May 22, 2017, 12:16 a.m.