Helper function to format dataframes

format_data_simulation(
  df,
  intervention_object,
  delay = FALSE,
  rcd = FALSE,
  mda = FALSE,
  mystart,
  rcd_at_baseline = FALSE,
  maxtime
)

Arguments

df

a dataframe containing at least 3 variables : alpha, beta and omega

intervention_object

an named list containing the intervention description. It should have the follwing structure: list(intervention_name="string", "alpha.new"=NA, "beta.new"=NA, "omega.new"=NA ) where NA can be replaced by scalars or kepts as such.

delay

a boolean indicating if the model including delays in treatment should be used. Default (FALSE) is the model without delay in treatment

rcd

a boolean indicating if the model including reactive case detection should be used. Default (FALSE) is the model without RCD

mda

a boolean indicating if the model including mass drug administration (MDA) prophylaxis should be used. Default (FALSE) is the model without MDA

mystart

an integer indicating the time index of the start of the simulation (this is used to chain interventions appropriately)

rcd_at_baseline

a boolean indicating if the model was calibrated using the RCD model (i.e. there is some RCD at baseline already). Default (FALSE) is the model without RCD at baseline

maxtime

number of time steps for simulation

Value

A dataframe with the required input parameters for future simulation

Details

If alpha.new is not provided in intervention_object it is equal to alpha. If beta.new is not provided in intervention_object it is equal to beta. If omega.new is not provided in intervention_object it is equal to omega. If rho.new is not provided in intervention_object it is equal to rho