ltdSamplingSummary: Constructor for class 'LtdSamplingSummary'.

View source: R/ltdSamplingSummary.R

ltdSamplingSummaryR Documentation

Constructor for class 'LtdSamplingSummary'.

Description

Creates an object of the class 'LtdSamplingSummary'. For given survey parameters (passed to the function as an object of the class SurveyData) ltdSamplingSummary() computes the mean herd sensitivity, the number of herds to test, the expected total number of animals to test and the expected total cost of a survey using limited sampling with a given sequence of animal-level sample sizes. This sequence ranges from 1 to a given upper bound sampleSizeLtdMax. If no upper bound is specified the maximal herd size is used.

Usage

ltdSamplingSummary(survey.Data, sampleSizeLtdMax, nSampleFixVec = NULL, 
	probVec = NULL)

Arguments

survey.Data

Object of class SurveyData. Created by using the function surveyData.

sampleSizeLtdMax

Positive integer. A series of parameters is computed for a sequence of sample limits. These sample limits range from 1 to a given upper bound, defined by sampleSizeLtdMax. If no upper bound is specified then 20 or - if less - the maximal herd size is used.

nSampleFixVec

Numeric vector containing some NAs (optional argument). For risk groups for which the sample size is fixed specify the sample size. For the risk groups for which the sample size should be computed set NA (order of the risk groups must be the same order as in survey.Data@riskValueData).

probVec

Numeric vector. For those risk groups for which the sample size should be computed sample probabilities must be specified. The vector must have the same length as the number of NA entries in nSampleFixVec or if nSampleFixVec is not specified, probVec must have the same length as the number of rows in survey.Data@riskValueData.

Value

The function returns an object of the class LtdSamplingSummary.

Author(s)

Ian Kopacka <ian.kopacka@ages.at>

References

A.R. Cameron and F.C. Baldock, "A new probablility formula to substantiate freedom from disease", Prev. Vet. Med. 34 (1998), pp. 1-17.

A.R. Cameron and F.C. Baldock, "Two-stage sampling surveys to substantiate freedom from disease", Prev. Vet. Med. 34 (1998), pp. 19-30.

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

See LtdSamplingSummary and SurveyData for additional details.

Examples

data(sheepData)
sheepData$size <- ifelse(sheepData$nSheep < 30, "small", "large")
riskValueData <- data.frame(riskGroup = c("small", "large"), 
    riskValues = c(1,2))
mySurvey <- surveyData(nAnimalVec = sheepData$nSheep,
		riskGroupVec = sheepData$size,
		riskValueData = riskValueData,
		populationData = sheepData, designPrevalence = 0.002,
		alpha = 0.05, intraHerdPrevalence = 0.13,
		diagSensitivity = 0.9, costHerd = 30, costAnimal = 7.1)
## Limited sampling without risk groups:    
myLtdSamplingSummary <- ltdSamplingSummary(survey.Data = mySurvey, 
    sampleSizeLtdMax = 10)
## Limited sampling with risk groups: 
myLtdSamplingRG <- ltdSamplingSummary(survey.Data = mySurvey, 
    sampleSizeLtdMax = 10, nSampleFixVec = NULL, probVec = c(1,4))

FFD documentation built on Nov. 10, 2022, 5:48 p.m.