HerdPlus: SeH and SpH for optimised sample sizes for range of herd sizes

Input Values

Test Sensitivity:
Test Specificity:
Maximum herd sensitivity:
Minimum herd specificity:
Herd size range:
Maximum sample size relative to N:
Animal-level design prevalence:
Use specified proportion
Calculate as 1/N for each herd size
Design prevalence value:
Precision (significant digits):

Calculate optimised sample size and cut-point and resulting herd sensitivity (SeH) and herd specificity (SpH) for a specified range of herd sizes, test sensitivity, test specificity and design prevalence. Design prevalence can be specified as a fixed value, or as the equivalent of one animal per herd. Sample size and cut-point are constrained to provide SeH less than or equal to a specified maximum value and SpH greater than a specified minimum value. Sample sizes are also constrained to be no more than the specified proportion of herd size.

Inputs include:

  • Test sensitivity and specificity;
  • Maximum desired SeH and minimum SpH;
  • Maximum sample size relative to herd size;
  • Specified range of herd/population sizes;
  • Mode of setting design prevalence, either as a specified value or as a proportion of herd size;
  • Animal-level design prevalence (only required if option for specified design prevalence s selected); and
  • The desired precision of results (number of digits to be displayed after the decimal point).

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

  • Table of optimised sample sizes and cut-points and corresponding SeH and SpH values for combinations herd sizes in specified range; and
  • Plot of SeH and SpH values for optimised sample size and cut-point against herd size. and


Developed by Matthias Greiner and Evan Sergeant


  Home  |   About this site  |   Glossary   |   References   |   Links   |  121 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