CDCgov / ww-inference-model

An in-development R package and a Bayesian hierarchical model jointly fitting multiple "local" wastewater data streams and "global" case count data to produce nowcasts and forecasts of both observations
https://cdcgov.github.io/ww-inference-model/
Apache License 2.0
16 stars 2 forks source link

Add some model components #5

Closed kaitejohnson closed 3 months ago

kaitejohnson commented 3 months ago

The goal of this PR is to get the bare minimum modeling and immediate pre-processing and post-processing functionality into the modeling package codebase, using the functions from the other two ww modeling packages and modifying as needed.

The vignette is written such that it takes in package data meeting the minimum requirements for the input count data (in this case hospital admissions) and the input wastewater data. Then we apply pre-processing to get the additional information that the stan model needs in order to fit the model. We then pass into the model the input pmfs that need to be passed in as data, but are COVID and hospital admissions specific.

A note that this first draft of the package isn't intended to provide significant additional functionality from the modeling in https://github.com/CDCgov/wastewater-informed-covid-forecasting/tree/prod 's cfaforecastrenewalww. We want to make it as easy as possible to run the existing model, as is. The goal is to make it easier for a user to see where they would upload their data, what requirements that data must have, and where they could swap in different pmfs, parameters, and priors to fit the model to say a different pathogen or with different parameters.

Remaining new issues for N sprint (from meta issue #6). These components are out of scope for this PR

kaitejohnson commented 3 months ago

@kaitejohnson this PR is getting close. I just flagged a bunch of remaining unresolved conversations that I think got hidden previously.

A few remaining questions!

kaitejohnson commented 3 months ago

Ok @dylanhmorris I moved the functions needed to produce the delay distributions for COVID into data-raw/covid_pmfs.R so they are not a part of this package function.

Also made the other aesthetic/documentation changes. Let me know if this looks okay and thanks for the thorough review!

kaitejohnson commented 3 months ago

Sorry, just caught the namespace error and added to change log!