estimate_min_specificity: Estimate minimum specificity from population testing

View source: R/estimate_min_specificity.r

estimate_min_specificityR Documentation

Estimate minimum specificity from population testing

Description

Produces an estimate of minimum specificty under the assumption that of the tests identified only negatives as positives

Usage

estimate_min_specificity(
  positive,
  total,
  cutoff = 0.95,
  samples = 1000,
  min_specificity = 0.997,
  max_specificity = 1,
  prevalence = 0
)

Arguments

positive

vector of numbers; the number of positive tests in each sample

total

vector of numbres; the total number of tests (positive and negative) in each sample

cutoff

the cutoff for the estimate, i.e. the confidence level desired

samples

number of values of specificity to sample

min_specificity

minimum specificity to test

max_specificity

maximum specificity to test

prevalence

background prevalence; if >0 then it is assumed that sensitivity is 0, i.e. all positives are still false positives and some of the negatives are false negatives

Value

estimate of the lower bound of specificity at the desired confidence level

Author(s)

Sebastian Funk


epiforecasts/sars.cov.2.england.prevalence documentation built on June 15, 2022, 3:02 p.m.