Readme file for the computer code of "Mechanistic quantification of the effects of genes, environment, and development on human behaviour" by Mauricio González-Forero and Aida Gómez-Robles.

This file describes and explains the files needed to run the brain model and make the figures in the main text and supplementary information.
These code files build upon the code files of González-Forero (2024) Evolutionary-developmental (evo-devo) dynamics of hominin brain size. Nat. Hum. Behav. 8, 1321–1333 https://doi.org/10.1038/s41562-024-01887-8.

These files were prepared to run in Julia 1.7.2 using the editor Visual Studio Code 1.81.1.
Julia and Visual Studio Code can be installed as indicated in https://www.julia-vscode.org/docs/dev/gettingstarted/.

The following Julia packages are needed:
Plots, Dates, CSV, DataFrames, LinearAlgebra, Distributions, and Statistics.

There are two sets of files:

Set 1 lists the files that produce the figures: run each file to obtain the figure indicated by the file name; restart Julia before running each file, then open the desired file with Visual Code Studio and press the Execute button. NatHumBehavFig1.jl must be run first, before most other files. 

Set 2 contains the underlying code for the model or figures.

Set 1
NatHumBehavFig1.jl: Generates Fig. 1 of González-Forero (2024). It takes about 30 min to run. This file must be run first, before most of the other files.
The remaining files whose name starts with ``Fig'' generate the figure indicated by the file name.

Set 2
RunBrain.jl: This file runs the brain model and is called by NatHumBehavFig1.jl.
BrainParameters.jl: This file specifies the parameter values.
BrainInitialConditions.jl: This file specifies the initial conditions.
BrainFunctions.jl: This file defines the functions used to run the brain model, except for the functions used in the socio-devo dynamics phase.
BrainFunctionsSDS.jl: This file defines the functions used in the socio-devo dynamics phase.

BrainPlotFunctions.jl: This file defines the functions used to make Figs. 1, 3, 4, and S1-S17.
BrainPlotInterventionFunctions.jl: This file defines functions used to make Figs. 5, 6, S18, and S19.
PrimateData.jl: This file contains the primate and human data used in the figures.

