Learn R Programming

EpiNow2 (version 1.3.2)

regional_runtimes: Summarise Regional Runtimes

Description

Used internally by regional_epinow to summarise region run times.

Usage

regional_runtimes(
  regional_output = NULL,
  target_folder = NULL,
  target_date = NULL,
  return_output = FALSE
)

Arguments

regional_output

A list of output as produced by regional_epinow and stored in the regional list.

target_folder

Character string specifying where to save results (will create if not present).

target_date

A character string giving the target date for which to extract results (in the format "yyyy-mm-dd"). Defaults to latest available estimates.

return_output

Logical, defaults to FALSE. Should output be returned, this automatically updates to TRUE if no directory for saving is specified.

Value

A data.table of region run times

See Also

regional_summary regional_epinow

Examples

Run this code
# NOT RUN {
# 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)
                        
# 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"))

regional_runtimes(regional_output = regional_out$regional)
# }

Run the code above in your browser using DataLab