First attempts at creating an R package as part of a project workflow. Also trying this is as a better way to keep track of progress. This document is a lab notebook for this project, idea being that it can contain stream-of-consiousness thoughts/musings/ideas as this project develops outside of the more formal analysis folder and the other project infrastructure.
Main goal for today was to transfer key functions from the elimination feasibility project into this project in an attempt to better organize functions from that project that will be reused here. These functions include the dynamic model itself, the function to estimate
Continued transferring over functions and simulations from previous work and started working on a document (Analysis/Model_Sims.Rmd
) to demonstrate functionality and keep track of the functions implemented in the package and what they do. Now able to produce generic gganimate
to show how
Transferred over code for the stochastic model implemented in adaptivetau
Added deterministic and stochastic versions of an age stratified model with non-linear man-to-snail force of infection as described in Gurarie et al 2018 and functions to simulate it. Added functionality to simulate models with or without events. Modified base model to include clumping parameter responsive to mean worm burden. Incorporated clumping parameter function derived from Senegal data relationship between log of mean worm burden and clumping parameter
Added explorations of mating probability over different values of the clumping parameter to assess the impact of variable
Added Model_animations.Rmd
which uses the model functions to produce simulations and visualizations as animations of worm burdens and
Worked on revamping and updating simulations with the simple model presented in Garchitorena et al. New document Garch_Mod.md
reflects these efforts.
Worked on presentation for NIMBioS July 2019 talk. Realized that discrete time model isn't necessary to build transition and utility matrices for MDPtoolbox and extracting relevant values of
Ran simulations using differential equation model to identify optimal treatment allocations over values of
Finished running some simulations of adaptiveTau
model with permanent parameter reductions and single variable pulses like MDA. Need to spend some time making model more generalizable for easy implementation of different types/combinations of variables.
Similar story with Garchitorena et al model. Since parameter interventions are implemented as forcing functions, the function passed to ode and the function simulating intervention decisions are hard coded for a particular intervention variable. Need to find a way to pass these options as function options
Worked on deriving Reff_derivation.Rmd
document. Spent lots of time just trying to simplify the expression down into something more analytically tractable and interpretable, but that's starting to feel like a bit of a losing battle.
Created outline for schisto
Did more work on the analystic expression of
Started writing the introduction and methods for the manuscript. Did some more scribbling to figure out different ways of expressing
Worked on paper introduction and additional structure more. Finally settled on a final version of the model and corresponding
Worked on ESA presentation corresponding to this work
Did some more writing and coded up function to estimate transmission parameters as a function of input snail prevalence, worm burden and prevalence in the human and child populations. Did some test model fits with data from Gurarie et al
Formalized fitting functions and other helper functions in the R package (added documentation, function descriptions, etc.). Ransome test simulations and worked on coding a stochastic version of the model.
Worked on coding Reff estimation for age stratified model. Worked on figuring out model parametrs as functions of equilibrium state variable values
Finished figuring out estimation of model parameters from equilibirum state variable values, documented in Parameters_from_eq_states.Rmd
. Coded and documented all resulting functions in schisto_age_structured_models.R
. Also updated the
Lots of debugging
Gave up (at least for the moment) on the non-linear snail FOI and was finally able to make substantial progress. Have a function that takes model parameters fit to endemic infection levels and returns an estimate of the snail infection prevlance and mean worm burden at the transmission breakpoint. Was also thinking that
Returning from ESA and a week vacation. Lots of mad scrambles before ESA to get functions right to produce figures and such for the conference presentation. Focusing now on the paper and a somewhat simplified version of the model with no age or treatment stratification which makes the analytic results more straightforward.
Working on producing figures. Have some ideas for I by W heat map and trajectories through time with different interventions. Also think it's worth combining
Worm burden breakpoint estimation wasn't quite working right because of the log term in the function I was using to estimate the clumping parameter as a function of the worm burden, so dove down that rabit hole to try and fit a function relating kappa to W from data. Seems as though a saturating function fits the data the best, but in this formulation, kappa rapidly approaches 0 as W approaches 0 which may mean that there is no breakpoint...
Looked into fitting a function of the clumping parameter to infection intensity data a bit more which involved a lot of details regarding how exactly to estimate the worm burden and clumping parameter from egg burden and prevalence data, while incorporating density dependent fecundity and the mating probability. Still working on this, but thinking it best to explicitly discuss how structural uncertainties in the model (e.g. how does the clumping parameter change in response to infection intensity) affect the breakpoint.
This should be fairly straightforward since the force of infection in the snail population is a function of the total infectious input from the human population, so rather than the