computeAlphaLimitedSampling {FFD} | R Documentation |
FUNCTION to compute the average alpha-error (= error of first kind) for limited sampling.
Description
For sampling strategy "limited sampling" (see Ziller et al., 2002) the function computes the herd-level alpha-errors (= 1-herd sensitivity) for each stock size, as well as the average herd-level alpha-error.
Usage
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. Intra-herd 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 alpha-error 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. 333-343.
See Also
Examples
data(sheepData)
alphaList <- computeAlphaLimitedSampling(stockSizeVector =
sheepData$nSheep, sampleSizeLtd = 7,
intraHerdPrevalence = 0.2, diagSensitivity = 0.9,
diagSpecificity = 1)