This function returns piecewise-constant Re estimates.
.estimate_Re_EpiEstim_piecewise_constant(
incidence_input,
import_incidence_input = NULL,
minimum_cumul_incidence = 12,
interval_ends = NULL,
interval_length = 7,
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:
A numeric vector named values : the incidence recorded on consecutive time steps.
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:
A numeric vector named values : the incidence recorded on consecutive time steps.
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. |
interval_ends |
Use with estimation_method = "EpiEstim piecewise constant"
Integer vector. Optional argument.
If provided, interval_ends overrides the interval_length argument.
Each element of interval_ends specifies the right boundary
of an interval over which Re is assumed to be constant for the calculation.
Values in interval_ends must be integer values corresponding
with the same numbering of time steps as given by incidence_input .
In other words, interval_ends and incidence_input ,
use the same time step as the zero-th time step. |
interval_length |
Use with estimation_method = "EpiEstim piecewise constant"
Positive integer value.
Re is assumed constant over steps of size interval_length . |
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