Main content



Loading wiki pages...

Wiki Version:
The project includes the data (from the World Values Survey), code, and outputs for the threat and politics project. Preprint is here: The best way to use these files are to download all of the files into a single folder on your computer using the same folder structure as is used on the OSF. Then open "Threat.Rproj" using RStudio, as well as the script called "master.R". Running this script will produce the figures and results in the paper. There are additional files. Some of these are created by the scripts (e.g., the .png files, some of the .csv files containing output). Others are used for peripheral tasks. E.g., "add trust and constrain to country measures.R" was used to add the trust and constraint data from the WVS to the file containing the other country-level variables. The file "variance explained.R" is used to calculate the variance explained from the discussion section of the paper. Finally, the file "cross_country measures.xlsx" contains much of the same data as "measures.csv", but includes more notes about sourcing. Questions? Contact