knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(aedseo)
This method uses the seasonal onset and burden level methodology to estimate multiple waves for diseases that do not follow a one peak per season pattern. The burden levels are used to define when the first wave has ended by dropping below the desired intensity breakpoint, whereafter a new wave can start. The seasonal onset method is used to determine each wave onset - in the same way as for the single seasonal onset.
The combined_seasonal_output() function implements this functionality by defining the following variables:
burden_level_decrease
before starting the search for a new wave onset.As an example we first generate cases in a tsd object, with the generate_seasonal_data() function. Then we rescale time from monthly to weekly observations to get multiple waves.
set.seed(222) tsd_data_monthly <- generate_seasonal_data( years = 14, phase = 3, start_date = as.Date("2020-05-18"), noise_overdispersion = 5, time_interval = "months" ) tsd_data <- to_time_series( cases = tsd_data_monthly$cases, time = seq.Date( from = as.Date("2020-05-18"), by = "week", length.out = length(tsd_data_monthly$cases) ) ) |> dplyr::filter(time < as.Date("2023-05-22")) plot(tsd_data)
Then we estimate the disease-specific threshold.
disease_threshold <- estimate_disease_threshold(tsd_data)
Multiple waves are estimated such that after a wave onset, observations have to
decrease below the low intensity level for two time steps to end the wave.
A new wave can then start if observations fulfill the seasonal onset criteria.
multiple_waves <- combined_seasonal_output( tsd_data, disease_threshold = disease_threshold$disease_threshold, multiple_waves = TRUE, burden_level_decrease = "low", steps_with_decrease = 2 )
plot(multiple_waves)
From the plot we can observe that season 2023/2024 has five waves.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.