epi_predval: Generate ppv and npv from test evaluation and prevalence...

View source: R/epi_predval.R

epi_predvalR Documentation

Generate ppv and npv from test evaluation and prevalence range

Description

Generate ppv and npv from test evaluation and prevalence range

Usage

epi_predval(
  X = NULL,
  Y = NULL,
  se = NULL,
  sp = NULL,
  prevalences = seq(0, 1, 0.01)
)

Arguments

X

An epiR::epi.tests object or test sensitivity

Y

Test specificity if not explicitly assigned to sp

se

optionally test sensitivity

sp

optionally test specificituy

prevalences

vector of prevalences to calculate npv and ppv at

Value

Returns an epi_predval object

Examples

head(mtcars)
res <- epi_tests(mtcars, mpg < 25, cyl > 4, conf.level = 0.95)
epi_predval(res)

ianhandel/epidemr documentation built on April 13, 2022, 11:08 a.m.