tests/testthat/test-models/estimate_infections.R

reported_cases <- EpiNow2::example_confirmed[1:30]
generation_time <- get_generation_time(
  disease = "SARS-CoV-2", source = "ganyani", max_value = 10
)
incubation_period <- get_incubation_period(
  disease = "SARS-CoV-2", source = "lauer", max_value = 10
)

# static model
fit <- estimate_infections(
  reported_cases,
  generation_time_opts(generation_time),
  delays = delay_opts(incubation_period),
  stan = stan_opts(chains = 2, warmup = 200, samples = 1000),
  gp = NULL
)

saveRDS(fit, "tests/testthat/test-models/estimate_infections/static.rds")

Try the EpiNow2 package in your browser

Any scripts or data that you put into this service are public.

EpiNow2 documentation built on Sept. 26, 2023, 5:11 p.m.