HerdPlus: SeH and SpH for listed herd sizes and optimised sample sizes

Input Values

Test Sensitivity:
Test Specificity:
Animal level design prevalence (pa):
Minimum herd sensitivity:
Cut-point number of reactors:
Precision (significant digits):

Calculate herd sensitivity (SeH) and herd specificity (SpH) for specified herd sizes, optimised sample sizes (up to specified maximum), test sensitivity, test specificity, design prevalence and cut-point numbers of reactors. SeH and SpH are calculated for optimised sample sizes (constrained to <= specified maximum sample size for each herd size) to achieve given minimum SeH (or for given maximum sample size if minimum SeH is not achievable).

Inputs include:

  • Test sensitivity and specificity;
  • Animal-level design prevalence (the hypothetical prevalence to be detected);
  • Minimum desired SeH;
  • The cut-point number of reactors to classify a herd/flock as positive (if there are fewer reactors than the specified cut-point the herd is negative, if the number of reactors is >= cut-point the herd is positive);
  • The desired precision of results (number of digits to be displayed after the decimal point); and
  • Pasted data containing columns of Herd sizes and corresponding Maximum sample sizes.

Results are calculated using the HerdPlus method (Greiner 2006?) and include:

  • A table of optimised sample size and corresponding values for SeH and SpH for each specified herd size and maximum sample size; and
  • A plot of SeH and SpH against herd size.


Developed by Matthias Greiner and Evan Sergeant

Paste herd and sample size data in the space below and click on submit (1st column is herd size, second column is maximum sample size):
Download example herd data


  Home  |   About this site  |   Glossary   |   References   |   Links   |  119 recent calculations

This site was created by Ausvet with funding from a range of sources.
It provides a range of epidemiological tools for the use of researchers and epidemiologists, particularly in animal health.
Please send any comments, questions or suggestions to Evan Sergeant
© 2018 Ausvet