##Codes for for "Deriving mesoscopic models of collective behaviour for finite populations", to be published in the Elsevier: Handbook of Statistics, Vol 40.
###Codes
- A MATLAB code (SDE_simulate_pairwise.m) to perform numerical integration of the mesoscopic stochastic differential equation for the pairwise interaction model of collective behaviour, written by Jitesh Jhawar.
The output is a time series of group polarization and histograms corresponding to a single group size, in Figure 3 of the manuscript.
- A MATLAB code (SED_simulate_ternary.m) to perform numerical integration of the mesoscopic stochastic differential equation the ternary interaction model of collective behaviour, written by Jitesh Jhawar.
The output is a time series of group polarization and histograms corresponding to a single group size, in Figure 4 of the manuscript.
- A MATLAB code (SSA_pairwise.m) to simulate the pairwise interaction model of collective behaviour using the the stochastic simulation algorithm, written by Jitesh Jhawar.
The output is a time series of group polarization and histograms corresponding to a single group size, in Figure 3 of the manuscript.
- A MATLAB code (SSA_ternary.m) simulates the ternary interaction model of collective behaviour using the the stochastic simulation algorithm, written by Jitesh Jhawar.
The output is a time series of group polarization and histograms corresponding to a single group size, in Figure 4 of the manuscript.