Data and code for study "Effect of changes in population density and crop productivity on farm households in Malawi"

Published: 16-08-2019| Version 1 | DOI: 10.17632/vbkscdgdbd.1
Adam M. Komarek


Author to who correspondence may be addressed: Adam Komarek ( Most recent edit: April 1st, 2019 Details: the zip file '' has two main folders for the code and data required to replicate the results in the study "Effect of changes in population density and crop productivity on farm households in Malawi". The study DOI is Study authors are Adam M. Komarek and Siwa Msangi 1) a folder 'gams' that requires six steps to run the GAMS model. The GAMS model was run on GAMS version 24.8.5 The GAMS model is the DAHBSIM (Dynamic Agricultural Household Bio-Economic Simulation Model) Six steps: I. ensure all files and folders inside the folder 'gams' are inside the same one folder II. open project file 'model.gpr' inside 'gams' folder III. open settings.gms. The directory settings are on lines 17 to 21, no need to write out the file paths as '$setglobal filelocation' sets the file path to wherever model.gpr is located IV. open and run 'set_database.gms' in gams\model, to ensure the database is there V. open and run 'gen_baseline.gms' in gams\model, this runs the baseline model and the scenarios using the toggle on L199, if needed include 's=dahbsim rf=dahbsim' in the command line without the single quotation marks VI. scenario data in \gams\data_raw\cropcoef_raw.xlsx and scenario code in gams\model\scenario_model.gms 2) a folder 'r' with five main items that include the R project and four main folders: I. 'cropProdMWI.Rproj' is the R project. It must be opened to set the project directory, which is needed to read in the data II. the R scripts are in the folder 'scripts'. There are 7 scripts, which are ordered sequentially III. the folder 'data' contains the data used in the scripts IV. output from the scripts are in the folder 'output' V. livestock data, relevant for manure application, are in the folder 'livestock'