epiverse-trace / epidemics

A library of published compartmental epidemic models, and classes to represent demographic structure, non-pharmaceutical interventions, and vaccination regimes, to compose epidemic scenarios.
https://epiverse-trace.github.io/epidemics/
Other
8 stars 2 forks source link

A few remarks #121

Closed Degoot-AM closed 3 months ago

Degoot-AM commented 11 months ago
  1. Missing link for see Details in the Ebola model article and in the description of epidemic_ebola_r function.
  2. In epidemic_size, you stated that the duration of simulation is 365 days, but you run the model only for 100 days.
  3. To prevent reader misunderstanding in the vaccination model, it would be preferable to explicitly modify the initial circumstances for each age group.
  4. Check for validation of an infection object happens when you call the object but not when you instantiate the object for the first time, e.g., I can create infection object with negative infectious period. It should be the other way around.
  5. For consistency, use npi_ or Interv for the internal naming of factors.
  6. For modelling multiple interventions, it would be better if you pass the them as item in the list of the intervention arguments. Then combine them internally and set type of intervention to "combined".
  7. You could add the parameter argument to the definition of rate intervention so that the epidemics_default_r function can take a list of intervention object(s) and determine the type of intervention (either rate, contact, or combined intervention) internally.
pratikunterwegs commented 11 months ago

Thanks @Degoot-AM, will look into these.

bahadzie commented 10 months ago

Had a meeting with Degoot today and was able to go over his points above. Most of the issues I was able to explain to him but

Given the interventions...

close_schools <- intervention(
  name = "School closure",
  type = "contacts",
  time_begin = 60,
  time_end = 60 + 180,
reduction = matrix(c(0.3, 0.01, 0.01))
)

close_workplaces <- intervention(
  name = "Workplace closure",
  type = "contacts",
  time_begin = 80,
  time_end = 60 + 80,
reduction = matrix(c(0.01, 0.3, 0.01))
)

This function signature is more intuitive...

data_combined <- model_default_cpp(
  population = uk_population,
  infection = pandemic,
  intervention = list(close_schools, close_workplaces),
  time_end = 600, increment = 1.0
)

Combining the models should be internal and hidden from the user.

I will submit a PR for 6. for you to review.

pratikunterwegs commented 10 months ago

Hi @bahadzie, thanks for looking into this. Could you please hold off on these.

Re: 1. I'm re-doing the vignette sections relating to the infection class, so I can take this up there.

Re: 6. The function signature as it is needs a named list to be passed to the intervention argument, with names reflecting model parameters or "contacts" for contact interventions. This is so that the interventions can be applied correctly in the model - the proposed signature doesn't seem compatible with that.

pratikunterwegs commented 3 months ago

This issue superseded by package development; 1: <infection> class has been removed; 6: Vectorised model functions supersede this ask in #176 and #211 as intervention argument needs to follow a specific format.