Skip to contents

For a given combination of prevalence, sensitivity and specificity this gives the critical threshold at which true prevalence equals apparent prevalence

Usage

optimal_performance(p = NULL, sens = NULL, spec = NULL)

Arguments

p

the prevalence or apparent prevalence

sens

the sensitivity of the test

spec

the specificity of the test

Value

the combination of sensitivity and specificity where apparent prevalence equals true prevalence

Examples

optimal_performance(p=0.1, sens=0.75)
#> $p
#> [1] 0.1
#> 
#> $sens
#> [1] 0.75
#> 
#> $spec
#> [1] 0.9722256
#> 
optimal_performance(p=0.005, spec=0.9975)
#> $p
#> [1] 0.005
#> 
#> $sens
#> [1] 0.5024969
#> 
#> $spec
#> [1] 0.9975
#>