Skip to contents

This function simulates epidemic dynamics using predefined parameters and incorporates vaccination and variant-specific adjustments to the reproduction number and population immunity. Policies are evaluated periodically to maximize rewards based on predicted outcomes.

Usage

Epi_MPC_run_V(
  episimdata,
  episettings,
  epi_par,
  noise_par,
  actions,
  pred_days,
  n_ens = 100,
  start_day = 1,
  ndays = nrow(episimdata),
  R_est_wind = 5,
  pathogen = 1,
  susceptibles = 1,
  delay = 0,
  ur = 0,
  r_dir = 0,
  N = 1e+06
)

Arguments

episimdata

A data frame containing simulation data. It should include columns for:

  • "I": Number of infected individuals.

  • "C": Reported cases.

  • "S": Number of susceptible individuals.

  • "R_coeff": Coefficient of reproduction number reduction by policy.

  • "vaccination_rate": Rate of vaccination.

  • "delta_prevalence": Prevalence of the Delta variant.

  • "immunity": Level of population immunity.

epi_par

A data frame of epidemiological parameters, including:

  • "R0": Basic reproduction number.

  • "gen_time": Disease generation time.

  • "gen_time_var": Variance of the generation time.

noise_par

A data frame containing noise parameters:

  • "repd_mean": Reporting delay mean.

  • "del_disp": Dispersion parameter for reporting delays.

  • "ur_mean": Mean under-reporting rate.

  • "ur_beta_a": Alpha parameter of Beta distribution for under-reporting.

actions

A data frame containing policy actions with reproduction coefficients ("R_coeff").

pred_days

An integer specifying the number of days to predict ahead during policy evaluation.

n_ens

An integer specifying the number of ensemble runs for Monte Carlo simulations. Defaults to 100.

start_day

An integer indicating the start day of the simulation. Defaults to 1.

ndays

An integer specifying the total number of simulation days. Defaults to the number of rows in episimdata.

R_est_wind

An integer specifying the rolling window size for reproduction number estimation. Defaults to 5.

pathogen

An integer or string identifying the pathogen for parameter selection. Defaults to 1.

susceptibles

A binary value (0 or 1) indicating whether to simulate changes in susceptibles. Defaults to 1.

delay

A binary value (0 or 1) indicating whether to simulate reporting delays. Defaults to 0.

ur

A binary value (0 or 1) indicating whether to simulate under-reporting. Defaults to 0.

N

A numeric value specifying the total population size. Defaults to 1e6.

Value

A data frame containing updated simulation data with computed reproduction numbers, estimated policies, daily infection incidents, cases, deaths, and other epidemic metrics.

Details

This function models the effects of vaccination and variants (e.g., Delta) on epidemic dynamics. The vaccination rate is computed using vac(), while variant prevalence is determined using delta(). Adjustments to the reproduction number and population immunity are incorporated based on these factors.

Policies are evaluated periodically, and the optimal policy is selected based on expected rewards computed from ensemble simulations.

Examples

# Example data and parameters
episimdata <- data.frame(I = c(10, 20), C = c(10, 15), S = c(1000, 990), R_coeff = c(1.0, 0.9))
epi_par <- data.frame(
  R0 = 2.5, gen_time = 5, gen_time_var = 1
)
noise_par <- data.frame(
  repd_mean = 2, del_disp = 1.5, ur_mean = 0.8, ur_beta_a = 2
)
actions <- data.frame(R_coeff = c(1.0, 0.3))
results <- Epi_MPC_run_V(
  episimdata = episimdata, epi_par = epi_par, noise_par = noise_par,
  actions = actions, pred_days = 10, n_ens = 50, start_day = 1,
  ndays = 20, R_est_wind = 5, pathogen = 1, susceptibles = 1,
  delay = 0, ur = 0, N = 1e6
)
#> Error in Epi_MPC_run_V(episimdata = episimdata, epi_par = epi_par, noise_par = noise_par,     actions = actions, pred_days = 10, n_ens = 50, start_day = 1,     ndays = 20, R_est_wind = 5, pathogen = 1, susceptibles = 1,     delay = 0, ur = 0, N = 1e+06): argument "episettings" is missing, with no default