Description Usage Arguments Details Value Examples
EffProbInf
1 | EffProbInf(dp, AR)
|
dp |
A vector The design prevalence |
AR |
A vector of the adjusted risks of the unit risk groups |
Calculate the effective probability of infection (EPI) for each unit risk group in the population. This could be either at the herd level or within herd level. The dp for herds is therefore the minimum prevalence among herds that you would like to design the surveillance system to be able to detect. The dp for within herds is therefore the minimum prevalence of the disease within a herd among the animals that you would like to design the surveillance system to detect.
A vector of EPI
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | df <- sample_data(nherds = 100,
mean_herd_size = 300,
n_herd_urg = 2,
herd_dist = c(0.9, 0.1),
herd_samp_frac = 0.01,
herd_samp_dist = c(0.3, 0.7),
n_animal_urg = 1,
animal_dist = c(1),
animal_samp_frac = 0.05,
animal_samp_dist = c(1),
seed = 1)
## The proportion of herds in each unit risk group
table(df$herd_urg)/nrow(df)
## Calculate the Adjusted risk for each unit risk group based on the
## proportion in each group and the estimated relative risk of being
## in that group:
AR <- freedom::adjusted_risk(as.numeric(table(df$herd_urg)/nrow(df)),
c(1, 2.3))
EPHI <- EffProbInf(0.05, AR)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.