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

Posterior predictive distributions should be piecewise constant? #60

Closed athowes closed 2 months ago

athowes commented 2 months ago
image

In https://github.com/cdcent/cfa-spatial-ww-internal/issues/5#issue-2458143691 @cbernalz created these plots.

The red line is the data, and the other coloured lines I think are draws from the posterior predictive distribution. I think these draws from the posterior predictive distribution should be piecewise constant (like the data). This might be possible using e.g. geom_step (or otherwise not using geom_line to connect up the shortest path).

As I understand it the code for these plots was from somewhere in this package.

dylanhmorris commented 2 months ago

62 fixes this. Also noting that it is also important to make sure one is not comparing an infection-feedback-adjusted $\mathcal{R}(t)$, which will indeed vary day-to-day to an unadjusted weekly $\mathcal{R}(t)$