2. The ocvImpact package - HopkinsIDD/gavi_vimc_cholera GitHub Wiki

Overview

The ocvImpact R package is designed to help people run the both models, either to estimate the impact of oral cholera vaccination campaigns on disease burdens, or to estimate the gains in efficiency and cost-effectiveness of vaccination campaigns with enhanced surveillance systems using the model inputs provided by the Vaccine Impact Modeling Consortium (VIMC).

The whole package can be found under gavi_vimc_cholera/packages/ocvImpact/ directory using this link.

The scripts that can utilize this R package to generate configuration files, run simulations, process and diagnose model output, and produce final model products (tables and figures) is under the gavi_vimc_cholera/scripts/ directory using this link and under the gavi_vimc_cholera/summarize_outputs/ directory using this link.

Install the package on a local machine or on the IDModeling server

This package can be installed automatically by running both models from scratch as long as all the setup steps have been completed. However, if you want to install it without having to run the whole simulation, we could try the following code:

   if (!require('ocvImpact', character.only = T)) {
   roxygen2::roxygenise("packages/ocvImpact")
   install.packages("packages/ocvImpact", type = "source", repos = NULL)
   library('ocvImpact', character.only = T)}

Sometimes you may need to first install devtools package and Rtools or Rtools40 package depending on which version of R you are using. Usually, you can complete this step by just following the prompts. However, if you encounter issues with installing Rtools40 package for your 4.0-or-above R, you could try out the following code:

   writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")
   Sys.which("make")
   install.packages("jsonlite", type = "source")
   install.packages('rtools40', type = "source")

This solution is provided originally here.

Install the package on Rockfish

Please note that only the surveillance model has been enabled to run on Rockfish now

Installing the package on Rockfish is a bit more complicated, but you can find all the Shell scripts you need for installation at /gavi_vimc_cholera/sbatch_scripts/marcc_setup/. Firstly, submit marcc_setup_initialize.sh to install all the necessary R packages that the model depends on. Next, submit marcc_montagu.sh to install the Montagu package that will help the model retrieve the inputs. Finally, submit marcc_reinstall_ocvImpact.sh to install the package. If these scripts don't work supposedly, please refer to the last two sections of this Wiki that contain pertinent information about Rockfish/MARCC/ARCH.