This file has some instructions for using the files from the paper Inequality across prefectures in Japan: An S factor analysis by Emil O. W. Kirkegaard. ## Analyses The analyses are performed by R and the source files for these analyses all of which end with .R. start.R loads and merges the data. This file is to be run at every startup. main.R has the code for the main analyses: Sections 1-8 and 9.1. Manual action is required for getting the results reported in Section 9.2. sim.R has the code for the simulation mentioned in Section 5. exploratory_controls.R has the code for the analyses in Section 9.3. S factor Japan.Rproj is the RStudio project file, which is not necessary but nice to have. ## Data files The raw data files from the Japanese statistics bureau are found in the folder "raw data files from e-stat". These are in .xls (MS Excel) format. estat_data.csv is my selection of data from these files. Sfactor JP project.ods is the data form Kenya Kura. The file is LibreOffice Calc. infant.death rate JP 2005-2014.xlsx is the extra child mortality data examined to determine the source of the 'low' correlations discussed in Section 3. Japan IQ (2007-2015).xlsx has the cognitive data from Kura. extra_data.csv has the extra population data from Wikipedia used in Section 9.3. ## The paper The paper is written in LibreOffice using Zotero as a reference manager. The primary file is paper.odt. paper.pdf is a PDF export of this. ## Figures The figures in high quality PNG format are in the "figures" folder.