Deriving-mesoscopic-models-of-collective-behaviour-for-finite-populations This repositiory contains codes used for simulating the pairwise interaction and the ternary interaction model of collective behavior which are described in the book chapter entitiled "Deriving mesoscopic models of collective behaviour for finite populations" that is going to be published in the Elsevier: Handbook of Statistics, Vol 40.