Step 2 is to estimate required sample size to achieve a sufficiently precise estimate in endemic herds (i.e. 2 or more lesions).
We will aim to have an estimate that is within 10% (on an aboslute scale) of this estimate.
Parameters in this calculation are: Se = 0.63, Sp = 1.0 Confidence interval: 95% Epsilon: 0.1 Underlying prevalence = will check at different prevalences ranging from 0.1 to 0.4. The observed prevalence in our sample of herds is 0.34 (“prev.true” below).
Will use the following table for sampling of herds that have 2 or more lesions.
Show the code
list <- list %>%select(herdsize,sample.prev.true)list %>% kable
herdsize
sample.prev.true
100
63
120
70
140
76
160
82
180
87
200
91
220
95
240
98
260
101
280
104
300
107
320
109
340
112
360
114
380
115
400
117
420
119
440
120
460
122
480
123
500
124
600
130
700
134
800
137
900
140
1000
142
Step 3 is to estimate required sample size to maintain reasonable herd sensitivity
Method based on Wayne Martin paper from 1992. Implemented in epiR - rsu.sssep.rs function.
Martin S, Shoukri M, Thorburn M (1992). Evaluating the health status of herds based on tests applied to individuals. Preventive Veterinary Medicine 14: 33 - 43.