Last chance! 50% off unlimited learning
Sale ends in
confidence intervals for survival curves.
ci(x, ...)# S3 method for ten
ci(x, ..., CI = c("0.95", "0.9", "0.99"), how = c("point",
"nair", "hall"), trans = c("log", "lin", "asi"), tL = NULL, tU = NULL,
reCalc = FALSE)
# S3 method for stratTen
ci(x, ..., CI = c("0.95", "0.9", "0.99"),
how = c("point", "nair", "hall"), trans = c("log", "lin", "asi"),
tL = NULL, tU = NULL)
An object of class ten
.
Additional arguments (not implemented).
Confidence intervals. As the function currently relies on lookup tables, currently only 90%, 95% (the default) and 99% are supported.
Method to use for confidence interval.
point
(the default) uses pointwise confirence intervals.
The alternatives use confidence bands (see details).
Transformation to use.
The default is trans="log"
.
Also supported are linear and arcsine-square root transformations.
Lower time point. Used in construction of confidence bands.
Upper time point. Used in construction of confidence bands.
Recalcuate the values?
If reCalc=FALSE
(the default) and the ten
object already has
the calculated values stored as an attribute
,
the value of the attribute
is returned directly.
The ten
object is modified in place by the additional of a
data.table
as an attribute
.
attr(x, "ci")
is printed.
This A survfit
object. The upper
and lower
elements in the list (representing confidence intervals)
are modified from the original.
Other elements will also be shortened if the time range under consideration has been reduced from the original.
In the equations below
The pointwise confidence intervals are valid for individual
times, e.g. median
and quantile
values.
When plotted and joined for multiple points they tend to
be narrower than the bands described below.
Thus they tend to exaggerate the impression of certainty
when used to plot confidence intervals for a time range.
They should not be interpreted as giving the intervals
within which the entire survival function lies.
For a given significance level
linear
log transform
arcsine-square root transform
upper:
Confidence bands give the values within which the survival function falls within a range of timepoints.
The time range under consideration is given so that
For a sample size
For the Nair or equal precision (EP) confidence bands,
we begin by obtaining the relevant
confidence coefficient
The intervals are:
linear
log transform (the default)
This uses
arcsine-square root transform
upper:
For the Hall-Wellner bands the confidence coefficient
In this case
The intervals are:
linear
log transform
arcsine-square root transform
upper:
Nair V, 1984. Confidence bands for survival functions with censored data: a comparative study. Technometrics. 26(3):265-75. http://www.jstor.org/stable/1267553 JSTOR
Hall WJ, Wellner JA, 1980. Confidence bands for a survival curve from censored data. Biometrika. 67(1):133-43. http://www.jstor.org/stable/2335326 JSTOR
# NOT RUN {
## K&M 2nd ed. Section 4.3. Example 4.2, pg 105.
data("bmt", package="KMsurv")
b1 <- bmt[bmt$group==1, ] # ALL patients
## K&M 2nd ed. Section 4.4. Example 4.2 (cont.), pg 111.
## patients with ALL
t1 <- ten(Surv(t2, d3) ~ 1, data=bmt[bmt$group==1, ])
ci(t1, how="nair", trans="lin", tL=100, tU=600)
## Table 4.5, pg. 111.
lapply(list("lin", "log", "asi"),
function(x) ci(t1, how="nair", trans=x, tL=100, tU=600))
## Table 4.6, pg. 111.
lapply(list("lin", "log", "asi"),
function(x) ci(t1, how="hall", trans=x, tL=100, tU=600))
t1 <- ten(Surv(t2, d3) ~ group, data=bmt)
ci(t1, CI="0.95", how="nair", trans="lin", tL=100, tU=600)
## stratified model
data("pbc", package="survival")
t1 <- ten(coxph(Surv(time, status==2) ~ log(bili) + age + strata(edema), data=pbc))
ci(t1)
# }
Run the code above in your browser using DataLab