confidence_interval#
- EmpiricalDistributionFunction.confidence_interval(confidence_level=0.95, *, method='linear')[source]#
Compute a confidence interval around the CDF/SF point estimate
- Parameters:
- confidence_levelfloat, default: 0.95
Confidence level for the computed confidence interval
- methodstr, {βlinearβ, βlog-logβ}
Method used to compute the confidence interval. Options are βlinearβ for the conventional Greenwood confidence interval (default) and βlog-logβ for the βexponential Greenwoodβ, log-negative-log-transformed confidence interval.
- Returns:
- ci
ConfidenceInterval
An object with attributes
low
andhigh
, instances ofEmpiricalDistributionFunction
that represent the lower and upper bounds (respectively) of the confidence interval.
- ci
Notes
Confidence intervals are computed according to the Greenwood formula (
method='linear'
) or the more recent βexponential Greenwoodβ formula (method='log-log'
) as described in [1]. The conventional Greenwood formula can result in lower confidence limits less than 0 and upper confidence limits greater than 1; these are clipped to the unit interval. NaNs may be produced by either method; these are features of the formulas.References
[1]Sawyer, Stanley. βThe Greenwood and Exponential Greenwood Confidence Intervals in Survival Analysis.β https://www.math.wustl.edu/~sawyer/handouts/greenwood.pdf