zepid.calc.utils.sensitivity¶
-
zepid.calc.utils.
sensitivity
(detected, cases, alpha=0.05, confint='wald')¶ Calculate the sensitivity from number of detected cases and the number of total true cases.
Parameters: - detected (integer, float) – Number of true cases detected via testing criteria
- cases (integer, float) – Total number of true/actual cases
- alpha (float, optional) – Alpha value to calculate two-sided Wald confidence intervals. Default is 95% confidence interval
- confint (string, optional) – Type of confidence interval to generate. Current options include Wald or Hypergeometric confidence intervals
Returns: Tuple of sensitivity, lower CL, upper CL, SE
Return type: tuple
Examples
Calculating sensitivity
>>> from zepid.calc import sensitivity >>> se = sensitivity(90, 100)
Extract sensitivity
>>> se[0]
Extract confidence intervals for sensitivity
>>> se[1:3]
Extract standard error
>>> se[3]