dhduncan / simulate-infections

simulate covid-infections data using baby ABM
0 stars 0 forks source link

Trace value of infectiousness over time #4

Open dhduncan opened 2 years ago

dhduncan commented 2 years ago

Now that R_star can vary through time, influencing infectiousness, I'd like to store the value that infectiousness takes over the course of the simulation so it can be inspected / plotted.

https://github.com/dhduncan/simulate-infections/blob/7cf34b65ac0e8de044d144e4ea4ec3a081053bb9/R/new_infections.R#L25 #

dhduncan commented 2 years ago

@goldingn I wanted to ask for advice on making this happen. I think the place to store this value is within sim_abm() right, but the infectiousness function is three deep from there infect() > new_infections() > infectiousness().

goldingn commented 2 years ago

I'd probably create a new global object (along the lines of .abm_parameters) to store things like this that aren't going into the case linelist. Then you can assign to that from inside infectiousness()