pstar.calc: Design prevalence back-calculation

Description Usage Arguments Value Examples

View source: R/freedom_functions_1.R

Description

Calculates design prevalence required for given sample size and desired population-level sensitivity, assuming imperfect test sensitivity, perfect test specificity and representative sampling

Usage

1
pstar.calc(N = NA, n, sep, se)

Arguments

N

populaton size if known (scalar or vector of same length as n)

n

sample size (scalar or vector)

sep

desired population sensitivity (scalar or vector of same length as n)

se

unit sensitivity (scalar or vector of same length as n)

Value

vector of design prevalence values

Examples

1
2
3
4
5
# examples of pstar.calc- checked
pstar.calc(NA, 280, 0.95, 0.98)
pstar.calc(500, 250, sep=0.95, se=1)
pstar.calc(N=c(100, 500, 1000, 5000, 10000, 100000, NA), n=30, sep=0.95, se=1)
pstar.calc(500, n=30, sep=0.95, se=c(0.5, 0.6, 0.7, 0.8, 0.9, 0.99, 1))

RSurveillance documentation built on July 2, 2020, 2:33 a.m.