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.
computeAlphaLimitedSampling(stockSizeVector, sampleSizeLtd,
intraHerdPrevalence, diagSensitivity,
diagSpecificity = 1, groupVec = NULL)
List of 3 elements:
Data frame. Variables size
= vector of the unique
herd sizes in the population, alpha
= vector of herd-level alpha errors
attained by limited sampling scheme for the different herd sizes.
Numeric between 0 and 1. Mean alpha-error attained by strategy "limited sampling" for given sample size and herd size distribution.
If groupVec
is specified, the mean alpha
error is returned for each group, concatenated into a vector. Otherwise this
list element is NULL
Integer vector. Stock sizes of the herds.
Integer. Sample size for limited sampling, i.e., for each herd
sampleSizeLtd
animals are tested, or of the herd contains
less than sampleSizeLtd
animals the entire herd is tested.
Numeric between 0 and 1. Intra-herd prevalence. The number of diseased
animals per herd is computed as
max(1,round(intraHerdPrevalence*stockSizeVector))
(it is assumed that at least one animal is diseased).
Numeric between 0 and 1. Sensitivity (= probability of a testpositive result, given the tested individual is diseased) of the diagnostic test.
Numeric between 0 and 1. Specificity (= probability of a testnegative result, given the tested individual is not diseased) of the diagnostic test.
Character vector. Optional parameter. If specified it must have the same length
as stockSizeVector
. Defines the gouping of the data. Mean Alpha is then
returned for each group.
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. 333-343.
computePValue
data(sheepData)
alphaList <- computeAlphaLimitedSampling(stockSizeVector =
sheepData$nSheep, sampleSizeLtd = 7,
intraHerdPrevalence = 0.2, diagSensitivity = 0.9,
diagSpecificity = 1)
Run the code above in your browser using DataLab