The abm_grid Mata class is now available from this github repository. abm_grid is a Mata class intended to help manage a grid for Agent Based models. An Agent Based Model is a simulation in which agents, that each follow simple rules, interact with one another and thus produce a often surprising outcome at the macro level. The purpose of an ABM is to explore mechanisms through which actions of the individual agents add up to a macro outcome, by varying the rules that agents have to follow or varying with whom the agent can interact (i.e. varying the network).
Implementing a new ABM will always require that person developing the ABM does some programming, but many tasks will be similar across ABMs. For example, in many ABMs the agents live on a square grid (like a chessboard), and can only interact with their neighbours. The abm_grid class contains a set of Mata functions that will do those task, and that someone can import in her or his own ABM.
This requies Stata version 15. The class itself is defined in the abm_grid.mata file. The class can be imported and used in an ABModel by adding the line do abm_grid.mata to the .do file that defines the ABM. There is a complete example of a simple ABM using abm_grid in the help files, start with help abm_grid. I will also give a talk on this at the upcoming German Stata Users' meeting on Friday May 24 in Munich.
I chose to use GitHub to distribute this class rather than SSC because this is a module that someone who is programming her or his own ABM might want to include in her or his ABM rather than a program ready for the end-user. Also I view this a collection of (potentially) useful functions, and I would like to encourage anyone who has something to add to that collection to do so.
Related Posts with abm_grid: new Mata class for handling grids for Agent Based Models available on GitHub
Exporting two-way tabulation results to excel (in stata 14)Hello, I want to export two-way tabulation using (row option and survey weights) results to excel. …
How to change value labels?My variable "q2" has two values: 1 and 2. Their labels are No and Yes, respectively. Now I want to …
Survival Time Data - Long Form - How do I generate a variable that indicates the number of observations at risk within a subgroup of data?I have a dataset on legal cases and individual hearings for each case, across multiple courts. I hav…
Convert categorical variable to dummy variables in a large datasetDear everyone, I have a dataset of 350 categorical variables, e.g: How satisfied are you with your …
Following different portfolios over timeI have a data set of American companies over the period 1985-2015 with circa 300k observations of le…
Subscribe to:
Post Comments (Atom)
0 Response to abm_grid: new Mata class for handling grids for Agent Based Models available on GitHub
Post a Comment