quantile.kmciLR {bpcp}R Documentation

Quantiles or Medians from kmci, kmciLR, kmciLRtidy, or kmciLRgroup objects.

Description

Get quantiles or median with the associated confidence intervals from a kmci, kmciLR, kmciLRtidy, or kmciLRgroup object.

Usage

## S3 method for class 'kmciLR'
quantile(x, probs = c(0.25, 0.5, 0.75), ...)
## S3 method for class 'kmci'
quantile(x, probs = c(0.25, 0.5, 0.75), ...)
## S3 method for class 'kmciLRtidy'
quantile(x, probs = c(0.25, 0.5, 0.75), ...)
## S3 method for class 'kmciLRgroup'
quantile(x, probs = c(0.25, 0.5, 0.75), ...)
## S3 method for class 'kmciLR'
median(x, ...)
## S3 method for class 'kmci'
median(x, ...)
## S3 method for class 'kmciLRtidy'
median(x, ...)
## S3 method for class 'kmciLRgroup'
median(x, ...)

Arguments

x

a kmci, kmciLR, kmciLRtidy, or kmciLRgroup object

probs

vector of probability to calculate quantiles

...

parameters passed

Value

A kmciLRtidy or kmciLRgroup object will produce a list of matricies.

The matrix has same number of rows as probs and 4 columns

S(q)

probs, survival estimate at quantile

q

quantile

lower

lower confidence limit of q

upper

upper confidence limit of q

Examples

data(leuk)
data(leuk2)
## kmciTG creates kmci object
fitTG<-kmciTG(leuk$time,leuk$status)
quantile(fitTG)
## bpcp creates kmciLR object 
fitBP<-bpcp(leuk$time,leuk$status)
median(fitBP)

## kmciLRtidy and kmciLRgroups from bpcpfit
practice <- bpcpfit(Surv(time, status)~treatment, data=leuk2)
quantile(practice)
median(practice)

quantile(bpcpfit(leuk2$time, leuk2$status, leuk2$treatment, plotstyle = "standard"))

[Package bpcp version 1.4.2 Index]