Skip to content
Supplementary code for "Network Dynamics of Social Conventions"
R
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore First Commit Jan 27, 2019
Becker - The Network Dynamics of Convention - Draft With Title Page.pdf preprint Jun 6, 2019
Figure 2 and 3.R First Commit Jan 27, 2019
Figure 4 and 5.R First Commit Jan 27, 2019
Figure 6.R
Figure 7.R First Commit Jan 27, 2019
README.md First Commit Jan 27, 2019
cg_arbitrary_deg_seq.R First Commit Jan 27, 2019
cg_ba.R First Commit Jan 27, 2019
cg_density.R First Commit Jan 27, 2019
cg_effect_of_cent.R First Commit Jan 27, 2019
coordination_game.R First Commit Jan 27, 2019
gen_networks.R First Commit Jan 27, 2019
prep_arbitrary.R First Commit Jan 27, 2019

README.md

CoordinationGame

Supplementary code for "The Network Dynamics of Conventions"

Core Code

The file coordination_game.R contains the basic code for the simulation.

Usage

Each script runs a single iteration of the parameter space. The scripts are designed to be called from the command line with appropriate parameters. This speeds up run-time (because R slows down quite a bit over many iterations of a loop) and allows for the parallel distribution of runs across multiple computing nodes.

Figures 2, 3, and 7

The files cg_ba.R and cg_arbitrary_deg_seq.R contains code for running the coordination game on BA networks and networks with arbitrary degree distributions. This code generates data necessary to generate Figures 2, 3, and 7.

In order to run cg_arbitrary_deg_seq.R you must first run prep_arbitrary.R.

Figures 4 and 5

The file cg_effect_of_cent.R contains code for running the coordiation game on a BA network and generates data necessary to produce Figures 4 and 5.

In order to prevent divide-by-zero in the analysis, this script is designed to run the simulation multiple times on each network. In order to run cg_effect_of_cent.R you must first run gen_networks.R which will generate 100 igraph objects and save them to disk.

This also allows the convenient post-hoc analysis of other node properties that might interest you.

Figure 6

The file cg_density.R contains code for running the coordination game on a decentralized network of varying density and generates data necessary to produce Figure 6.

Files labeled with Figure numbers will produce the figures in the paper from the data generated.

You can’t perform that action at this time.