Skip to content

Commit

Permalink
first draft readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitejohnson authored Jul 5, 2024
1 parent 66b5055 commit 39e3fd0
Showing 1 changed file with 65 additions and 5 deletions.
70 changes: 65 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,75 @@
# `wwinference`: joint inference and forecasting from wastewater and epidemiological indicators

## Overview

> [!CAUTION]
> This project is a work-in-progress. Despite this project's early stage, all development is in public as part of the Center for Forecasting and Outbreak Analytics' goals around open development. Questions and suggestions are welcome through GitHub issues or a PR.
>
`{wwinference}` estimates latent incident infections from wastewater concentration data and data on epidemiological indicators, with an initial assumed structure that the wastewater concentration data comes from subsets of the population contributing to the global epidemiological indicator data, such as hospital admissions. This model reflects the model currently used to produce forecasts of COVID-19 hospital admissions, of which the pipeline and model code is available at
the [wastewater-informed-covid-forecasting](https://github.com/CDCgov/wastewater-informed-covid-forecasting) repository.
## Overview

This project is an in-development R package, `{wwinference}` that estimates latent incident infections from wastewater concentration data and data on epidemiological indicators, with an initial assumed structure that the wastewater concentration data comes from subsets of the population contributing to the "global" epidemiological indicator data, such as hospital admissions.
In brief, our model builds upon [EpiNow2](https://github.com/epiforecasts/EpiNow2/tree/main), a widely used [R](https://www.r-project.org/) and [Stan](https://mc-stan.org/) package for Bayesian epidemiological inference.
We modify EpiNow2 to add model for the observed viral RNA concentration in wastewater, adding hierarchical structure to link the subpopulations represented by the osberved wastewater concentrations in each wastewater catchment area.
See our Model Definition page for a mathematical description of the generative model, and the Getting Stated vignette to see an example of how to run the inference model on simulated data.

The intention is for {wwinference} to provide a user-friendly R-package interface for running forecasting models that use wastewater concentrations combined with other more traditional epidemiological signals such as cases or hospital admissions. It aims to be a re-implementation of the modeling components contained in the [wastewater-informed-covid-forecasting](https://github.com/CDCgov/wastewater-informed-covid-forecasting) project repository, with
an emphasis here on making it easier for users to supply their own data.

## Project Admin
- Kaitlyn Johnson (kaitejohnson)
- Dylan Morris (dylanhmorris)

# Installing and running code

## Install R
To run our code, you will need a working installation of [R](https://www.r-project.org/) (version `4.3.0` or later). You can find instructions for installing R on the official [R project website](https://www.r-project.org/).

## Install `cmdstanr` and `CmdStan`
We do inference from our models using [`CmdStan`](https://mc-stan.org/users/interfaces/cmdstan) (version `2.35.0` or later) via its R interface [`cmdstanr`](https://mc-stan.org/cmdstanr/) (version `0.8.0` or later).

Open an R session and run the following command to install `cmdstanr` per that package's [official installation guide](https://mc-stan.org/cmdstanr/#installation).

```R
install.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
```

`cmdstanr` provides tools for installing `CmdStan` itself. First check that everything is properly configured by running:

```R
cmdstanr::check_cmdstan_toolchain()
```

You should see the following:
```
The C++ toolchain required for CmdStan is setup properly!
```

If you do, you can then install `CmdStan` by running:
```R
cmdstanr::install_cmdstan()
```
If installation succeeds, you should see a message like the following:
```
CmdStan path set to: {a path on your file system}
```

If you run into trouble, consult the official [`cmdstanr`](https://mc-stan.org/cmdstanr/index.html) website for further installation guides and help.

## Download this repository and install the project package (`wwinference`)
Once `cmdstanr` and `CmdStan` are installed, the next step is to download this repository and install the package, `wwinference`. The package provides tools for specifying and running the model, and installs other needed dependencies.

Once you have downloaded this repository, navigate to it within an R session and run the following:

```R
install.packages('remotes')
remotes::install_local()
```

## R dependencies
Installing the project package should take care of almost all dependencies installations. Confirm that package installation has succeeded by running the following within an R session:

The intention is for {wwinference} to provide a user-friendly R-package interface for running forecasting models that use wastewater concentrations combined with other more traditional epidemiological signals such as cases or hospital admissions.
```R
library(wwinference)
```

## Public Domain Standard Notice
This repository constitutes a work of the United States Government and is not
Expand Down

0 comments on commit 39e3fd0

Please sign in to comment.