quantile.prodlim: Quantiles for Kaplan-Meier and Aalen-Johansen estimates.

Description Usage Arguments Author(s) Examples

Description

Quantiles for Kaplan-Meier and Aalen-Johansen estimates.

Usage

1
2
## S3 method for class 'prodlim'
quantile(x, q, cause = 1, ...)

Arguments

x

Object of class "prodlim".

q

Quantiles. Vector of values between 0 and 1.

cause

For competing risks the cause of interest.

...

not used

Author(s)

Thomas Alexander Gerds <tag@biostat.ku.dk>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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")

prodlim documentation built on Nov. 17, 2019, 5:06 p.m.