View source: R/kmciFunctions.R
quantile.kmciLR | R Documentation |
kmci
, kmciLR
, kmciLRtidy
, or kmciLRgroup
objects.
Get quantiles or median with the associated confidence intervals from a kmci
, kmciLR
, kmciLRtidy
, or kmciLRgroup
object.
## 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, ...)
x |
a |
probs |
vector of probability to calculate quantiles |
... |
parameters passed |
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 |
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.