Example of using EPPASM with leapfrog model engine
2026-01-28
Source:vignettes/eppasm-leapfrog.Rmd
eppasm-leapfrog.RmdEPPASM can use the leapfrog model during simulation and fitting. This vignette shows an example of using leapfrog with EPPASM.
Firstly we need to read the data
pjnz <- system.file("extdata/testpjnz", "Mozambique_Maputo_Cidade2018.PJNZ", package="eppasm.lf")Simulate with direct incidence input
fp <- eppasm.lf::prepare_directincid(pjnz)
mod <- eppasm.lf::simmod(fp, VERSION = "leapfrog")Simulate with transmission input
theta_rhybrid <- c(-0.407503322169364, -2.76794181367538, -1.26018073624346, 1995.96447776502,
-0.00307437171215574, 0.0114118307148102, 0.00760958379603691, 0.02,
2.24103194827232, -0.0792123921862689, -5.01917961803606, 0.359444135205712,
-6.10051517060137)
inputs <- eppasm.lf::prepare_spec_fit(pjnz, 2018.5)
prep <- eppasm.lf::prep_fp_fitmod(inputs[["Maputo Cidade"]], eppmod = "rhybrid")
fp <- stats::update(prep$fp, list=eppasm.lf::fnCreateParam(theta_rhybrid, prep$fp))
mod <- eppasm.lf::simmod(fp, VERSION = "leapfrog")