Description Usage Arguments Details TODO
Compute the probability that we observe n positive test results, given a population prevalence, total population size, and sensitivity and specificity for the test.
1 | pnpos(k, p, npos, Npop, phi, eta)
|
k |
Sample size |
p |
Population prevalence |
npos |
Target number of positive observations |
Npop |
Total population |
phi |
Test sensitivity |
eta |
Test specificity |
The probability of observing X positive results is given by the probability
mass function for the hypergeometric distribution, ρ_H, which is
calculated with dhyper
. The correction for test errors
is calculated with pnetfn
. You get n positives if there
were m positives in your sample, and the net false negatives were equal
to m-n. Therefore,
P(X = n) = ∑_{i=0}^{k} ρ_H(i, M, N-M, k) * P(NFN=i-n).
We allow the user to specify an arbitrary population prevalence; it will be rounded to integer population counts.
This function should really be called dnpos
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.