Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

The code and data required to make annual predictions for Thailand

License

Notifications You must be signed in to change notification settings

reichlab/annual-predictions-paper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

annual-predictions-paper

Code and data behind "Prospective forecasts of annual dengue hemorrhagic fever incidence in Thailand, 2010–2014" by Lauer et al, published in PNAS in 2018.

In order to re-run this experiment, please follow these steps:

  1. download this repository by pressing the green button in the upper right-hand corner
  2. unzip the downloaded folder
  3. replace path/to/package in line 9 of the shell script inst/annual-forecasts-workflow.sh with the absolute path to the home directory of the unzipped folder and save the file
  4. run the shell script (on a Mac in the Terminal write: sh path/to/package/annual-predictions-paper-master/inst/annual-forecasts-workflow.sh; the author does not know the PC equivalent of this command)

This shell script:

  1. creates an R packrat project, which installs all of the packages used to originally run the analysis (note: this step may take 10 minutes or longer, sometimes due to the long installation of the stringi package)
  2. runs make-forecasting-data.R, which puts together the forecasting data from the raw data
  3. runs make-forecasts.R which conducts cross validation, model selection, and makes out-of-sample forecasts
  4. runs Lauer-annual-DHF-figures.Rnw which makes the figures for the manuscript
  5. runs Lauer-annual-DHF-supplement.Rnw which makes the supplement
  6. runs Lauer-annual-DHF-manuscript.Rnw which makes the manuscript

If any of this process fails to work, please make an issue and I will try to help!