# epiR - RSurveillance function mapping

#### Evan Sergeant and Mark Stevenson

#### 2021-01-12

The following tables lists each of the functions in `RSurveillance` and their equivalent in `epiR`.

## Representative sampling

### Sample size estimation

Functions to estimate sample size using representative population sampling data.
Sampling | Outcome | RSurveillance | epiR
--- | --- | --- | ---
Representative | Prob disease freedom | `n.pfree` | `rsu.sspfree.rs`
Representative | SSe | `n.freedom` | `rsu.sssep.rs`
Two stage representative | SSe | `n.2stage` | `rsu.sssep.rs2st`
Representative | SSe | `n.freecalc` | `rsu.sssep.rsfreecalc`
Pooled representative | SSe | `n.pooled` | `rsu.sssep.rspool`

### Estimation of surveillance system sensitivity

Functions to estimate surveillance system sensitivity (SSe) using representative population sampling data.
Sampling | Outcome | RSurveillance | epiR
--- | --- | --- | ---
Representative | SSe | `sep.binom` | `rsu.sep.rs`
Representative | SSe | `sep.hypergeo` | `rsu.sep.rs`
Representative | SSe | `sep` | `rsu.sep.rs`
Two stage representative | SSe | `sep.sys` | `rsu.sep.rs2st`
Representative | SSe | `sse.combined` | `rsu.sep.rsmult`
Representative | SSe | `sep.freecalc` | `rsu.sep.rsfreecalc`
Representative | SSe | `sep.binom.imperfect` | `rsu.sep.rsfreecalc`
Pooled representative | SSe | `sep.pooled` | `rsu.sep.rspool`
Representative | SSe | `sep.var.se` | `rsu.sep.rsvarse`
Representative | SSp | `spp` | `rsu.spp.rs`
Representative | SSp | `sph.hp` | `rsu.spp.rs`

### Estimation of the probability of disease freedom

Functions to estimate the probability of disease freedom using representative population sampling data.
Sampling | Outcome | RSurveillance | epiR
--- | --- | --- | ---
Representative | Prob disease of freedom | `pfree.1` | `rsu.pfree.rs`
Representative | Prob disease of freedom | `pfree.calc` | `rsu.pfree.rs`
Representative | Equilibrium prob of disease freedom | `pfree.equ` | `rsu.pfree.equ`

## Risk based sampling

### Sample size estimation

Functions to estimate sample size using risk based sampling data.
Sampling | Outcome | RSurveillance | epiR
--- | --- | --- | ---
Risk-based | SSe | `n.rb` | `rsu.sssep.rbsrg`
Risk-based | SSe | `n.rb.varse` | `rsu.sssep.rbmrg`
Risk-based | SSe | `n.rb.2stage.1` | `rsu.sssep.rb2st1rf`
Risk-based | SSe | `n.rb.2stage.2` | `rsu.sssep.rb2st2rf`

### Estimation of surveillance system sensitivity

Functions to estimate surveillance system sensitivity (SSe) using risk based sampling data.
Sampling | Outcome | RSurveillance | epiR
--- | --- | --- | ---
Risk-based | SSe | `sep.rb.bin.varse` | `rsu.sep.rb`
Risk-based | SSe | `sep.rb.bin` | `rsu.sep.rb1rf`
Risk-based | SSe | `sep.rb.hypergeo` | `rsu.sep.rb1rf`
Risk-based | SSe | `sep.rb2.bin` | `rsu.sep.rb2rf`
Risk-based | SSe | `sep.rb2.hypergeo` | `rsu.sep.rb2rf`
Risk-based | SSe | `sep.rb.hypergeo.varse` | `rsu.sep.rbvarse`
Risk-based | SSe | `sse.rb2stage` | `rsu.sep.rb2stage`

## Census data

### Estimation of surveillance system sensitivity

Functions to estimate surveillance system sensitivity (SSe) using census data.
Sampling | Outcome | RSurveillance | epiR
--- | --- | --- | ---
Risk-based | SSe | `sep.exact` | `rsu.sep.cens`

## Passive surveillance data

Functions to estimate surveillance system sensitivity (SSe) using passively collected surveillance data.
Sampling | Outcome | RSurveillance | epiR
--- | --- | --- | ---
Risk-based | SSe | `sep.passive` | `rsu.sep.pass`

## Miscellaneous functions

Miscellaneous functions.
Details | RSurveillance | epiR
--- | --- | ---
Adjusted risk | `adj.risk` | `rsu.adjrisk`
Adjusted risk | `adj.risk.sim` | `rsu.adjrisk`
Series test interpretation, Se | `se.series` | `rsu.dxtest`
Parallel test interpretation, Se | `se.parallel` | `rsu.dxtest`
Series test interpretation, Sp | `sp.series` | `rsu.dxtest`
Parallel test interpretation, Sp | `sp.parallel` | `rsu.dxtest`
Effective probability of infection | `epi.calc` | `rsu.epinf`
Design prevalence back calculation | `pstar.calc` | `rsu.pstar`
Prob disease is less than design prevalence |  | `rsu.sep`