FUNCTION to compute the average alphaerror (= error of first kind) for limited sampling.
Description
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.
Usage
1 2 3  computeAlphaLimitedSampling(stockSizeVector, sampleSizeLtd,
intraHerdPrevalence, diagSensitivity,
diagSpecificity = 1, groupVec = NULL)

Arguments
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 
Value
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 
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
computePValue
Examples
1 2 3 4 5  data(sheepData)
alphaList < computeAlphaLimitedSampling(stockSizeVector =
sheepData$nSheep, sampleSizeLtd = 7,
intraHerdPrevalence = 0.2, diagSensitivity = 0.9,
diagSpecificity = 1)
