This directory contains materials for "What Do Survey Data Tell Us about U.S. Businesses?" by A. Bhandari, S. Birinci, E. McGrattan, and K. See --------------------- --------------------- The subdirectories --------------------- --------------------- ./Appendix Supplemental material (also Staff Report 578) ./Manuscript Main paper, figures, and excel (*xlsx) with summary data ./Replication Code Codes to generate results in paper and appendix --------------------- --------------------- Required programs --------------------- --------------------- We use python, stata and latex. In order to run the Python (.py) and Stata (.do) scripts, the user must have the following software/packages: Python -------- python 3.6.8 (any version after 3 should be okay) pandas 1.0.1 numpy 1.16.4 scipy 1.3.0 requests 2.22.0 Stata -------- Stata/MP 15.1 Latex --------- A standard latex installation with packages: natbib, tikz, external, url, pgfplots --------------------- --------------------- Code Index --------------------- --------------------- A list of codes to run to generate each figure/table is as follows: Table 1 - SCF Replication Code/SCF/MainModule.py, Pratt's Stats Replication Code/PRATTS/PrattsNetIncomeYields_aeri.ipynb, and CRSP Replication Code/CRSP_COMPUSTAT/pi_mval_aeri.ipynbFigure 1 - SCF Replication Code/SCF/MainModule.py Figure 2 - SCF Replication Code/SCF/MainModule.py Figure 3 - SCF Replication Code/SCF/MainModule.py, SIPP Replication Code/SIPP/sipp_main.py, PSID Replication Code/PSID/psid_main.do, and CPS Replication Code/CPS/cps_main.do Figure 4 - SCF Replication Code/SCF/MainModule.py Table A.1 - SCF Replication Code/SCF/MainModule.py Table A.2 - SCF Replication Code/SCF/MainModule.py Table A.3 - SCF Replication Code/SCF/MainModule.py Table A.4 - SCF Replication Code/SCF/MainModule.py Table A.5 - SCF Replication Code/SCF/MainModule.py Table A.6 - Gurley-Calvez et al. (2016) Table A.7 - SCF Replication Code/SCF/MainModule.py Table A.8 - CRSP Replication Code/CRSP_COMPUSTAT/pi_mval_aeri.ipynbTable A.9 - Pratt's Stats Replication Code/PRATTS/PrattsNetIncomeYields_aeri.ipynb Table A.10 - PSID Replication Code/PSID/psid_main.do Table A.11 - SIPP Replication Code/SIPP/sipp_main.py Table A.12 - SCF Replication Code/SCF/MainModule.py, CRSP Replication Code/CRSP_COMPUSTAT/PrattsNetIncomeYields_aeri.ipynb and capital_gain_crsp_aeri.ipynb Figure A.1 - SCF Replication Code/SCF/MainModule.py Figure A.2 - SCF Replication Code/SCF/MainModule.py Figure A.3 - SCF Replication Code/SCF/MainModule.py, SIPP Replication Code/SIPP/sipp_main.py, PSID Replication Code/PSID/psid_main.do, and CPS Replication Code/CPS/cps_main.do Figure A.4 - SCF Replication Code/SCF/MainModule.py Figure A.5 - SCF Replication Code/SCF/MainModule.py Figure A.6 - SCF Replication Code/SCF/MainModule.py Figure A.7 - SCF Replication Code/SCF/MainModule.py Figure A.8 - SCF Replication Code/SCF/MainModule.py Figure A.9 - SCF Replication Code/SCF/MainModule.py Figure A.10- SCF Replication Code/SCF/MainModule.py Figure A.11- SCF Replication Code/SCF/MainModule.py Figure A.12- SCF Replication Code/SCF/MainModule.py Figure A.13- SCF Replication Code/SCF/MainModule.py Figure A.14- SCF Replication Code/SCF/MainModule.py Figure A.15- SCF Replication Code/SCF/MainModule.py Figure A.16- SCF Replication Code/SCF/MainModule.py Figure A.17- SCF Replication Code/SCF/MainModule.py --------------------- --------------------- Instructions --------------------- --------------------- 1. Download the contents of the folder "Replication Code" from the online directory to your computer. 2. For the SCF related results go to folder SCF and run python MainModule.py It will create a ./Results which contains csv files i) underlying SCF data; ii) confidence intervals for SCF data in the main text; iii) IRS data for all figures and tables in the paper. 3. For the SIPP-related results go to folder SIPP and download the sipp_xxx.csv files and run Python code Replication Code/SIPP/sipp_main.py. 4. For the PSID-related results go to folder PSID and follow the instructions in data_extract.do file, run data_extract.do file and then run Replication Code/PSID/psid_main.do. 5. For the CPS-related results go to folder CPS and follow the instructions in data_extract.do file, run data_extract.do file and then run Replication Code/CPS/cps_main.do. 6. For the CRSIP-related results go to folder CRISP_COMPUSTAT and follow the instructions in Readme.txt 7. For the PRATTS-related results go to folder PRATTS and follow the instructions in Readme.txt -------------------- Figures --------------------- These codes generate .csv files that contain the data for making the tables and figures in the manuscript and appendix. All the figures in the manuscript and appedix are made using Tikz. To generate standalone pdf files for the figures run the command: pdflatex -shell-escape Manuscript/AERIbbms.tex pdflatex -shell-escape Appendix/sr578Feb2020.tex This will update the figures in the ./Figures subdirectory (make sure it exists before you run the pdflatex commands)