Replication Packet for: "Cyclical Worker Flows: Cleansing vs. Sullying" by Haltiwanger, Hyatt, McEntarfer and Staiger Review of Economic Dynamics This file describes the structure of the replication folders and describes how to apply for access to the proprietary data and the replication code for “Cyclical Worker Flows: Cleansing vs. Sullying". The main analysis is conducted on the servers at the US Census Bureau using both SAS and Stata code. The code in this replication package constructs the analysis file from the confidential data at the US Census Bureau. The code identifies the core microdata required (e.g., LEHD data infrastructure files, LBD). To gain access to the Census microdata, follow the directions here on how to write a proposal for access to the data via a Federal Statistical Research Data Center (FSRDC): https://www.census.gov/about/adrm/ced/apply-for-access.html. Code was run on the Census Bureau servers that are high- performance computing environment. Given the Census confidential microdata in this project, any replication of this work would also need to be conducted on the Census Bureau servers. The Census Bureau servers can scale up needed amounts of CPU and RAM required for the project. Needed SAN space to create intermediate files is 2 Terabytes. Runtime will be approximately 1 week for the main analysis excluding the estimates of the AKM estimates. The latter code takes about 3 weeks. Organization of replication folder: /code - all code used to implement the analysis is saved here /external_data - external data used in the analysis is saved here (these are datasets integrated with the confidential micro data) File paths are defined at the top of each program and will need to be updated *================================================================================================================* DATA INFRASTRUCTURE *================================================================================================================* Run the following code in the code/data_infrastructure folder in the following order 1. First create the AKM estimates using the code in /code/data_infrastructure/build_akm folder (see the details of the code sequenc in that folder). 2. Run 00.00.mk_sein_avewage.sas Description: Establishes LEHD employer frame (all SEINs in our 28 states) and calculates real wage quintiles Requires data: qwi/$st./uff_&st._b_d (QWI uff_b files for all states in analysis) ecf/$st./ecf_&st._sein (ECF SEIN files for all states in analysis) Requires program: macros/macro_cpi.sas Outputs: data/sein_avewage_allt SEIN-level file with time-invariant wage quintiles data/sein_avewage_yrqtr SEIN-year-qtr file with time-varing wages and employment (used to impute productivity) 3. Run 00.01.mk_sein_prod.sas Description: Merges LBD data to LEHD data, generates productivity measures and imputes where missing Requires data: inputs/brfirm_revYYYYv2015 (Annual LBD files with revenue data) inputs/ecf_sein_interleave (used to crosswalk LBD identifiers to LEHD data, these could be grabbed in 00.00 too if ever updated) data/sein_avewage_yrqtr Requires programs: Outputs: data/sein_prod_yr SEIN-year file with completed productivity measures 4. Run 00.02.mk_sein_prod.sas Description: creates time-invarient productivity quintiles Requires data: data/sein_prod_yr Outputs: data/sein_prod_allt SEIN-level file with time-invarient quintiles 5. Run 00.03.mk_sein_AKM.sas Description: creates time-invarient AKM quintiles Requires data: inputs/akm_fe_ann2 AKM firm effects data/sein_avewage_allt defines the set of SEINs in the analysis sample Outputs: data/sein_akm SEIN-level file with time-invarient AKM quintiles 6. Run 01.00.tabulate_flows.sas Description: Creates a PIK YEARj QUARTERj SEINj YEARk QUARTERk SEINk file for every main job separation and hire in the LEHD universe with information on origin (j) and destination (k) job. ***Note on data frame: The J2J data is more expansive sample frame than the SEIN-level files because we use the entire universe of job histories to determine origin-destination job flows Requires data: inputs/qwi_us_domtrans Early prototype of J2J microdata used for initial product research data/sein_avewage_allt data/sein_prod_allt data/sein_prod_year data/sein_akm Outputs: data/ee_yrqtr Main J2J analysis file 7. Run 02.01.njf_denominator.sas Description: Creates the denominators for the J2J rates: all dominant jobs in private sector firms in our 28 states Requires data: inputs/qwi_us_dom All dominant jobs in US from early J2J prototype data/sein_avewage_allt data/sein_prod_allt data/sein_akm Outputs: data/domjobs_private_byAKM (within-industry rank/quintiles) data/domjobs_private_byAKMallind (AKM rank across all industries) data/domjobs_private_bywageti (within-industry rank/quintiles) data/domjobs_private_bywageallind (wage rank across all industries) data/domjobs_private_byprodti (productivity rank is always within 4-digit NAICS) 8. Run create_analysis_data.sas Description: This file uses the intermediate files produced above to create the national quarterly panel used in the analysis Requires data: inputs/qwi_us_dom inputs/brfirm_rev1997v2015 data/ee_yrqtr data/sein_akm data/sein_avewage_allt data/sein_prod_allt data/sein_prod_yr data/sein_avewage_yrqtr Outputs: data/decomposition_`type'_ladder for type={prod,akm,akmallind,wage} (national quarterly panel used in main analysis) 9. Run clean_external_data.do Description: This file cleans the external data 10. Run organize_statistics.do Description: This file cleans the national quarterly panel, limiting to the set of correctly rounded statistics to be released out of the Census environment **Recreating the intermediate data files from the from the top of the code stream will generate new data snapshots from the LEHD production server and you will not achieve perfect data replication although effects should be marginal. *================================================================================================================* ANALYSIS *================================================================================================================* Run the Stata program produce_figures_and_tables.do in the code/analysis folder DETAILED DESCRIPTION OF EACH TABLE/FIGURE IN PAPER Table 1. Differential Net Job Flows Over the Cycle file name: unemp_diff_net_flows.tex source programs: 01.00.njf_prodti_hl.sas, 01.02.njf_wageti_hl.sas, 01.03.njf_akmti_hl.sas, produce_figures_and_tables.do Table 2. Productivity Growth from Job Flows Over the Cycle file name: unemp_prod_growth.tex source programs: createdata.sas, organize_statistics.do, clean_external_data.do, produce_figures_and_tables.do Figure 1. Aggregate Productivity Growth from Alternative Sources file name: aggprod_external.pdf source programs: createdata.sas, organize_statistics.do, clean_external_data.do, produce_figures_and_tables.do Figure 2. Gross Poaching and Nonemployment Flows by Firm Productivity file name: (a) njf_prodti_high.pdf and (b) njf_prodti_low.pdf source programs: 01.00.njf_prodti_hl.sas, produce_figures_and_tables.do Figure 3. Changes in Percent of Employment at High-Productivity Firms file name: (a) theta_firstdiff.pdf and (b) theta_pne source programs: createdata.sas, organize_statistics.do, clean_external_data.do, produce_figures_and_tables.do Figure 4. Decomposition of Growth in Productivity Over the Cycle file name: (a) prod_pne.pdf and (b) prod_pne_combined.pdf source programs: createdata.sas, organize_statistics.do, clean_external_data.do, produce_figures_and_tables.do Figure 5. Robustness of Ranking Firms Using Earnings-Based Measures of Firm Performance file name: (a) wages_pne_akm_jladderakm.pdf and (b) wages_pne_akm_jladderwage.pdf source programs: createdata.sas, organize_statistics.do, clean_external_data.do, produce_figures_and_tables.do Figure 6. Earnings Growth from Worker Reallocation up the Firm Productivity Ladder file name: (a) wages_pne.pdf and (b) wages_pne_akm.pdf source programs: createdata.sas, organize_statistics.do, clean_external_data.do, produce_figures_and_tables.do All tables and figures in that appear in the appendix are also produced by produce_figures_and_tables.do