Skip to contents

Generate annual serological and/or case/death data

Usage

Generate_Dataset(
  FOI_values = c(),
  R0_values = c(),
  input_data = list(),
  sero_template = NULL,
  case_template = NULL,
  vaccine_efficacy = 1,
  time_inc = 1,
  mode_start = 1,
  start_SEIRV = NULL,
  mode_time = 0,
  n_reps = 1,
  deterministic = FALSE,
  p_severe_inf = 0.12,
  p_death_severe_inf = 0.39,
  p_rep_severe = 1,
  p_rep_death = 1,
  mode_parallel = FALSE,
  cluster = NULL,
  output_frame = FALSE,
  seed = NULL
)

Arguments

FOI_values

Array of values of force of infection due to spillover from sylvatic reservoir by region + time point

R0_values

Array of values of basic reproduction number for human-human transmission by region and time point

input_data

List of population and vaccination data for multiple regions in standard format [TBA]

sero_template

Seroprevalence data template - data frame with region, year, minimum/maximum age, vc_factor [TBA] and number of samples

case_template

Annual reported case/death data template - data frame with region and year

vaccine_efficacy

Fractional vaccine efficacy

time_inc

Time increment in days to use in model (should be either 1.0, 2.5 or 5.0 days)

mode_start

Flag indicating how to set initial population immunity level in addition to vaccination
If mode_start = 0, only vaccinated individuals
If mode_start = 1, shift some non-vaccinated individuals into recovered to give herd immunity (stratified by age)
If mode_start = 2, use SEIRV input in list from previous run(s)

start_SEIRV

SEIRV data from end of a previous run to use as input (list of datasets, one per region)

mode_time

Type of time dependence of FOI_spillover and R0 to be used:
If mode_time = 0, no time variation (constant values)
If mode_time = 1, FOI/R0 vary annually without seasonality (number of values = number of years to consider)
If mode_time = 2, FOI/R0 vary with monthly seasonality without inter-annual variation (number of values = 12)
If mode_time = 3, FOI/R0 vary with daily seasonality without inter-annual variation (number of values = 365/dt)
If mode_time = 4, FOI/R0 vary annually with monthly seasonality (number of values = 12*number of years to consider)
If mode_time = 5, FOI/R0 vary annually with daily seasonality (number of values = (365/dt)*number of years to consider)

n_reps

number of stochastic repetitions

deterministic

TRUE/FALSE - set model to run in deterministic mode if TRUE

p_severe_inf

Probability of an infection being severe

p_death_severe_inf

Probability of a severe infection resulting in death

p_rep_severe

Probability of reporting of a severe but non-fatal infection

p_rep_death

Probability of reporting of a fatal infection

mode_parallel

TRUE/FALSE - set model to run in parallel using cluster if TRUE

cluster

Cluster of threads to use if mode_parallel = TRUE

output_frame

TRUE/FALSE - indicate whether to output a complete data frame of results in template format (if TRUE) or calculated values only (if FALSE)

seed

Optional random seed value to set before running each region for stochastic normalization; set to NULL to omit; will not work if mode_parallel is not set to FALSE. '

Details

This function is used to generate annual serological and/or case/death data based on templates; it is normally used by the single_posterior_calc() function.

[TBA - Explanation of breakdown of regions to model and how to set lengths of FOI_values and R0_values]