Reflections
This page contains reflections on the facilitators and barriers to this reproduction, as well as a full list of the troubleshooting steps taken to reproduce this work.
What helped to facilitate this reproduction?
Run time. In their README
, the authors stated the model had an expected run time of 16 hours for each script, which was very handy to know ahead of time (and hence initially run with fewer agents while troubleshooting).
Including their results (in repository and via version history too). The analysis is run using .Rmd
but the authors also saved the output .md
files too (e.g. Case_Detection_Results.md
), which means there is a record of their raw results. This was incredibly helpful - I referred to their latest results, and their older results from runs with different agent numbers - to help me figure out if my discrepancies were related to agent number or not.
Some figure code included. For Figure 3, most of the required code for the figure was provided, which was super helpful.
What would have helped facilitate this reproduction?
Provide environment with all packages
- Although a
DESCRIPTION
file accompanied theepicR
package, this did not contain all the dependencies required for the scripts for this paper. - Unavoidably on the authors part, one of the dependencies (
rredis
) was removed from CRAN in 2022 and archived. It is possible to install it viaremotes
, but means that the recommended method for running the code in the README (installing this version of the package) fails as it tries to installrredis
like usual, but theDESCRIPTION
file would need to be changed toRemotes: cran/rredis@1.7.0
to fix this. My solution was to install theepicR
package locally, but that this required a quirky fix related tolibrary()
,load_all()
and clearing the environment to ensure it actually worked correctly.
Output files
- Save results to
.csv
files.
Include code to produce all tables and figures
It took me alot of time to figure these out, including mistakes and confusion around:
- Which results tables to use to produce them
- Which columns to use
- Which scenario to use for scenario 0
- How to transform the columns
- How to create other features like the efficiency frontier
Include code for the sensitivity analysis
To do this I had to:
- Identify what and how to change the code to run the scenarios. Although it was handy that variable names were clear, as it made them easier to spot - although I did initially change the wrong variable for medical adherence
- Created a
.R
script that duplicates the.Rmd
whilst altering relevant parts of it for sensitivity analysis (this seemed the simplest solution, given the structure of the code)- There was alot of code duplication, which made it tricky when I came to the scenario analysis, and would need to change variables in 12 locations within each of the 14 duplicate scripts for each scenario, but couldn’t easily just loop and run with a single set of defined parameters. Likewise, it became tricky when troubleshooting the base case, as
Case_Detection_Results.Rmd
andCase_Detection_Results_5yrs.Rmd
, and I had to make sure I carefully changed everything in both files.
- There was alot of code duplication, which made it tricky when I came to the scenario analysis, and would need to change variables in 12 locations within each of the 14 duplicate scripts for each scenario, but couldn’t easily just loop and run with a single set of defined parameters. Likewise, it became tricky when troubleshooting the base case, as
Create releases
- The GitHub repository had commits after the publication date. It wasn’t clear which version aligned with the publication. However, the most recent commits add clear README instructions to the repository. We decided to use the latest version of the repository, but it would have beneficial to have releases/versions/a change log that would help to outline the commit history in relation to the publication and any subsequent changes.
Other
Run time -
- To reproduce results, I had to run their scripts with the full number of agents (100 million). This took a long time, and impacted the reproduction as (a) when experimenting with lower numbers, uncertain if discrepancies are due to lower agent number or not, (b) I initially thought I would need a HPC to do this (but then realised I could run them in parallel in seperate terminals on our machine in the office). However, option (b) wouldn’t have been possible if I had only had my laptop, as it required leaving it running for day/s.
- Long run time also meant it took a longer time to do this reproduction - although we excluded computation time in our timings, it just meant e.g. when I made a mistake in coding of scenario analysis and had to re-run, I had to wait another day or two for that to finish before I could resume.
Seeds -
- There is seed control, but I did not get the exact same results as the paper. However, when I tried re-running my analysis, I found I got the same results, so it appears that the seed control is indeed working as expected, and there is likely another reason I haven’t identified behind the discrepancies.