FUNCTION to compute the herdbased alphaerrors (= 1  herd sensitivity).
Description
For a vector of herd sizes the herdbased alphaerrors (= 1herd sensitivity) are computed for either limited or individual sampling; see Ziller et al.
Usage
1 2  computeAlpha(nAnimalVec, method, sampleSizeLtd, herdSensitivity,
intraHerdPrevalence, diagSensitivity, diagSpecificity = 1)

Arguments
nAnimalVec 
Integer vector. Stock sizes of the herds. 
method 
Character string. 
sampleSizeLtd 
Integer. Required only if 
herdSensitivity 
Numeric between 0 and 1. Required only if 
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. The default value is 1, i.e., perfect specificity, and is recommended. 
Value
Returns a vector containing the herdbased alphaerrors, where each
entry in the vector corresponds to an entry in the input argument
nAnimalVec
.
Author(s)
Ian Kopacka <ian.kopacka@ages.at>
References
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.
See Also
Is used in the method sample
for classes IndSampling
and LtdSampling
.
Examples
1 2 3 4 5  data(sheepData)
## Compute the herd sensitivities usinh limited sampling:
alphaVec < computeAlpha(nAnimalVec = sheepData$nSheep,
method = "limited", sampleSizeLtd = 7,
intraHerdPrevalence = 0.2, diagSensitivity = 0.9)
