The Re value reported for time t corresponds to the value estimated when assuming that is Re is constant over e.g. (T-3, T-2, T-1, T), for a sliding window of 4 time steps.

.estimate_Re_EpiEstim_sliding_window(
  incidence_input,
  import_incidence_input = NULL,
  minimum_cumul_incidence = 12,
  estimation_window = 3,
  mean_serial_interval = 4.8,
  std_serial_interval = 2.3,
  mean_Re_prior = 1,
  output_HPD = FALSE
)

Arguments

incidence_input

Module input object. List with two elements:

  1. A numeric vector named values: the incidence recorded on consecutive time steps.

  2. An integer named index_offset: the offset, counted in number of time steps, by which the first value in values is shifted compared to a reference time step This parameter allows one to keep track of the date of the first value in values without needing to carry a date column around. A positive offset means values are delayed in the future compared to the reference values. A negative offset means the opposite.

import_incidence_input

NULL or module input object. List with two elements:

  1. A numeric vector named values: the incidence recorded on consecutive time steps.

  2. An integer named index_offset: the offset, counted in number of time steps, by which the first value in values is shifted compared to a reference time step This parameter allows one to keep track of the date of the first value in values without needing to carry a date column around. A positive offset means values are delayed in the future compared to the reference values. A negative offset means the opposite.

If not NULL, this data represents recorded imported cases. And then incidence_input represents only local cases.

minimum_cumul_incidence

Numeric value. Minimum number of cumulated infections before starting the Re estimation. Default is 12 as recommended in Cori et al., 2013.

estimation_window

Use with estimation_method = "EpiEstim sliding window" Positive integer value. Number of data points over which to assume Re to be constant.

mean_serial_interval

Numeric positive value. mean_si for estimate_R

std_serial_interval

Numeric positive value. std_si for estimate_R

mean_Re_prior

Numeric positive value. mean prior for estimate_R

output_HPD

Boolean. If TRUE, return the highest posterior density interval with the output.

Value

If output_HPD = FALSE, value is a module object (a list of the same kind as incidence_input). The values element of the list then contains the Re estimates. If output_HPD = TRUE, a list of three module objects is returned.

  • Re_estimate contains the Re estimates.

  • Re_highHPD and Re_lowHPD contain the higher and lower boundaries of the HPD interval, as computed by estimate_R