Skip to content

fguntoro/sircovid

 
 

Repository files navigation

sircovid

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. R build status CodeFactor Codecov test coverage

sircovid implements a series of mechanistic models to help modelling the transmission of the SARS-Cov-2 virus using stochastic compartmental models. sircovid also provides some tools to perfom Bayesian evidence synthesis from several surveillance data streams through the estimation of transmission parameters.

Installation

Install from the ncov drat:

drat:::add("ncov-ic")
install.packages("sircovid")

or install directly from GitHub with:

remotes::install_github("mrc-ide/sircovid", upgrade = FALSE)

You will need the most recent version of dust and mcstate to use the package. These will be installed automatically if you install sircovid from drat, or manually with:

drat:::add("ncov-ic")
install.packages(c("dust", "mcstate"))

We use OpenMP for parallelism, and this may not be available on your system. If not then compilation will fail with an error like:

clang: error: unsupported option '-fopenmp'
make[1]: *** [basic.o] Error 1
ERROR: compilation failed for packagesircovid

You can either install OpenMP support, or edit your personal Makevars file to tell R that you do not have it. To do this, you can run

usethis::edit_r_makevars("user")

and add the lines

SHLIB_OPENMP_CFLAGS=
SHLIB_OPENMP_CXXFLAGS=

after which compilation will succeed, but the model will only run on one core.

Development

In addition to the above you need to install odin and odin.dust

drat:::add("ncov-ic")
install.packages(c("odin", "odin.dust"))
  • Make changes to the models in inst/odin
  • Run odin.dust::odin_dust_package(here::here()) from the root directory, which will generate updated files R/dust.R and src/basic.cpp, src/carehomes.cpp, along with R/cpp11.R and src/cpp11.cpp

Alternatively, run ./scripts/generate_odin

License

MIT © Imperial College of Science, Technology and Medicine

About

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 73.6%
  • R 26.3%
  • Other 0.1%