Learn R Programming

bpcp (version 1.4.2)

quantile.kmciLR: 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 kmciLR
quantile(x, probs = c(0.25, 0.5, 0.75), …)
# S3 method for kmci
quantile(x, probs = c(0.25, 0.5, 0.75), …)
# S3 method for kmciLRtidy
quantile(x, probs = c(0.25, 0.5, 0.75), …)
# S3 method for kmciLRgroup
quantile(x, probs = c(0.25, 0.5, 0.75), …)
# S3 method for kmciLR
median(x, …)
# S3 method for kmci
median(x, …)
# S3 method for kmciLRtidy
median(x, …)
# S3 method for 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

Run this code
# NOT RUN {
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"))
# }

Run the code above in your browser using DataLab