
Confidence intervals for survival curves
survfit_confint.RdCompute the confidence intervals for a survfit object, using one of several approximations.
Arguments
- p
the estimate, i.e., the
surv,pstateorcumhazcomponent of a survfit object- se
vector or matrix of standard errors
- logse
if TRUE, the provided
secomponent is the std of log(p)- conf.type
one of "plain", "log", "log-log", "logit", or "arcsin"
- conf.int
the confidence level, a value strictly between 0 and 1
- selow
alternate standard error for the lower limit
- ulimit
if TRUE, constrain the result to be between 0 and 1
Details
This routine is used internally to create confidence intervals and would rarely be called by a user (but perhaps by another package). As such it does very little checking of the input arguments.
"Plain" intervals of p +- 1.96*se have been shown by many authors to perform poorly. Which of the other choices is "best" depends on the details of the simulation study used to evaluate the method, all do quite well overall.
For log intervals, the CI at p=0 is exp(log(0) + se) which becomes NA in R, and likewise for p= 0 or 1 when using log-log or logit. If the se is 0, however, the routine returns p as the upper and lower limit. (One side effect of the NA is that the plotted se bands for a Kaplan-Meier whose final time point is a death will stop at the death time and not plunge to 0; i.e., not have the final stair step, a graphical aspect we prefer.)