Misallocation and Intersectoral Linkages Replication codes Sophie Osotimehin and Latchezar Popov 2022 The codes allow replicating all the tables and figures of the paper. The codes are separated in two folders: “markups” and “model”. The markups code must be run before running the model code. Software used: Matlab 2021a, Stata/IC 15.1 Operating system: Windows 10 Time to run: the code that produces the baseline results takes 40 min to run (section 1 of main_io_frictions.m) A. Markups The code in the “markups” folder generates the data used to calibrate the model. To generate the data, first create two subfolders named “output” and ‘figures” in the “markups” folder. Then, run the main file: main_markups.do (Stata) Description of auxiliary files make_deprate_BEA.do Computes US industry depreciation rates from BEA data make_deprate_KLEMS.do Computes country-industry depreciation rate from KLEMS data make_pcm_wiod.do Computes price cost margins using WIOD data make_pmr.do Imports product market regulation data statdes_pcm_wiod.do Produces Figure 2, C1, C2, C3, C4, C6 and C7 B. Model The code in the “model” folder solves the model and computes the TFP gain of removing markups and labor distortions. To generate the results, first create two subfolders named “output” and “figures” in the “model” folder. Note that the “model” folder and the “markups” folder must be in the same folder. Then, run sequentially the main files: 1. Main_iofrictions.m (Matlab) 2. Main_figures_tables.do (Stata) Description of the auxiliary files 1. Auxiliary files for Main_iofrictions tfpgain.m Produces results of Table 1,Table C6, C7, C9 tfpgain_labor.m Produces results of Table 2, Table C8 tfpgain_contrib.m Produces results of Table 3 tfpgain_sector.m Produces results of Figure 4 tfpgain_norecalib_approx.m Produces results of Figure 5, 6 and 7 tfpgain_jones.m Produces results of Table C3 tfpgain_simul.m Produces results of Table C2 tfpgain_chi.m Produces results of Table C10 tfpgain_chi_labor.m Produces results of Table C11 tfpgain_highel.m Produces results of Figure 3.c tfpgain_highel_rho.m Produces results of Figure 3.d tfpgain_ruane.m Produces results of Table C6 spec_baseline, spec_chi, etc. Selects dataset & options, and sets filenames compute_tfpgain.m, compute_tfpgain_labor.m, Subfiles of the corresponding tfpgain.m etc. save_tfpgain.m, etc. Subfiles of the corresponding tfpgain.m calibration_markups.m Function that calibrates the model with markups; used in compute_tfpgain.m approx_gap.m Function that computes the ratio of the approximated to exact TFP gain for a given mean distortion, used in tfpgain_norecalib_approx.m datawork_med.m Function that imports WIOD data and computes the final use and intermediate input shares of each sector; used in compute_tfpgain.m eqbm.m Function that computes the equilibrium for arbitrary distortions; used in compute_tfpgain_labor.m eqbm_markups.m. Function that computes the equilibrium for all-input distortions (markups); used in compute_tfpgain.m eqbm_jones.m Subfile of tfpgain_jones.m importdata_med.m Subfile of tfpgain.m 2. Auxiliary files for main_figures_tables These code files rearrange the results produced by the matlab code. display_param.do Program that produces Figure C5 and display results of Table C4 and C5 display_results.do Program that produces Figures 3a and 3b and display results of Table 1, Table C6, C7, C8, and C9 make_fig_highel.do Script that produces Figures 3c & 3d make_fig_sector.do Script that produces Figure 4 make_tab_ruane.do Program that displays results of the last column of Table C6 display_results_chi.do Program that displays results of Table C10 and C11