Installation


epidemia requires R v3.5.0 or above. The latest version of R can be downloaded here.

The package can be installed directly from github. However, this requires you to have a working C++ toolchain. To ensure that this is working, please first install rstan by following these installation instructions.

After installing rstan, running

#install.packages("devtools")
devtools::install_github("ImperialCollegeLondon/epidemia")

will install the latest development version of epidemia.

Compiling the package’s two Stan models takes 10 to 20 minutes and 3 to 4 GB of memory for each compiler process, so the installation can look stuck while it runs. If the compiler runs out of memory, install without parallel make, for example by running Sys.setenv(MAKEFLAGS = "-j1") first. On Windows with R older than 4.2, also pass INSTALL_opts = "--no-multiarch" to build only the 64-bit version.

If using windows, you can alternatively install the binary.

Vignettes are not currently included in the package because they are computationally demanding, and are best viewed online.