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

Model description #3

Merged
merged 8 commits into from
Nov 26, 2024
Merged

Model description #3

merged 8 commits into from
Nov 26, 2024

Conversation

paigemiller
Copy link
Contributor

adding description of planned repo contents:

  • next generation function to calculate R0 for SIR model with 4 groups
  • SIR model assumptions
  • desired outputs: infections and severe infections

@paigemiller paigemiller requested review from swo and afmagee42 November 22, 2024 20:36
@paigemiller paigemiller self-assigned this Nov 22, 2024
README.md Outdated

Vaccination is assumed to be all or nothing, with people starting in the S or R class based on the number of doses allocated to each group and the vaccination efficacy.

Total infections are calculated based on the expected final size of an epidemic with the given R0 based on Andreasen (2011).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is because I have a different idea about what the outputs of interest are. Namely, I think what we care about are:

  • the effective reproduction number (and possibly the associated probability of a large outbreak); you get this from the dominant eigenvalue of the NGM for the vaccination scenario
  • the distribution of infections (and associated severe outcomes - in this case, death); you get this from the dominant eigenvector of the NGM for the vaccination scenario

README.md Outdated
| Travelers | Low | High | Low |
| General | Low | Low | Low |

Vaccination is assumed to be all or nothing, with people starting in the S or R class based on the number of doses allocated to each group and the vaccination efficacy.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is inherited from other docs, but I am now realizing I am confused by the combination of "vaccination is all or nothing" with "VE is a parameter" (per below).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"All or nothing" is jargon and essentially means that the assumption is that each vaccinated individual's immunity is determined by a coin flip with a probability of being immune equal to the VE. If immune, they're completely protected (all); otherwise, they're just like someone who has never been infected or vaccinated (nothing). This is in contract to what's usually called "leaky" vaccination, which conceptually puts a coin flip on each exposure event.

README.md Outdated
* Vaccination efficacy and number of doses allocated to each group
* Beta (transmission constant)
* Factors by which to multiply the transmission constant for "high" and "low" transmission
* Recovery rate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Recovery rate
* Recovery rate (assumed to be the same across all groups)

