diff --git a/examples/tutorial_two_subpops/config_library/config_sample_2pop_inference.yml b/examples/tutorial_two_subpops/config_sample_2pop_inference.yml similarity index 98% rename from examples/tutorial_two_subpops/config_library/config_sample_2pop_inference.yml rename to examples/tutorial_two_subpops/config_sample_2pop_inference.yml index e6f644201..bd3cba6d5 100644 --- a/examples/tutorial_two_subpops/config_library/config_sample_2pop_inference.yml +++ b/examples/tutorial_two_subpops/config_sample_2pop_inference.yml @@ -47,7 +47,7 @@ seir: seir_modifiers: scenarios: - - Ro_all + - inference modifiers: Ro_mod: # assume same for all subpopulations method: SinglePeriodModifier @@ -86,7 +86,7 @@ seir_modifiers: sd: 0.025 a: -0.1 b: 0.1 - Ro_all: + inference: method: StackedModifier modifiers: ["Ro_mod","Ro_lockdown"] @@ -122,10 +122,10 @@ outcomes: outcome_modifiers: scenarios: - - test_limits + - all modifiers: # assume that due to limitations in testing, initially the case detection probability was lower - test_limits: + all: method: SinglePeriodModifier parameter: incidCase subpop: "all" diff --git a/flepimop/main_scripts/inference_slot.R b/flepimop/main_scripts/inference_slot.R index 90d289640..031838c03 100644 --- a/flepimop/main_scripts/inference_slot.R +++ b/flepimop/main_scripts/inference_slot.R @@ -91,6 +91,7 @@ if (opt$config == ""){ } config = flepicommon::load_config(opt$config) +opt$total_ll_multiplier <- 1 if (!is.null(config$inference$incl_aggr_likelihood)){ print("Using config option for `incl_aggr_likelihood`.") opt$incl_aggr_likelihood <- config$inference$incl_aggr_likelihood @@ -450,7 +451,7 @@ for(seir_modifiers_scenario in seir_modifiers_scenarios) { autowrite_seir = TRUE ) }, error = function(e) { - print("GempyorInference failed to run (call on l. 405 of inference_slot.R).") + print("GempyorInference failed to run (call on l. 443 of inference_slot.R).") print("Here is all the debug information I could find:") for(m in reticulate::py_last_error()) print(m) stop("GempyorInference failed to run... stopping") @@ -637,8 +638,8 @@ for(seir_modifiers_scenario in seir_modifiers_scenarios) { sim_hosp <- sim_hosp %>% dplyr::bind_rows( sim_hosp %>% - dplyr::select(-tidyselect::all_of(obs_subpop), -tidyselect::starts_with("date")) %>% - dplyr::group_by(time) %>% + dplyr::select(-tidyselect::all_of(obs_subpop)) %>% + dplyr::group_by(date) %>% dplyr::summarise(dplyr::across(tidyselect::everything(), sum)) %>% # no likelihood is calculated for time periods with missing data for any subpop dplyr::mutate(!!obs_subpop := "Total") )