English      Chinese      French      German      Indonesian      Spanish
HerdPlus utilities

HerdPlus: SeH for fixed sample size and cut-point

Download example data

Calculate herd sensitivity (SeH) and herd specificity (SpH) for a specified test sensitivity, test specificity, cut-point number of reactors and design prevalence for a list of herd sizes and corresponding sample sizes.

A meta-simulation is also run, using the calculated SeH and SpH for each herd size, to calculate the number of herds required to be tested to achieve a specfied target system sensitivity (SSe). SSe achieved and the number of animals to be tested from a specified number of herds selected at random from the population are also calculated.

Inputs include:

  • Test sensitivity and specificity;
  • Animal-level and herd-level design prevalence values;
  • Desired cut-point number of reactors to declare a herd positive;
  • Target number of herds to be tested from population;
  • Target system sensitivity (SSe) for population testing scheme;
  • Number of iterations per simulation and number of simulations for meta-simulation of population testing;
  • The desired precision of results (number of digits to be displayed after the decimal point); and
  • Pasted data comprising columns for herd size and corresponding sample size and counts or relative frequency of each herd size in the population. Include a row of column headings in the data.

Note:Large numbers of meta-simulations generally provide only minimal additional benefit and may result in a system crash if used in combination with large numbers of iterations. A maximum of 100 meta-simulations is usually ample.

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

  • Table of SeH and SpH values for each specified herd and sample size;
  • Plot of SeH and SpH values against herd size;
  • Summary table of meta-simulation results including median and 5th/95th percentiles of the numbers of herds required to achieve the target SSe and the achieved SSe and number of animals tested under the optimised scheme for the specified number of herds tested; and
  • Detailed results of meta-simulations.


Developed by Matthias Greiner and Evan Sergeant