Description Usage Arguments Value Author(s) References See Also Examples

View source: R/computePValueRiskGroups.R

For a population that is stratified into risk groups the function computes the
probability of finding no testpositives in a sample of given size using an
imperfect diagnostic test. For each of the risk groups the population size
`nPopulationVec`

, the sample size `nSampleVec`

and the relative
infection risk `nRelRiskVec`

must be specified. The discussed probability
corresponds to the alpha-error (=error of the first kind) of the overall test
with null hypothesis: prevalence = design prevalence.

1 2 3 | ```
computePValueRiskGroups(nPopulationVec, nSampleVec,
nRelRiskVec, nDiseased, sensitivity,
specificity = 1)
``` |

`nPopulationVec` |
Integer vector. Population sizes of the risk groups. |

`nSampleVec` |
Integer vector. Sample sizes of the risk groups. |

`nRelRiskVec` |
Numeric vector. (Relative) infection risks of the risk groups. |

`nDiseased` |
Integer. Number of diseased elements in the population according to the design prevalence. |

`sensitivity` |
Numeric between 0 and 1. Sensitivity (= probability of a testpositive result, given the tested individual is diseased) of the test (e.g., diagnostic test or herd test). |

`specificity` |
Numeric between 0 and 1. Specificity (= probability of a testnegative result, given the tested individual is not diseased) of the test (e.g., diagnostic test or herd test). The default value is 1. |

The return value is a numeric between 0 and 1. It is the probability of finding no testpositives (not diseased!) in the sample.

Ian Kopacka <[email protected]>

A.R. Cameron and F.C. Baldock, "A new probablility formula to substantiate freedom from disease", Prev. Vet. Med. 34 (1998), pp. 1-17.

P.A.J.Martin, A.R. Cameron, M. Greiner, "Demonstrating freedom from disease using multiple complex data sources. : A new methodology based on scenario trees", Prev. Vet. Med. 79 (2007), pp. 71 - 97.

Calls `computePValue`

1 2 3 4 5 6 7 8 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.