sysse: sysse

Description Usage Arguments Details Value Examples

View source: R/herd_se.R

Description

Calculate the surveillance system sensitivity

Usage

1
sysse(dp, hse)

Arguments

dp

The vector of EPIH for all herds tested in the surveillance system

hse

The calculated hse for all the herds tested in the surveillance system

Details

Takes a vector of the sensitivity of herds tested in the surveillance system and a vector of the effective probability of infection in the herds (EPIH) to calculate the total surveillance system sensitivity for the entire program.

Value

A vector (length 1)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
df <- data.frame(id = seq(1:20),
                 n_tested = rpois(20, 6),
                 N = rpois(20, 50),
                 test_Se = 0.3,
                 dp = 0.05)
## Calculate the herd level sensitivity for each of these herds. If
## the ratio of the number tested to number of animals in the herd
## exceeds the threshold then the finite method is used, otherwise the
## infinite method is used.
herd_Se <- hse(df$id,
               df$n_tested,
               df$N,
               df$test_Se,
               df$dp,
               threshold = 0.1)
## Calculate the system sensitivity given the testing and sensitivity
## in these herds:
sysse(dp = rep(0.10, nrow(herd_Se)),
      hse = herd_Se$HSe)

freedom documentation built on Sept. 8, 2020, 5:06 p.m.