From 0dfe13c3eb1e3329dcf49525faa7b9da41c7ca30 Mon Sep 17 00:00:00 2001 From: rjs11 Date: Tue, 10 Dec 2024 16:54:19 +0000 Subject: [PATCH] PMC age subsetting has a mistake in it. timesteps and time_index in should only be used in choosing the correct coverage, not to calculate the implementation ages. The code should follow that seen in the epi_pev age subsetting. --- R/pmc.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pmc.R b/R/pmc.R index 6397c681..96682092 100644 --- a/R/pmc.R +++ b/R/pmc.R @@ -41,7 +41,7 @@ create_pmc_process <- function( return() } in_age <- variables$birth$get_index_of( - timesteps[time_index] - parameters$pmc_ages + timestep - parameters$pmc_ages )$to_vector() target <- in_age[sample_intervention(in_age, 'pmc', coverage, correlations)]