zepid.calc.utils.npv_converter

zepid.calc.utils.npv_converter(sensitivity, specificity, prevalence)

Generates the negative predictive value from designated sensitivity, specificity, and prevalence.

\[NPV = \frac{Sp \times (1-P)}{(1-Se) \times P + Sp \times (1-P)}\]
Parameters:
  • sensitivity (float) – Sensitivity of the testing criteria
  • specificity (float) – Specificity of the testing criteria
  • prevalence (float) – Prevalence of the outcome in the population
Returns:

Negative predictive value

Return type:

float

Examples

Calculate the positivity predictive value

>>> from zepid.calc import npv_converter
>>> npv_converter(0.9, 0.88, 0.15)