Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State-level unadjusted R(t) #8

Closed
4 tasks
ghost opened this issue Mar 8, 2024 · 1 comment · Fixed by #131
Closed
4 tasks

State-level unadjusted R(t) #8

ghost opened this issue Mar 8, 2024 · 1 comment · Fixed by #131
Assignees
Labels
documentation Improvements or additions to documentation model related to models created using pyrenew
Milestone

Comments

@ghost
Copy link

ghost commented Mar 8, 2024

Goal

We want to have a single source of truth for the mathematical formulation of the state-level unadjusted $\mathcal{R}^u(t)$ model. We want to be able to use this to immediately code up the math decided upon here.

Context

This was discussed in the 2024-02-27 meeting (see minutes) and agreed upon in the ADR record under model_features.md. This specific feature should be the same as what's implemented in the existing wastewater model. Completion of this task will allow us to implement the feature more quickly and should facilitate creation of a model design document.

Required features

  • mathematical notation for $\mathcal{R}^u(t)$ alongside associated language
  • add to the feature to the model design document
  • Include an independent test that checks TBD.
  • Include documentation in the code using docstring

Out of scope

  • This does not include code, just specification of the feature in math/writing

Related documents

Ref: https://github.com/cdcent/cfa-multisignal-renewal/issues/64
author: @kaitejohnson

@ghost ghost added documentation Improvements or additions to documentation development task model related to models created using pyrenew labels Mar 8, 2024
@dylanhmorris dylanhmorris added this to the Backlog milestone Mar 21, 2024
@gvegayon gvegayon self-assigned this May 13, 2024
@gvegayon gvegayon modified the milestones: Backlog, Sprint J May 13, 2024
@gvegayon
Copy link
Member

To add a little bit more of background information. This should feature the autoregressive Rt with damping (see here). From the model description in the wastewater project:

We assume that the unadjusted reproduction number $\mathcal{R}^\mathrm{u}(t)$ is a piecewise-constant function with weekly change points (i.e., if $t$ and $t'$ are days in the same week, then $\mathcal{R}^\mathrm{u}(t)$ = $\mathcal{R}^\mathrm{u}(t')$ ). To account for the dependence of the unadjusted reproduction number in a given week on the previous week, we use a differenced auto-regressive process for the log-scale reproduction number. A log-scale representation is used to ensure that the reproduction number is positive and so that week-to-week changes are multiplicative rather than additive.

$$ \log[\mathcal{R}^\mathrm{u}(t_3)] \sim \mathrm{Normal}\left(\log[\mathcal{R}^\mathrm{u}(t_2)] + \beta \left(\log[\mathcal{R}^\mathrm{u}(t_2)] - \log[\mathcal{R}^\mathrm{u}(t_1)]\right), \sigma_r \right) $$

where $t_1$, $t_2$, and $t_3$ are days in three successive weeks, $\beta$ is an autoregression coefficient which serves to make week-to-week changes correlated, and $\sigma_r$ determines the overall variation in week-to-week changes. We bound $\beta$ to be between 0 and 1 so that any changes in trend in $\mathcal{R}^\mathrm{u}(t)$ are damped over time to a degree determined by $\beta$.

The feedback component is being addressed in #123.

@gvegayon gvegayon linked a pull request May 22, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation model related to models created using pyrenew
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants