Skip to contents

Get the subpopulation level incident infections

Usage

subpop_inf_process(
  generate_inf_fxn,
  n_subpops,
  uot,
  ot,
  ht,
  unadj_r_site,
  initial_growth,
  initial_growth_prior_sd,
  i0_over_n,
  sd_i0_over_n,
  generation_interval,
  infection_feedback,
  infection_feedback_pmf,
  pop_fraction
)

Arguments

generate_inf_fxn

function indicating how to generate infections, This will typically take the generate_infections() function from the wwinference.stan model.

n_subpops

integer indicating the number of subpopulations

uot

integer indicating the days for exponential growth initialization to occur (referred to as unobserved time)

ot

integer indicating the number of days we will have observed data for in the calibration period

ht

integer indicating the time after the last observed time to forecast

unadj_r_site

n_subpop x n_weeks matrix of the unadjusted site level R(t)

initial_growth

float indicating the mean of the initial growth rate in the unobserved time

initial_growth_prior_sd

float indicating the standard deviation on the initial growth rate across subpopulations

i0_over_n

float indicating the mean of the initial per capita infections

sd_i0_over_n

float indicating the standard deviation of the log of the initial infections per capita across subpopulations

generation_interval

vector of simplex describing the probability of each time from infection to onwards transmission

infection_feedback

numeric indicating the strength of the infection feedback

infection_feedback_pmf

vector of simplex describing the delay from incident infections to feedback on incident infections

pop_fraction

vector of a simplex of length n_subpops, indicating the proportion of the global population that subpopulation represents

Value

A list containing 3 outputs: i_n: n_subpop X total days matrix of daily incident infections per capita in each subpopulation, r_site: adjusted subpopulation level R(t) estimate, i_n_global: vector of daily incident infections per capita in the global population