Logo Lanfrica

leighjohnson/MicroCOSM

Domaine:

healthcare

Type de record:

model
Créateur:
lei
Hôte:
Agent-based model of HIV & STIs in South Africa # Notes on producing results using MicroCOSM This document provides details on how to replicate the results presented in our submission to *PLOS Medicine* (‘Money, jobs or schooling? A model-based evaluation of economic strengthening in South Africa and its impact on HIV, sexually transmitted infections and teenage births’). It is not intended as a user guide, but in Appendix B we have provided some general guidance on the model code. The code was written in C++, and was compiled and run using the gcc compiler. The default code that we have shared is the code used to run the model up to 2025, with a sample of 100 parameter combinations drawn from the main posterior distribution, not allowing for any economic strengthening interventions (i.e. the baseline scenario). The lists that follow provide more detail on the specific code changes need to replicate the published model outputs. For convenience, we have also included two spreadsheet files: Likelihood.xlsx (which shows how the likelihood values were calculated) and Posteriors.xlsx (which shows how the posterior sample was drawn, based on the likelihood values). ## To do the calibration to the data from randomized controlled trials (RCTs): - Set `ProjectionTerm = 27`. - Set `BaselineStart = 2005`. - Set `FixedUncertainty = 0`. - Set `StructuralRCTcalib = 1`. - In the OneSimulation function, make sure the command `if (StructuralRCTcalib == 1){ RunStructRCTs(); }` is active (not commented out). - Set `ParamCombs` and `samplesize` to 5000 (or whatever sample size you want to use in the initial calibration step). - Run the model. The command line to compile in gcc is `g++ -std=c++14 Microsimulation.cpp StatFunctions.cpp mersenne.cpp -o Microsimulation.exe`. After the model has compiled, the command to run the model is just `./Microsimulation`. - After you’ve finished producing results, copy the contents of the CashTransferOut, SchoolSupportOut and VocationTrainingOut files into cell A6 of the corresponding sh …

Licenses