Learn R Programming

survMisc (version 0.2)

quantileSurv: Quantiles for Surv object

Description

Quantiles for Surv object

Usage

quantileSurv(s, q = c(25, 50, 75), alpha = 0.05)

Arguments

s
A Surv object
q
Vector of quantiles (expressed as percentage)
alpha
Significance level $\alpha$

Value

  • A matrix with quantile, and upper and lower confidence intervals. Intervals are calculated from $\sigma$ which is: $$\sigma (t) = \sqrt{ \frac{Var[\hat{S}(t)]}{\hat{S}^2(t)}}$$ The intervals given are:
  • linear$$\hat{S}(t) \pm Z_{1- \alpha} \sigma (t) \hat{S}(t)$$ Where $\hat{S}(t)$ is the Kaplan-Meier survival estimate.
  • log transform$$[ \hat{S}(t)^{\frac{1}{\theta}}, \hat{S}(t)^{\theta} ]$$ Where $\theta$ is: $$\exp{ \frac{Z_{1- \alpha} \sigma (t)}{ \log{\hat{S}(t)}}}$$
  • arcsin-sqrtArcsine-square root transform. Upper: $$\sin^2(\max[0, \arcsin{\sqrt{\hat{S}(t)}} - \frac{Z_{1- \alpha}\sigma(t)}{2} \sqrt{ \frac{\hat{S}(t)}{1-\hat{S}(t)}}])$$ Lower: $$\sin^2(\min[\frac{\pi}{2}, \arcsin{\sqrt{\hat{S}(t)}} + \frac{Z_{1- \alpha}\sigma(t)}{2} \sqrt{ \frac{\hat{S}(t)}{1-\hat{S}(t)}}])$$

References

Strawderman RL, Parzen MI, Wells MT 1993 Accurate Confidence Limits for Quantiles under Random Censoring. Biometrics 1993 43(4):1399--415. http://www.jstor.org/stable/2533506{JSTOR}

Examples

Run this code
data(bmt, package="KMsurv")
b1 <- bmt[bmt$group==1, ] # ALL patients
s1 <- Surv(time=b1$t2, event=b1$d3)
quantileSurv(s1)

Run the code above in your browser using DataLab