Skip to content

cdphmodeling/forecastability

Repository files navigation

forecastability

Analysis of infectious disease time series "forecastability" and corresponding forecast performance to reproduce the analysis documented in the manuscript "Forecastability of infectious disease time series: are some seasons and pathogens intrinsically more difficult to forecast?"

Available at: https://medrxiv.org/cgi/content/short/2025.04.29.25326677v1

Versioning

The code was written in R Version 4.4.2. This repo uses renv (https://rstudio.github.io/renv/articles/renv.html) for reproducibility. Relevant files for this are: renv.lock, .Rprofile, renv/settings.json and renv/activate.R. If not prompted, make sure renv is installed and then run renv::restore() to download all necessary packages.

Repository structure

Repository contains the following folders:

  1. /data - data that is provided to run the scripts, loaded from running load_data.R script (and optionally downloaded using source_data.Rmd)
  2. /results- compiled results including forecastability scores and regression results produced via the cacluate_forecastability.Rmd and forecast_eval.Rmd scripts
  3. /figures- figures and tables produced using the generate_figures.Rmd script

Scripts

Raw results for the manuscript can be reproduced by running these scripts in the following order:

  1. source_data.Rmd- this is an optional file to run that sources data from a variety of locations (see "Data Sources"" description below). Data sourced from running this file is available in the /data folder and is subsequently loaded via the load_data.R file.
  2. load_data.R-loads data from the /data folder. This file is sourced in both the calculate_forecastability.Rmd and forecast_eval.Rmd files.
  3. calculate_forecastability.Rmd- calculates forecastability scores of NHSN data time series for both COVID-19 and influenza
  4. forecast_eval.Rmd- computes the performance of forecasts from the FluSight challenge and the COVID-19 Forecast Hub; results are combined with forecastability scores generated from calculate_forecastability.Rmd and are saved as results/forecastability_results.csv
  5. generate_figures.Rmd- generates figure and table results to reproduce manuscript output; note: can also be run as a stand alone, by simply using output already saved in /results folder

Data Sources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published