# optvac: Optimal (Static) Vaccination Policy In amei: Adaptive Management of Epidemiological Interventions

## Description

A Monte Carlo method is used to calculate the expected costs of a range of static vaccination policies for an epidemic with a known parameterization and initialization

## Usage

 ```1 2``` ```optvac(init, params, vacgrid, costs, T = 40, MCvits = 100, midepi = FALSE, start = 7) ```

## Arguments

 `init` a `list` containing scalar entries `\$S0`, `\$I0`, `\$R0`, `\$D0` depicting the initial number of susceptibles, infecteds, recovereds, and deads in the outbreak `params` a `list` containing scalar entries `\$b`, `\$k`, `\$nu`, and `\$mu` depicting the true parameters of the SIR model representing the transmission probability, clumpiness parameter, the recovery probability, and the mortality probability, respectively `vacgrid` a `list` containing vector entries `\$fracs` and `\$stops` indicating the permissible fractions (in [0,1]) of the population to be vaccinated and the (positive integer) of stopping thresholds having a maximum of `init\$S0` `costs` a `list` containing scalar entries `\$vac`, `\$death`, and `\$infect` depicting the costs associated with a single vaccination, death, or the daily cost of maintaining an infected individual, respectively `T` the maximum number of time steps during which the epidemic is allowed to evolve `MCvits` the number of Monte Carlo iterations of forward epidemic evolution used to determine the optimal vaccination policy `midepi` a debugging `logical` indicating whether to signal that a trajectory is unlikely to be an epidemic `start` at what time, after time 1 where the state is given by `init`, should vaccinations be allowed to start

## Details

This function use a Monte Carlo experiment to calculate the expected costs over a range of vaccination policies specified by permissible fractions of individuals to be vaccinated and stopping thresholds. These policies are constructed by simulating SIR-modeled epidemics that evolve according to `params` starting in the `init`ial configuration provided. The output is an object of class `"optvac"`, so the cost grid, or matrix, can be visualized with the `plot.optvac` generic method. The `getpolicy` function can be used to select out the best (and worst) one(s).

For more details on the parameterization and simulation of the SIR model, etc., see `vignette("amei")`

## Value

`optvac` returns an object of class `"optvac"`, which is a `list` containing the following components.

 `vacgrid ` a copy of the input `vacgrid` `C ` a matrix of expected costs estimated for each combination of `vacgrid\$fracs` and `vacgrid\$stops`

## Author(s)

Daniel Merl <danmerl@gmail.com>
Leah R. Johnson <lrjohnson@uchicago.edu>
Robert B. Gramacy <rbgramacy@chicagobooth.edu>
and Mark S. Mangel <msmangl@ams.ucsc.edu>

## References

D. Merl, L.R. Johnson, R.B. Gramacy, and M.S. Mangel (2010). “amei: An R Package for the Adaptive Management of Epidemiological Interventions”. Journal of Statistical Software 36(6), 1-32. http://www.jstatsoft.org/v36/i06/

D. Merl, L.R. Johnson, R.B. Gramacy, M.S. Mangel (2009). “A Statistical Framework for the Adaptive Management of Epidemiological Interventions”. PLoS ONE, 4(6), e5807. http://www.plosone.org/article/info:doi/10.1371/journal.pone.0005807

`plot.optvac`, `getpolicy`, `MCepi`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23``` ```## same inputs as in the MCepi example truth <- list(b=0.00218, k=10, nu=0.4, mu=0) init <- list(S0=762, I0=1, R0=0, D0=0) costs <- list(vac=2, death=4, infect=1) ## construct a grid of valid vaccination strategies vacgrid <- list(fracs=seq(0,1.0,0.1), stops=seq(2,init\$S0-50,50)) ## calculate the cost surface of all combinations in vacgrid out.optvac <- optvac(init, truth, vacgrid, costs) ## extract the best and worst (static) policy best <- getpolicy(out.optvac) worst <- getpolicy(out.optvac, which="worst") rbind(best, worst) ## plot the cost surface along with the best and worst policy plot(out.optvac) ## now return to MCepi for a cost comparison to no vaccination ## using these values vac.opt <- best[3:4] vac.opt ```