Description Objects from the Class Slots Methods Note Author(s) See Also Examples

Contains the parameters and the data necessery for a survey to substantiate freedom from disease using "individual sampling". Additionally to the survey parameters: design prevalence (=prevalence of the disease under the null hypothesis), overall significance level (=1-confidence), intra-herd prevalence, sensitivity of the diagnostic test, cost per tested animal and cost per tested herd, the object contains the the number of herds to be tested, the mean overall number of animals to be tested and the expected costs for a range of possible herd sensitivities.

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

.

`surveyData`

:Object of class

`"SurveyData"`

. Containing the necessary survey parameters.`herdSensVec`

:Object of class

`"numeric"`

with values between 0 and 1. Mean herd sensitivity in the population (vector).`nHerdsVec`

:Object of class

`"numeric"`

. Number of herds to be tested according to the herd sensitivity`herdSensVec`

(vector).`nHerdsPerRiskGroupMx`

:Object of class

`"matrix"`

. Number of herds to be tested per risk group [columns] and sample limit [rows] (if population is stratified by risk groups).`nSampleFixVec`

:Object of class

`"numeric"`

. Numeric vector containing some NAs (optional argument). For risk groups for which the sample size is fixed it specifies the sample size. For the risk groups for which the sample size was computed it was set to NA (order of the risk groups is the same as in`[email protected]`

).`probVec`

:Object of class

`"numeric"`

. Contains the sample probabilities for those risk groups for which the sample size was computed (=NA entries in`nSampleFixVec`

).`nAnimalsMeanVec`

:Object of class

`"numeric"`

. Expected total number of animals to be tested in the survey (vector).`expectedCostVec`

:Object of class

`"numeric"`

. Expected costs of the survey (vector).

- HTML
`signature(x = "IndSamplingSummary")`

: Creates an html file containing the summary data and the diagnostic plots. Title, file name, output directory, css-file, etc. can additionally be specified using the parameters,`filename`

,`outdir`

,`CSSFile`

,`Title`

, as well as all the other parameters of the R2HTML-function`HTMLInitFile`

.- plot
`signature(x = "IndSamplingSummary")`

: Create plots of 1) the mean number of animals to be tested per herd, 2) the number of herds to be tested, 3) the expected total number of animals to be tested, 4) the expected total cost of the survey plotted against the vector of herd sensitivities.- show
`signature(object = "IndSamplingSummary")`

: Display structure of the class and content of the slots.- summary
`signature(object = "IndSamplingSummary")`

: Display structure of the class and a summary of the content of the slots.

No notes yet.

Ian Kopacka <[email protected]>

The slot `surveyData`

contains an object of the class
`SurveyData`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
## Show the structure of the class:
showClass("IndSamplingSummary")
## 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 = 15, costAnimal = 20)
myIndSamplingSummary <- indSamplingSummary(survey.Data = mySurvey,
stepSize = 0.06)
## Display results:
summary(myIndSamplingSummary)
plot(myIndSamplingSummary)
## Write results to an html-file:
## Not run:
target <- HTMLInitFile(getwd(), filename = "ItdSampling")
HTML(myIndSamplingSummary)
HTMLEndFile()
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.