Class "SurveyData"

Description

Contains the parameters and the data necessery for a survey to substantiate freedom from disease using "individual sampling" or "limited sampling". The parameters are: design prevalence (=prevalence of the disease under the null hypothesis), overall significance level (=1-confidence), intra-herd prevalence, sensitivity of the diagnostic test, as well as cost per tested animal and cost per tested herd.

Objects from the Class

Objects can be created by calls of the form new("SurveyData", ...).

Slots

nAnimalVec:

Object of class "numeric" (nonnegative). Vector containing the number of animals per holding.

riskGroupVec:

Object of class "character". Vector containing the the name of a risk group to which the farm belongs. Optional argument. If provided, it must have the same length as nAnimalVec.

riskValueData:

Object of class "data.frame". Data frame where the first column contains the labels in riskGroupVec and the second column contains the numeric values for the relative infection risk.

populationData:

Object of class "data.frame". Columns of the data frame must have the same length as the vector in slot nAnimalVec. The data frame can contain additional data such as herd id, name and address of the owner etc.

designPrevalence:

Object of class "numeric" with values between 0 and 1. Prevalence of the disease under the null hypothesis.

alpha:

Object of class "numeric" with values between 0 and 1. Type one error for the statistical test (significance level).

intraHerdPrevalence:

Object of class "numeric" with values between 0 and 1. Intra-herd prevalence, i.e., the assumed prevalence of the disease within an infected herd.

diagSensitivity:

Object of class "numeric" with values between 0 and 1. Sensitivity of the diagnostic test used.

costHerd:

Object of class "numeric". Cost per tested herd excluding costs for sampling of animals (e.g., travel costs of the vet.)

costAnimal:

Object of class "numeric". Cost per tested animal, e.g., drawing of samples + analysis in the lab.

Methods

show

signature(object = "SurveyData"): Display structure of the class and content of the slots.

summary

signature(object = "SurveyData"): Display structure of the class and a summary of the content of the slots.

Note

No notes added yet.

Author(s)

Ian Kopacka <ian.kopacka@ages.at>

See Also

Objects of the class 'SurveyData' can be created using the constructor surveyData and are used as types for slots in the class LtdSampling.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Show the structure of the class:
showClass("SurveyData")
## Create an object:
data(sheepData)
mySurvey <- surveyData(nAnimalVec = sheepData$nSheep, 
    populationData = sheepData, designPrevalence = 0.002, 
    alpha = 0.05, intraHerdPrevalence = 0.13,
    diagSensitivity = 0.9, costHerd = 30, costAnimal = 7.1)
## Display results:
summary(mySurvey)