22 October 2014 This file contains metadata for the replication material of: O’Loughlin, J., A. Linke, and F. Witmer (2014). “The effects of temperature and precipitation variability on the risk of violence in sub-Saharan Africa, 1980-2012” Proceedings of the National Academy of Sciences. DATA FILES PNAS_SSA_RepData.zip pastLongDataB_W.Rdata Main data file in long, grid-month format VariableNames.txt Meta-data file that describes each variable in pastLongDataB_W.Rdata gridsGCSexclude30.shp Polygon shapefile of 2062 one degree grids. "GridID" field matches "Grid" field found in pastLongDataB_W.Rdata countriesSubSahAfr.shp Polygon shapefile from ESRI of sub-Saharan Africa country borders countriesSSA_SthSud.shp Modified shapefile from ESRI of country borders, including South Sudan ANALYSIS FILES PNAS_AnalysisFiles.zip The user will need to set directories (currently set to 'XXX') in several of these files. Published analysis results run using R version 3.1.1 and current packages. SharedMultilevelFunctions.R Shared functions that support multilevel models Scripts expect this file to be in 'inDir' SharedClimateModelFunctions.R Common R file to load shared climate model functions Scripts expect this file to be in 'inDir' MLM.R R script to generate all multilevel models: Table 1, 2 models in main text (null & w/ predictors) Table S4, linear MLM Table S5, 3 ACLED, 1 UCDP, ACLED 1989-2010 Table S6, 6 region subsets Table S7, FH squared + 2 polity LastThreadNum.csv Used to associate unique thread numbers with each MLM model (not necessary to use) PredPowerPois.R Generates Fig 3, the Poisson model predictive power plot PredPowerLinear.R Generates Fig S4, the linear model predictive power plot Fig2_TableS3 The files in this directory can be used to generate Figure 2 and Table S3 cluster_pnas_grid.r Generates Panel A of Figure 2 battles_only_code.r Generates Panel B of Figure 2 Requires att_clust() function and data setup found in cluster_pnas_grid.r riots_only_code.r Generates Panel C of Figure 2 Requires att_clust() function and data setup found in cluster_pnas_grid.r vac_only_code.r Generates Panel D of Figure 2 Requires att_clust() function and data setup found in cluster_pnas_grid.r differences.r Generates Table S3 Requires some data setup found in cluster_pnas_grid.r