A Bayesian Approach to Modelling Subnational Spatial Dynamics of Worldwide Non-State Terrorism, 2010 - 2016 A. Python, J. Illian, C. Jones-Todd, M. Blangiardo J. R. Statist. Soc. A, XX (2018), XX -- XX All results are obtained using R statistical software. We provide the R code and data needed to reproduce the research work. For full replication, the R code listed below should be run in this order: -first: from (1) to (2): generate input data for the statistical models; -second: (4), (5) and (6): the L,S, and F model, respectively; -third: (7): the results and plots of the L,S, and F model, respectively. Since fitting the models are computationally intense, we also provide the outputs of the models as .RData files along with the R code used to produce them. The R code and data are provided in "R_code.zip", which contains the following folders: (1) GTD GTD.R: extraction of terrorism data from the Global Terrorism database (GTD) Input: GTDsource.csv (file downloaded Jan 2017 from GTD) Output: GTDworld.csv used in R code (2): (2) DATA Data_paper.R: extraction of covariate data based on GTD events locations Input: covariates data with different formats in covariate.zip Output: paper_data.RData used in R code (4) to (9) (3) FUNCTIONS functions.R: functions to facilitate running the spatio-temporal models in R-INLA used in in R code (4) to (9) (4) L-MODEL L_model.R: the Bernoulli space-time models of the lethality of terrorism Inputs: paper_data.RData (2) and functions.R (3) Outputs: -models with different sets of covariates: L0.Rdata to L7.RData ; -selected final model: L7.Rdata -models for plotting: L7.Rdata -robustness test models: Lrob1.Rdata, Lmesh2.RData, Lmesh3.RData -predictive models with different sets of covariates: L7pred.Rdata, L0pred.Rdata (5) S-MODEL S_model.R: the Poisson space-time models of the severity of lethal terrorism Inputs: paper_data.RData (2) and functions.R (3) Outputs: -models with different sets of covariates: S0.Rdata to S7.RData ; -selected final model: S4.Rdata -models for plotting: S4plot.Rdata -robustness test models: bernrob1.Rdata, bernmesh2.RData, bernmesh3.RData -predictive models with different sets of covariates: bern0pred.Rdata, bern4pred.Rdata (6) F-MODEL F_model.R: the Poisson space-time models of the frequency of lethal terrorism Inputs: paper_data.RData (2) and functions.R (3) Outputs: -models with different sets of covariates: F0.Rdata to F7.RData ; -selected final model: Ffinal.Rdata -models for plotting: F3plot.Rdata -robustness test models: Frob1.Rdata, Ffinalagg075.RData, Ffinalagg025.RData,Ffinalagg100.RData, Ffinalagg150.RData -predictive models with different sets of covariates: F0pred.Rdata, F6pred.Rdata (7) RESULTS -Results_Lmodel.R: generate the results of the L-models and the graphics in the manuscript Inputs: paper_data.RData (2), functions.R (3), L-model outputs (4) Outputs: plots and figures -Results_Smodel.R: generate the results of the S-models and the graphics in the manuscript Inputs: paper_data.RData (2), functions.R (3), S-model outputs (5) Outputs: plots and figures -Results_Fmodel.R: generate the results of the F-models and the graphics in the manuscript Inputs: paper_data.RData (2), functions.R (3), F-model outputs (6), and country.shp Outputs: plots and figures Contact (first author): Dr Andre Python Malaria Atlas Project | University of Oxford Big Data Institute | Li Ka Shing Centre for Health Information and Discovery Old Road Campus | Headington | Oxford | OX3 7LF | United Kingdom E: andre.python@bdi.ox.ac.uk W: www.map.ox.ac.uk | www.bdi.ox.ac.uk