Tuesday, September 29, 2020

EpiNow2 package

https://github.com/epiforecasts/EpiNow2 https://epiforecasts.io/EpiNow2/reference/estimate_infections.html#examples https://github.com/epiforecasts/covid-rt-estimates


These worked
reporting_delay <- bootstrapped_dist_fit(rlnorm(100, log(4), 1), max_value = 30)
generation_time <- get_generation_time(disease = "SARS-CoV-2", source = "ganyani")
incubation_period <- get_incubation_period(disease = "SARS-CoV-2", source = "lauer")

estimates <- epinow(reported_cases = local_cases, samples=100, output='samples',
                    generation_time = generation_time,
                    delays = list(incubation_period, reporting_delay))

localRtTb = estimates$estimates$summarised[ estimates$estimates$summarised$variable=='R' , ]



It seems the default setting is recommended. 
# Note: all examples below have been tuned to reduce the runtimes of examples # these settings are not suggesed for real world use. # run model with default setting


It seems that by default, Rt varies. 
# run model with stationary Rt assumption (likely to provide biased real-time estimates) stat <- estimate_infections(reported_cases, generation_time = generation_time, delays = list(incubation_period, reporting_delay), stan_args = list(warmup = 200, cores = ifelse(interactive(), 4, 1), control = list(adapt_delta = 0.9)), stationary = TRUE)

No comments:

Post a Comment