ModelTBBCGEngland
is an R package that contains models, summarised data, and fitting scripts for a model of TB, including BCG vaccination, fit to routine surveillance data in England.
You can install ModelTBBCGEngland
directly from github with:
For a discussion of the model development process please see here. For a discussion of the model fitting pipeline please see here.
Run the following code in the terminal after installing and building the package and opening the Rstudio project. The results (and logs) will be found at ./vignettes/results
.
To fit only the main scenario add --scenario baseline
. If interested in rapid exploration or if using limited compute resources experiment with the --calib_run
flag which uses point estimates for the initial conditions and process noise - reducing the number of particles required. Alternatively explore the other options available using --help
. An example of a fitting run used for exploration is below.
For more interactive testing see ./tests/manual-tests/test-rbi-fit.R
. This script was used during pipeline development.
This analysis was developed in a docker container based on the tidyverse docker image. To run the docker image run:
docker run -d -p 8787:8787 -e USER=ModelTBBCGEngland -e PASSWORD=ModelTBBCGEngland \
--mount type=bind,source=$(pwd)/results/modeltbbcgengland,target=/home/rstudio/ModelTBBCGEngland/vignettes/results \
--mount type=bind,source=$(pwd)/data/tb_data,target=/home/rstudio/ModelTBBCGEngland/data-raw/tb_data \
--name modeltransvsdirect seabbs/modeltbbcgengland
This command expects both a data and results folder to be available to be mounted. Create them using the following (Mac/Linux).
The rstudio client can be found on port :8787
at your local machines ip. The default username:password is seabbs:seabbs, set the user with -e USER=username
, and the password with - e PASSWORD=newpasswordhere
.
To run a plain R terminal use:
To run a plain bash session: