rsu.spp.rs | R Documentation |
Calculates surveillance system (population level) specificity assuming representative sampling and imperfect test specificity.
rsu.spp.rs(N, n, c = 1, sp.u)
N |
scalar or vector of the same length as that vector of |
n |
scalar or vector defining the sample size. |
c |
scalar or vector of the same length as that vector of |
sp.u |
scalar (0 to 1) or vector of same length as |
This function calculates population specificity using the hypergeometric distribution if N
and c
are provided and the binomial distribution otherwise.
If N
is provided the number of false positives is fixed, based on N
and test specificity sp.u
. This implies that test specificity is a fixed individual-level characteristic (e.g., due to specific cross-reacting infection). If N
is not supplied, cluster (e.g., herd) specificity is a random binomial function based only on the number of samples and test specificity (i.e., specificity is a function of the test and independent of individual characteristics).
A vector of population specificity estimates.
Martin S, Shoukri M, Thorburn M (1992). Evaluating the health status of herds based on tests applied to individuals. Preventive Veterinary Medicine 14: 33 - 43.
## EXAMPLE 1:
## Calculate the surveillance system specificity (i.e., the probability that
## an uninfected population will be correctly identified as negative) if 30
## surveillance units have been tested from a population of 150 using a
## diagnostic test with surveillance unit specificity of 0.90, using a
## cut-point of one or more positives to consider the population positive.
## A specificity of 0.90 means that 9 out of 10 samples from disease-negative
## surveillance units will return a negative result (i.e., one of them will be
## a false positive).
rsu.spp.rs(N = 150, n = 30, c = 1, sp.u = 0.90)
## The surveillance system specificity is 0.03. There is a probability of
## 0.03 that all 30 samples will be negative.
## EXAMPLE 2:
## Now assume we set a cut-point of 6. That is, 6 or more samples have to
## return a positive result for us to declare the population positive:
rsu.spp.rs(N = 150, n = 30, c = 6, sp.u = 0.90)
## The surveillance system specificity is 0.95.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.