This file contains information on data and codes needed to replicate the results in "Production Network Structure Service Share and Aggregate Volatility" Miranda-Pinto (2020) If you have any query please email me at j.mirandapinto@uq.edu.au The working directories must be changed accordingly All errors are mine The softwares needed are Matlab, Excel, and Stata Below you will find the data and codes to generate the tables and figures of the paper as well as the original data and codes used to generate the final data used Expected computation time: Running the main codes (not all the codes that generated the datasets) takes less than 20 minutes The most time demanding part is the solution of the model (could take from 5 to 40 minutes depending on the number of simulations) *************Cross-county facts in sections 2 and 4 *Data _data_panel_95_11_march_2020.xlsx and data_panel_95_11_tot_march_2020.xlsx This excel contains the final dataset used in tables 2-3 and 10-15 of the paper. _pwt90.xlsx Original data on countries GDP growth from Penn World Table, version 9.0 _imf_data.xlsx Contains the IMF data on countries GDP per-capita PPP in US international dollars _master_oecd_io_dom1.xlsx and master1.xlsx Original OECD data on countries domestic (master_oecd_io_dom1.xlsx) and total, domestic and imported intermediates, (master1.xlsx ) input-output tables *Codes to generate figures, regressions, tables _Figure1.m Creates Figure 1 of the paper _Figure2_Table1.do This code generates Table 1 and Figure 2 _data_regressions.do It runs the cross-country regressions using domestic network measures to creates tables 2, 3, 10, 11 _data_regressions_tot.do It runs the cross-country regressions using total network measures to create tables 12-15 *Codes to build final datasets _gdp_growth.m Calculates countries GDP growth volatility for the periods 1970-1995, 1996-2005, 2006-2014 using Penn World Table, version 9.0 _dom_OECD_IO_march2020.m, tot_OECD_IO_march2020.m, dom_OECD_OUTPUT_march2020.m, dom_OECD_VA_march2020.m, dom_OECD_CONS_march2020.m These codes read the original OECD input output tables and generate matlab data matrices for different years to be used by the next scripts to generate production network measures and sectoral shares (output, VA, consumption) _OECD_IO_1995_2011_dom_network_march2020.m and OECD_IO_1995_2011_tot_network_march2020.m These code uses the OECD input-output data above and generate de production network measures (domestic and total, respectively) in data_panel_95_11_march_2020.xlsx and data_panel_95_11_tot_march_2020.xlsx,respectively *************Cross-country sectoral facts in section 4 *Data _diversif_dom_officials_3periods.xlsx Final data on sectoral cross-country from OECD to be used in tables 5 and 6 *Codes to generate regression tables _diversif_int_inputs_dom_march2020.do Uses database diversif_dom_officials_3periods.xlsx to generate regression results in tables 5 and 6 *Codes to build final data _sectoral_divers_OECD_IO_dom_march20.m Loads OECD sectoral data and generates the database diversif_dom_officials_3periods.xlsx *************Estimation of elasticities *Data _data_for_estimation.dta This file contains the final data to estimate sectoral elasticities. Details on how is generated are below (preparing_data.do) *Codes to generate regression tables _estimation_elasticities.do This code estimates elasticities of substitution (tables 4 and 16) for all sectors and for service and non-service sectors *Codes that build the final data used _BEA.zip This file has original BEA data for estimation of elasticities _BEA_IO_PRICES_1997_2018_USA.m This script loads the BEA input-output data and generates the database All_T.xlsx _All_T.xlsx Contains US sectoral data on input shares and input prices from BEA _preparing_data.do This code prepares BEA data and militaty spending instruments for estimation of elasticities _iv_instrument_april2020.m It creates the military spending instruments _FDEFX_military_spending.xls Military spending data from FRED (Federal Government: National Defense Consumption Expenditures and Gross Investment, Billions of Dollars, Quarterly, Seasonally Adjusted Annual Rate) *************Model simulated regressions *Code to solve model _density_volatility_model_apr20.m This code solves the model for different values of elasticities and sectoral volatility. Note that the model is highly non-linear and, given elasticities, not any steady state value of productivity ensures market clearing and positive prices. Lines 32-35 of the code provide values of sectoral productivities ensure market clearing and positive prices. As we are interested in growth rates, the level of productivity is irrelevant. What matters is the growth rate of sectoral productivities and sectoral shocks' volatility The code generates simulated in modelseries_april20.xlsx. This file was then then renamed depending on the calibration. For example, modelseries_april20_epsq1_epsq156_samesig.xlsx assumes epsq =1 in non services, epsq=1.56 in services and same sectoral volatility (column 2 of table 4). _prices_revision.m This script defines the system of equations to solve for sectoral prices (Proposition 1) *Data output to estimate model implied regressions _modelseries_april20_epsq1_epsq156_samesig.xlsx These data correspond to table 7 column 2 (epsq =1 in non services, epsq=1.56 in services and same sectoral volatility) _modelseries_april20_epsq1_samesig.xlsx These data correspond to table 7 column 3 (epsq =1 in non services and services and same sectoral volatility) _modelseries_april20_epsq1_epsq156_difsig.xlsx These data correspond to table 7 column 4 (epsq =1 in non services epsq=1.56 in services and different sectoral volatility) *Code to estimate model implied regressions _model_regressions_revision.do This code generates the results in table 7 of the paper