npv_with_confidence: Negative Predictive Value (with confidence interval)

View source: R/predictive_value.R

npv_with_confidenceR Documentation

Negative Predictive Value (with confidence interval)

Description

Calculate the negative predictive value (NPV) with a confidence interval based on a sensitivity output from agreement(), agreement_fraction(), sensitivity(), or sensitivity_fraction() and a specificity output from agreement(), agreement_fraction(), specificity(), or specificity_fraction().

Usage

npv_with_confidence(sensitivity, specificity, prevalence, interval)

Arguments

sensitivity

Output of a function such as sensitivity().

specificity

Output of a function such as specificity().

prevalence

The estimate of the prevalence of the condition in the population.

interval

The confidence interval used in the sensitivity and specificity calculations.

Value

The negative predictive value, with confidence.

Examples

ppa <- sensitivity(99, 0)
npa <- specificity(99, 0)
npv_with_confidence(ppa, npa, 0.05, 0.95)

bjoleary/dxr documentation built on Dec. 5, 2023, 8:33 p.m.