computeAlpha {FFD} | R Documentation |
FUNCTION to compute the herd-based alpha-errors (= 1 - herd sensitivity).
Description
For a vector of herd sizes the herd-based alpha-errors (= 1-herd sensitivity) are computed for either limited or individual sampling; see Ziller et al.
Usage
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. 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. The default value is 1, i.e., perfect specificity, and is recommended. |
Value
Returns a vector containing the herd-based alpha-errors, 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. 333-343.
See Also
Is used in the method sample
for classes IndSampling
and LtdSampling
.
Examples
data(sheepData)
## Compute the herd sensitivities usinh limited sampling:
alphaVec <- computeAlpha(nAnimalVec = sheepData$nSheep,
method = "limited", sampleSizeLtd = 7,
intraHerdPrevalence = 0.2, diagSensitivity = 0.9)