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

p_susceptibility implementation for final_size R #12

Closed
pratikunterwegs opened this issue Aug 26, 2022 · 2 comments
Closed

p_susceptibility implementation for final_size R #12

pratikunterwegs opened this issue Aug 26, 2022 · 2 comments
Assignees
Labels
Help wanted Extra attention is needed New feature New feature or request

Comments

@pratikunterwegs
Copy link
Collaborator

pratikunterwegs commented Aug 26, 2022

Adding functionality to handle populations with non uniform distribution of susceptibilities in current finalsize function final_size in R.

This will add a p_susceptibility (or similar) argument to final_size.

End point is a function whose functionality is in line with the proposed final_size_cpp function whose underlying Cpp code already implements heterogenous susceptibility distributions across age groups.

@pratikunterwegs pratikunterwegs self-assigned this Aug 26, 2022
@BlackEdder
Copy link

I have addressed some of the problems with the contact matrix in #26 , but we need further changes in the code.

The cpp function will need to accept an r0 here:

final_size_cpp <- function(contact_matrix, demography,

Then

contact_matrix <- contact_matrix / (max(Re(eigen(contact_matrix)$values)))
needs to change to

contact_matrix <- r0*contact_matrix / (max(Re(eigen(contact_matrix)$values)))

The current issue is that by rescaling the contact matrix you basically set r0 to 1, which results in a final size close to 0

@pratikunterwegs
Copy link
Collaborator Author

This issue is fixed by #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Extra attention is needed New feature New feature or request
Projects
No open projects
Development

No branches or pull requests

2 participants