(Sorry, I like large dots on all my "is" and thick crosses on my "t"s)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need a recovery rate input at all.... just parameterize using within and between group reproduction numbers. (sorry, I know I'm a broken record!)

README.md Outdated
Comment on lines 36 to 37
* Beta (transmission constant)
* Factors by which to multiply the transmission constant for "high" and "low" transmission
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm understanding this right, we're saying something like

$d I_k / d t = \beta S_k \sum_i \zeta_i I_i - \dots$ where $\beta$ is shared and $\zeta_i$ is either this "high" or "low" value?

Could we maybe call $\beta$ the "reference" transmission constant or something?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, think instead of in terms of basic reproduction numbers between all your groups. In a naive population, how many core group members would a core group member infect on average, how many children would they infect, how many travelers, how many genpop? Then the same if your initial case were in each of the other groups.

Note that the beauty of a widget is that you don't need to know these numbers precisely. You can make some informed guesses to provide as defaults and then let the users adjust those numbers if they think they're different.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and note that $R_{ij}$ is also a sum over modes of transmission: one sex act is worth a lot more than 1 conversation

README.md Outdated
* Beta (transmission constant)
* Factors by which to multiply the transmission constant for "high" and "low" transmission
* Recovery rate
* Factors to multiply expected infections by to estimate severe infections for "high" and "low" risk of severe infection groups
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a framing where this could be called a per-group probability of severe infection? Or the per-group expected proportions of infections which are severe? As-is, I had to try a few times to parse this sentence.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I would go with "per-group probability of severe infection"

README.md Outdated
Comment on lines 43 to 44
* Total number of infections
* Total number of severe infections
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same @jrcpulliam tag as above

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See suggestions on outputs in comments on line 28 above.

@afmagee42
Copy link
Contributor

My "request changes" is mostly so that we don't go any further without resolving this "final size" thing, everything else is more suggestions on clarity for dummies (like me) than hard requirement.

README.md Outdated

Vaccination is assumed to be all or nothing, with people starting in the S or R class based on the number of doses allocated to each group and the vaccination efficacy.

Total infections are calculated based on the expected final size of an epidemic with the given R0 based on Andreasen (2011).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is because I have a different idea about what the outputs of interest are. Namely, I think what we care about are:

  • the effective reproduction number (and possibly the associated probability of a large outbreak); you get this from the dominant eigenvalue of the NGM for the vaccination scenario
  • the distribution of infections (and associated severe outcomes - in this case, death); you get this from the dominant eigenvector of the NGM for the vaccination scenario

README.md Outdated

Total infections are calculated based on the expected final size of an epidemic with the given R0 based on Andreasen (2011).

Severe infections are calculated by multiplying the number of infections in each group by a group-specific probability of severe infection.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicky, but in the NGM framework, you'd multiply the proportion of infections in each group by the group-specific probability of your outcome of interest. You could then multiply that by the total number of infections that you want to use as your reference point.

README.md Outdated

* Sizes of the groups
* Vaccination efficacy and number of doses allocated to each group
* Beta (transmission constant)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need betas, you need within and between group reproduction numbers; these are the entries in the NGM. No need to go through a beta / gamma relationship - that just makes things harder to parameterize and think about.

README.md Outdated
Comment on lines 36 to 37
* Beta (transmission constant)
* Factors by which to multiply the transmission constant for "high" and "low" transmission

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, think instead of in terms of basic reproduction numbers between all your groups. In a naive population, how many core group members would a core group member infect on average, how many children would they infect, how many travelers, how many genpop? Then the same if your initial case were in each of the other groups.

Note that the beauty of a widget is that you don't need to know these numbers precisely. You can make some informed guesses to provide as defaults and then let the users adjust those numbers if they think they're different.

README.md Outdated
* Vaccination efficacy and number of doses allocated to each group
* Beta (transmission constant)
* Factors by which to multiply the transmission constant for "high" and "low" transmission
* Recovery rate

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need a recovery rate input at all.... just parameterize using within and between group reproduction numbers. (sorry, I know I'm a broken record!)

README.md Outdated
* Beta (transmission constant)
* Factors by which to multiply the transmission constant for "high" and "low" transmission
* Recovery rate
* Factors to multiply expected infections by to estimate severe infections for "high" and "low" risk of severe infection groups

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I would go with "per-group probability of severe infection"

README.md Outdated
Comment on lines 43 to 44
* Total number of infections
* Total number of severe infections

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See suggestions on outputs in comments on line 28 above.

README.md Outdated

### References

Andreasen, V. The Final Size of an Epidemic and Its Relation to the Basic Reproduction Number. Bull Math Biol 73, 2305–2321 (2011). https://doi.org/10.1007/s11538-010-9623-3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure there's some fun math in this paper but am skeptical that you actually need final sizes. If you think final sizes are relevant, simple ODEs are (in my opinion) the wrong way to go... But the question here is about preventing epidemic growth, so we're interested in the exponential growth phase of the epidemic, which is where simple ODEs shine!

And the NGM approach is equivalent to the non-dimensionalized multi-type SIR. In the simplest version, you assume that every type has the same recovery rate. You then rescale time by the mean duration of infectiousness (1 / recovery rate), which turns all your transmission coefficients into type-specific basic reproduction numbers, and rescale your compartments by your population size.


Andreasen, V. The Final Size of an Epidemic and Its Relation to the Basic Reproduction Number. Bull Math Biol 73, 2305–2321 (2011). https://doi.org/10.1007/s11538-010-9623-3

Diekmann O, Heesterbeek JA, Metz JA. On the definition and the computation of the basic reproduction ratio R0 in models for infectious diseases in heterogeneous populations. J Math Biol. 1990;28(4):365-82. doi: 10.1007/BF00178324. PMID: 2117040.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've always found this paper to be basically impenetrable... But this reminds me of the request from @afmagee42 to provide some references for this stuff... I'm guessing it's covered pretty well in Diekmann & Heesterbeek 2020, but Carl took our copy into the office so I can't check right now. Will pick his brain and get back to you on this!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, my introduction to matrix models came from Caswell's Matrix Population Models, which might be a useful reference as well, though he doesn't go into the subtleties of how these models relate to continuous time formulations, and I don't think he has any examples for infectious disease systems (or at least, he didn't in the older edition that I'm familiar with!)

* Total number of infections
* Total number of severe infections

### References

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasonasher: did you have a reference you could share for the probability of a large outbreak calculations? I haven't done this since grad school and don't remember there being a good reference for it at the time...

@jrcpulliam
Copy link

This looks like a more accessible reference that the original 1990 paper (but would still not recommend diving into it until after the response needs are met): Diekmann, Heesterbeek, and Roberts 2009

Van den Driessche & Watmough 2002 is what I've typically used for teaching, but as noted in the above, the procedure it describes yields a different matrix (with the same dominant eigenvalue), which can be confusing.

Copy link
Contributor

@swo swo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally this is a good start!

I think we could simplify a bunch of the intermediate people; I think you can jump right to "the matrix has elements $R_{ij}$"

I also think the first output from this widget could be the very, very simple matrix multiplication that says "give these population sizes, and this NGM, this is the number of next-generations (and other outcomes) you expect per group"


## Model Description

This repo contains code to apply the next-generation method of Diekman et al. (1990) to calculate R0 for an SIR model with 4 risk groups and flexible inputs for varying vaccine allocation to the 4 groups.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This repo contains code to apply the next-generation method of Diekman et al. (1990) to calculate R0 for an SIR model with 4 risk groups and flexible inputs for varying vaccine allocation to the 4 groups.
This repo contains code to apply the next-generation method of [Diekman et al. (1990)](https://doi.org/10.1007/BF00178324) to calculate R0 for an SIR model with 4 risk groups and flexible inputs for varying vaccine allocation to the 4 groups.

Assuming this is the right paper? On the definition and the computation of the basic reproduction ratio R 0 in models for infectious diseases in heterogeneous populations

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommended reference is Diekmann & Heesterbeek 2020. I haven't been able to find an online copy that's accessible, but I'll ask Sarah what options are available from the CDC library. I can also try reaching out to Hans and seeing if he's willing to share a PDF with just the relevant pages. The book is much more easier to follow than the original paper.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also the Interlude in Diekmann et al 2009, which is a good description of the way I actually think about these things in practice

README.md Outdated

The effective reproductive number is calculated as the dominant eigenvalue of $K$ (when the population has vaccination?).

The distribution of infections is calculated from the dominant eigenvector of $K$.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that the dominant eigenvalue is $R_0$?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dominant eigenvalue is $R_0$ when the population is fully susceptible and $R_e$ under vaccination. The entries in the NGM are group-specific $R_0$'s and $R_e$'s respectively

* clean description, use mkdocs

* Update docs/approach.md

Co-authored-by: Scott Olesen <[email protected]>

* pre commit cleanup

---------

Co-authored-by: Scott Olesen <[email protected]>
@paigemiller paigemiller merged commit 6075211 into main Nov 26, 2024
1 check passed
@paigemiller paigemiller deleted the pm-model-description branch November 26, 2024 17:05
swo added a commit that referenced this pull request Nov 27, 2024
* readme

* trying to write out the math

* trying to reformat

* gamma and R edits

* Update README.md

* moving stuff around

* more edits

* Mkdocs and cleaner notation/description (#4)

* clean description, use mkdocs

* Update docs/approach.md

Co-authored-by: Scott Olesen <[email protected]>

* pre commit cleanup

---------

Co-authored-by: Scott Olesen <[email protected]>

---------

Co-authored-by: afmagee42 <[email protected]>
Co-authored-by: Scott Olesen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants