Formula: robust locally weighted regression of daily counts on time.
At each day x0 the fit is the intercept of the weighted least-squares
line of cases on dates - x0 with tricube neighbourhood
weights w_i = (1 - |x_i - x0|^3 / h^3)^3 for |x_i - x0| < h
(Cleveland 1979 eq. 2), followed by iterations robustness
passes weighting each observation by the bisquare of its residual
scaled by six times the median absolute residual,
delta_i = (1 - (r_i / (6 s))^2)^2 for |r_i| < 6 s (eq. 5-7). A fixed
bandwidth in day units replaces Cleveland's nearest-neighbour span.
Examples
Epicur(dates = c(1, 2, 3, 4, 5, 6, 7, 8), cases = c(1, 2, 3, 4, 5, 6, 7, 8), bandwidth = 0.5)
#> $estimate
#> [1] 8
#>
#> $fitted
#> [1] 1 2 3 4 5 6 7 8
#>
#> $peak_date
#> [1] 8
#>
#> $peak_value
#> [1] 8
#>
#> $total
#> [1] 36
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Epidemic curve smoothing"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
