Closed CarmenTamayo closed 2 months ago
Thanks for tagging me. I'll take a look tomorrow.
Hi @CarmenTamayo, I think you're getting the error because you are not wrapping the generation_time
object passed to the generation_time
argument in a call to generation_time_opts()
. So, you should have something like
regional_epinow(
dat_i_day,
--- generation_time = generation_time,
+++ generation_time = generation_time_opts(generation_time),
stan = stan_opts(samples = 1e3, chains = 2),
rt = rt_opts(gp_on = "R0"),
horizon = 0, CrIs = c(0.5, 0.95),
return_output = TRUE,
verbose = FALSE,
logs = NULL
)
Sorry @jamesmbaazam for the delay- I tried and the error persists... what else could be causing this error? thank you
Hi @CarmenTamayo, sorry to hear that. I'll dig into it now. Which branch are you experiencing this issue working on?
Fixed in #144
When running
regional_epinow
in the transmissibility pipeline:res_epinow2_group <- regional_epinow(dat_i_day, generation_time = generation_time, stan = stan_opts(samples = 1e3, chains = 2), rt = rt_opts(gp_on = "R0"), horizon = 0, CrIs = c(0.5, 0.95), return_output = TRUE, verbose = FALSE, logs = NULL )
The code runs but I'm getting a series of errors which result in the output not having any data for the different regions, here is an example for London, but the same error is generated for the remaining regions of the country:
_INFO [2024-01-09 13:03:58] Initialising estimates for: London ERROR [2024-01-09 13:03:58] London: 'names' attribute [1] must be the same length as the vector [0] - <-, names(ids), paste(names(typen), "id", sep = "") INFO [2024-01-09 13:03:59] Completed regional estimates INFO [2024-01-09 13:03:59] Regions with estimates: 0 _INFO [2024-01-09 13:03:59] Runtime error in London : London: 'names' attribute [1] must be the same length as the vector [0] - <-, names(ids), paste(names(typen), "id", sep = "")_ INFO [2024-01-09 13:03:59] Producing summary INFO [2024-01-09 13:03:59] No summary directory specified so returning summary output INFO [2024-01-09 13:03:59] Errors caught whilst generating summary statistics: _INFO [2024-01-09 13:03:59] Error in .checkTypos(e, namesx): Object 'variable' not found amongst
@jamesmbaazam do you know what the problem could be? I'm sure it's easy to fix but I've been looking at the R file for
epinow
and I'm not sure at what point the error is happeningThanks!