Compartmental epidemic models for forecasting and analysis of infectious disease pandemics: contributions from Ben Bolker, Jonathan Dushoff, David Earn, Morgan Kain, Michael Li, Irena Papst (in alphabetical order). Feedback is welcome at the issues list, or e-mail us.
The repository contains an R package and various workflows/analyses. You can fork/clone the repository (from here) and install locally or use remotes::install_github("mac-theobio/McMasterPandemic")
to install the package. You will need to first install the developer version of bbmle
(remotes::install_github("bbolker/bbmle")
) before installing McMasterPandemic
.
dockerfile
for details on Debian Linux)make dependencies
or running /misc/dependencies.R
make build-package
make doc-update
to update the .Rd
files.make pkgcheck
and make pkgtest
from the shell or devtools::check()
and devtools::test()
from within R). (Tests are also run on GitHub Actions; if you want to skip CI testing, e.g. for a trivial commit, put [skip ci]
somewhere in your commit message.) Please don’t make a habit of pushing without testing.make style
or run misc/macpan_style.R
. make style
(or running misc/macpan_lint.R
) also creates a new file, misc/lints.csv
, which contains stylistic and other lints that styler
cannot automatically fix.pkgdown
site using GitHub Actions: click “run workflow” on the link to rebuild.refactor
folder.MACPAN_TEST_LEVEL
environment (shell) variable. Many of the test files contain this code:
testLevel <- if (nzchar(s <- Sys.getenv("MACPAN_TEST_LEVEL"))) as.numeric(s) else 1
which sets testLevel
to a default value of 1 unless the environment variable is found. You can set this environment variable outside of your R session (e.g. via export MACPAN_TEST_LEVEL=2
in a bash shell), or via Sys.setenv(MACPAN_TEST_LEVEL=2)
from within R. In principle this mechanism allows for a hierarchy of slowness; at present only 1 and >1 are distinguished.
The documentation is a little bit scattered right now, working on cleaning it up. In addition to the standard short descriptions of the functions (help(package="McMasterPandemic")
), stuff can be found:
vignette(<title>, package="McMasterPandemic")
)
getting_started
model
: design decisions and information for developerscalibration
(very out of date)farr
: stuff on Farr’s law and phenomenological curve-fitting (very incomplete and likely to remain so for now)testing_flow
: incorporating testing dynamics (ditto)McMasterReport.Rnw
: this is a more or less up-to-date description of calibration to Ontario dataontario_calibration_report.html
: more technical and less up-to-date than the preceding documentTODO.md
: active to-do listMore bits and pieces: notes/refactor.Rmd
, testing.md
, reimplementation.md