Closed pratikunterwegs closed 2 years ago
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: https://github.com/epiverse-trace/finalsize/blob/f59f61af8527d5225686fe934c6ff431be585a0f/R/final_size_cpp.R#L14
Then https://github.com/epiverse-trace/finalsize/blob/f59f61af8527d5225686fe934c6ff431be585a0f/R/final_size_cpp.R#L27 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
This issue is fixed by #42
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 tofinal_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.