regional_runtimes(
regional_output = NULL,
target_folder = NULL,
target_date = NULL,
return_output = FALSE
)
A list of output as produced by regional_epinow
and stored in the
regional
list.
Character string specifying where to save results (will create if not present).
A character string giving the target date for which to extract results (in the format "yyyy-mm-dd"). Defaults to latest available estimates.
Logical, defaults to FALSE. Should output be returned, this automatically updates to TRUE if no directory for saving is specified.
A data.table of region run times
regional_summary regional_epinow
# \donttest{
# example delays
generation_time <- get_generation_time(disease = "SARS-CoV-2", source = "ganyani")
incubation_period <- get_incubation_period(disease = "SARS-CoV-2", source = "lauer")
reporting_delay <- example_delay(rlnorm(100, log(6), 1), max_value = 15)
#> Error in example_delay(rlnorm(100, log(6), 1), max_value = 15): could not find function "example_delay"
# example case vector from EpiSoon
cases <- example_confirmed[1:30]
cases <- data.table::rbindlist(list(
data.table::copy(cases)[, region := "testland"],
cases[, region := "realland"]
))
# run basic nowcasting pipeline
regional_out <- regional_epinow(
reported_cases = cases,
generation_time = generation_time,
delays = delay_opts(incubation_period, reporting_delay),
samples = 100, stan_args = list(warmup = 100),
output = c("region", "timing")
)
#> INFO [2022-03-28 04:11:37] Producing following optional outputs: regions, timing
#> Logging threshold set at INFO for the EpiNow2 logger
#> Writing EpiNow2 logs to the console and: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpqbXERq/regional-epinow/2020-03-22.log
#> Logging threshold set at INFO for the EpiNow2.epinow logger
#> Writing EpiNow2.epinow logs to: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpqbXERq/epinow/2020-03-22.log
#> INFO [2022-03-28 04:11:37] Reporting estimates using data up to: 2020-03-22
#> INFO [2022-03-28 04:11:37] No target directory specified so returning output
#> INFO [2022-03-28 04:11:37] Producing estimates for: testland, realland
#> INFO [2022-03-28 04:11:37] Regions excluded: none
#> Error in delay_opts(incubation_period, reporting_delay): object 'reporting_delay' not found
regional_runtimes(regional_output = regional_out$regional)
#> Error in regional_runtimes(regional_output = regional_out$regional): object 'regional_out' not found
# }