dot-smooth_LOESS.Rd
Prefer the use of the wrapper function smooth_incidence(..., smoothing_method = "LOESS")
instead of .smooth_LOESS
.
.smooth_LOESS( incidence_input, data_points_incl = 21, degree = 1, initial_Re_estimate_window = 5 )
incidence_input | Module input object. List with two elements:
|
---|---|
data_points_incl | integer. Size of the window used in the LOESS algorithm.
The |
degree | integer. LOESS degree. Must be 0, 1 or 2. |
initial_Re_estimate_window | integer. In order to help with the smoothing, the function extends
the data back in time, padding with values obtained by assuming a constant Re. This parameter represents
the number of timesteps in the beginning of |
A list with two elements:
A numeric vector named values
: the result of the computations on the input data.
An integer named index_offset
: the offset, counted in number of time steps,
by which the result is shifted compared to an index_offset
of 0
.
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.
Note that the index_offset
of the output of the function call
accounts for the (optional) index_offset
of the input.
If index_offset
is 0
and simplify_output = TRUE
,
the index_offset
is dropped and the values
element is returned as a numeric vector.
This function implements the LOESS method for smoothing noisy data.
It relies on loess
.
See the help section for loess
for details on LOESS.