This repo contains the code used in the analysis of the paper "Cascading regime shifts within and across scales". The paper is currently under review (181029) but a preprint is available in biorxiv. All data was downloaded from the Regime Shifts Database and a copy of the version of the database used as well as curated causal networks can be found in a figshare repository. The development version of the analysis rest on a private repo, but here you will find published the final versions of the code used. The numbers on the files are the dates where the files are created, helping keep track of the latest version. To read the data use the
read_data.R in combination with the files stored in figshare. Make sure to change the paths to the files accordingly. To run the exponential random graph models you can use the
ergm.R file. Note that the first line sources
read_data, so make sure to update both data and file paths before runing it.