For sampling strategy "limited sampling" (see Ziller et al., 2002) the function computes the herdlevel alphaerrors (= 1herd sensitivity) for each stock size, as well as the average herdlevel alphaerror.
1 2 3  computeAlphaLimitedSampling(stockSizeVector, sampleSizeLtd,
intraHerdPrevalence, diagSensitivity,
diagSpecificity = 1, groupVec = NULL)

stockSizeVector 
Integer vector. Stock sizes of the herds. 
sampleSizeLtd 
Integer. Sample size for limited sampling, i.e., for each herd

intraHerdPrevalence 
Numeric between 0 and 1. Intraherd prevalence. The number of diseased
animals per herd is computed as

diagSensitivity 
Numeric between 0 and 1. Sensitivity (= probability of a testpositive result, given the tested individual is diseased) of the diagnostic test. 
diagSpecificity 
Numeric between 0 and 1. Specificity (= probability of a testnegative result, given the tested individual is not diseased) of the diagnostic test. 
groupVec 
Character vector. Optional parameter. If specified it must have the same length
as 
List of 3 elements:
alphaDataFrame 
Data frame. Variables 
meanAlpha 
Numeric between 0 and 1. Mean alphaerror attained by strategy "limited sampling" for given sample size and herd size distribution. 
meanAlphaRiskGroups 
If 
Ian Kopacka <ian.kopacka@ages.at>
M. Ziller, T. Selhorst, J. Teuffert, M. Kramer and H. Schlueter, "Analysis of sampling strategies to substantiate freedom from disease in large areas", Prev. Vet. Med. 52 (2002), pp. 333343.
1 2 3 4 5  data(sheepData)
alphaList < computeAlphaLimitedSampling(stockSizeVector =
sheepData$nSheep, sampleSizeLtd = 7,
intraHerdPrevalence = 0.2, diagSensitivity = 0.9,
diagSpecificity = 1)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.