quantile.prodlim | R Documentation |
Quantiles for Kaplan-Meier and Aalen-Johansen estimates.
## S3 method for class 'prodlim'
quantile(x, q, cause = 1, ...)
x |
Object of class |
q |
Quantiles. Vector of values between 0 and 1. |
cause |
For competing risks the cause of interest. |
... |
not used |
Thomas Alexander Gerds <tag@biostat.ku.dk>
library(lava)
set.seed(1)
d=SimSurv(30)
# Quantiles of the potential followup time
g=prodlim(Hist(time,status)~1,data=d,reverse=TRUE)
quantile(g)
# survival time
f=prodlim(Hist(time,status)~1,data=d)
f1=prodlim(Hist(time,status)~X1,data=d)
# default: median and IQR
quantile(f)
quantile(f1)
# median alone
quantile(f,.5)
quantile(f1,.5)
# competing risks
set.seed(3)
dd = SimCompRisk(30)
ff=prodlim(Hist(time,event)~1,data=dd)
ff1=prodlim(Hist(time,event)~X1,data=dd)
## default: median and IQR
quantile(ff)
quantile(ff1)
print(quantile(ff1),na.val="NA")
print(quantile(ff1),na.val="Not reached")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.