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

Hot fix warn if data exceeds forecast date #201

Closed kaitejohnson closed 2 weeks ago

kaitejohnson commented 2 weeks ago

This came up while troubleshooting implementation with @hannahcohen4.

The issue is right now it is on the user to make sure the data doesn't exceed the forecast date. Instead, I think we should still let them run the model, truncate the data, and give them a warning that we strongly recommend that vintaged datasets be used for retrospective forecasts.

Curious others thoughts on this (it could also error). The point is just that as it is implemented this would only error in the assert_dates_within_frame(). We could modify this to be more verbose about which frame the data is not within (in this case, failed the check of being before than the forecast date).

github-actions[bot] commented 2 weeks ago

Thank you for your contribution, @kaitejohnson :rocket:! Your page is ready to preview here

kaitejohnson commented 2 weeks ago

Closing this in favor of more verbose error messaging rather than warnigns