ppv_with_confidence: Positive Predictive Value (with confidence interval)

View source: R/predictive_value.R

ppv_with_confidenceR Documentation

Positive Predictive Value (with confidence interval)

Description

Calculate the positive predictive value (PPV) 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

ppv_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 positive predictive value, with confidence.

Examples

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

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