Replication package 7752 · dataverse · 2023 · open the deposit

How the code gets from data to results

Replication Data for: "The Supply-Side Effects of Monetary Policy"

Code for: The Supply-Side Effects of Monetary Policy Journal of Political Economy 2024

14
scripts
25
input files
12
file hand-offs
39
merges
67
sample steps
23
estimations

1 · Data in — files the code reads and no script of the package writes

  • data/Compustat/20220329_TotalQ.csv CSV
    Replication_Code_estimate_quarterly_markups.do:58
    Replication_Code_estimate_quarterly_markups.do, line 58 import delimited using "data/Compustat/20220329_TotalQ.csv", clear
  • data/Compustat/20220401_Compustat_quarterly.csv CSV
    Replication_Code_estimate_quarterly_markups.do:22
    Replication_Code_estimate_quarterly_markups.do, line 22 import delimited using "data/Compustat/20220401_Compustat_quarterly.csv", clear
Other input files 23 files
  • data/Gorodnichenko_Weber_2016/Gorodnichenko_Weber.xlsx Excel · read by 2 scripts
    Replication_Code_create_quarterly_dataset.do:68
    Replication_Code_create_quarterly_dataset.do, line 68 import excel "data/Gorodnichenko_Weber_2016/Gorodnichenko_Weber.xlsx", sheet("Sheet2") firstrow clear
  • data/markup_estimates/aggregate_markup_mu_li_annual Stata · read by 2 scripts
    Replication_Code_TFP_local_projections.do:20
    Replication_Code_TFP_local_projections.do, line 20 merge m:1 year using "data/markup_estimates/aggregate_markup_mu_li_annual"
  • data/markup_estimates/FRED/quarterly_tfp.xlsx Excel · read by 2 scripts
    Replication_Code_TFP_local_projections.do:12
    Replication_Code_TFP_local_projections.do, line 12 import excel "data/markup_estimates/FRED/quarterly_tfp.xlsx", sheet("quarterly") firstrow clear
  • data/Bauer_Swanson_2022/FOMC_Bauer_Swanson.xlsx Excel
    Replication_Code_create_quarterly_dataset.do:153
    Replication_Code_create_quarterly_dataset.do, line 153 import excel "data/Bauer_Swanson_2022/FOMC_Bauer_Swanson.xlsx", sheet("final_excl_911") firstrow clear
  • data/BEA/DetailNonres_rate.xlsx Excel
    Replication_Code_estimate_quarterly_markups.do:223
    Replication_Code_estimate_quarterly_markups.do, line 223 import excel using "data/BEA/DetailNonres_rate.xlsx", sheet("compiled_clean") firstrow clear
  • data/BLS_Productivity/BLS_annual_prod_clean Stata
    Replication_Code_sector_productivity_projections.do:65
    Replication_Code_sector_productivity_projections.do, line 65 use "data/BLS_Productivity/BLS_annual_prod_clean", clear
  • data/Census_Mfg_Concentration/2002_31-33_Con_Ratios_US/ECN_2002_US_31SR12_with_ann.csv CSV
    Replication_Code_sector_productivity_projections.do:48
    Replication_Code_sector_productivity_projections.do, line 48 import delimited using "data/Census_Mfg_Concentration/2002_31-33_Con_Ratios_US/ECN_2002_US_31SR12_with_ann.csv", clear varnames(1) rowrange(3:)
  • data/Census_Mfg_Concentration/2007_31-33_Con_Ratios_US/ECN_2007_US_31SR12_with_ann.csv CSV
    Replication_Code_sector_productivity_projections.do:33
    Replication_Code_sector_productivity_projections.do, line 33 import delimited using "data/Census_Mfg_Concentration/2007_31-33_Con_Ratios_US/ECN_2007_US_31SR12_with_ann.csv", clear varnames(1) rowrange(3:)
15 more
  • data/crosswalks/NAICS4_BEA.xlsx Excel
    Replication_Code_estimate_quarterly_markups.do:187
    Replication_Code_estimate_quarterly_markups.do, line 187 import excel using "data/crosswalks/NAICS4_BEA.xlsx", sheet("naics_bea_final_values") clear firstrow
  • data/Damadoran_ERP/histimpl.xls Excel
    Replication_Code_estimate_quarterly_markups.do:312
    Replication_Code_estimate_quarterly_markups.do, line 312 import excel "data/Damadoran_ERP/histimpl.xls", sheet("Historical Impl Premiums") cellrange("A7") firstrow clear
  • data/FRED/10Yrates_quarterly.csv CSV
    Replication_Code_estimate_quarterly_markups.do:90
    Replication_Code_estimate_quarterly_markups.do, line 90 import delimited using "data/FRED/10Yrates_quarterly.csv", clear
  • data/FRED/CPIAUCSL.csv CSV
    Replication_Code_create_quarterly_dataset.do:28
    Replication_Code_create_quarterly_dataset.do, line 28 import delimited "data/FRED/CPIAUCSL.csv", clear
  • data/FRED/deflators.csv CSV
    Replication_Code_estimate_quarterly_markups.do:87
    Replication_Code_estimate_quarterly_markups.do, line 87 import delimited using "data/FRED/deflators.csv", clear
  • data/FRED/INDPRO.csv CSV
    Replication_Code_create_quarterly_dataset.do:14
    Replication_Code_create_quarterly_dataset.do, line 14 import delimited "data/FRED/INDPRO.csv", clear
  • data/GZ_ExcessBond/ebp_csv.csv CSV
    Replication_Code_create_quarterly_dataset.do:43
    Replication_Code_create_quarterly_dataset.do, line 43 import delimited "data/GZ_ExcessBond/ebp_csv.csv", clear
  • data/Miranda_Agrippino_Ricco_2017/ff4_instruments_shared.xlsx Excel
    Replication_Code_create_quarterly_dataset.do:91
    Replication_Code_create_quarterly_dataset.do, line 91 import excel "data/Miranda_Agrippino_Ricco_2017/ff4_instruments_shared.xlsx", firstrow clear
  • data/Miranda_Agrippino_Ricco_2017/MPS_IV.xlsx Excel
    Replication_Code_create_quarterly_dataset.do:117
    Replication_Code_create_quarterly_dataset.do, line 117 import excel "data/Miranda_Agrippino_Ricco_2017/MPS_IV.xlsx", cellrange(A2) firstrow clear
  • data/Treasury_Yield/feds200628.csv CSV
    Replication_Code_create_quarterly_dataset.do:54
    Replication_Code_create_quarterly_dataset.do, line 54 import delimited "data/Treasury_Yield/feds200628.csv", clear rowrange(11:) varnames(10)
  • ForecastRelease.xlsx Excel
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:64
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 64 import excel using "ForecastRelease.xlsx", firstrow case(lower) clear;
  • menu_cost_wage_paths/CES_matchKimball_menu2_invfrisch5_shocksize4/dlogw_24.npy NumPy
    Replication_Code_menu_costs_CES.py:789
    Replication_Code_menu_costs_CES.py, line 789 dlogw_path_new = np.load('menu_cost_wage_paths/CES_matchKimball_menu2_invfrisch5_shocksize4/dlogw_24.npy')
  • RRimport.xlsx Excel
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:41
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 41 import excel using "RRimport.xlsx", firstrow case(lower);
  • RRshock_txt/RRshock_Quarterly_1.txt text
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:257
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 257 import delimited "RRshock_txt/RRshock_Quarterly_1.txt", clear;
  • RRshock_txt/RRshock_Quarterly_2.txt text
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:269
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 269 import delimited "RRshock_txt/RRshock_Quarterly_2.txt", clear;

Plus 4 reads whose file name is built at run time (a macro or loop variable) and cannot be named.

2 · The file pipeline — which script writes which file that a later script reads

14 scripts, in data lineage — a script that writes a file comes before the scripts that read it; 12 hand-offs through 13 intermediate files; 4 files written and never read back (outputs). 2 hand-offs run against this order (dashed), so the order is low-confidence: the scripts share a file both ways, or the order is not the one stated.

Replication_Code_create_quarterly_dataset.do → Replication_Code_TFP_local_projections.do: quarterly_aggregates_cleanReplication_Code_data_Monetary_shocks_RR_monetary_shock_update.do → Replication_Code_TFP_local_projections.do: RR_monetary_shock_quarterlyReplication_Code_aggregate_quarterly_markups.do → Replication_Code_add_markup_covariances.py: Compustat_clean_with_lags.dtaReplication_Code_estimate_quarterly_markups.do → Replication_Code_aggregate_quarterly_markups.do: Compustat_cleanReplication_Code_menu_costs_Kimball.py → Replication_Code_compare_menucost_IRFs.py: final_res.npyReplication_Code_aggregate_quarterly_markups.do → Replication_Code_create_quarterly_dataset.do: quarterly_mu_barReplication_Code_data_Monetary_shocks_RR_monetary_shock_update.do → Replication_Code_create_quarterly_dataset.do: RR_monetary_shock_quarterlyReplication_Code_add_markup_covariances.py → Replication_Code_firm_level_local_projections.do: aggregated_`mu'_quarter, aggregated_`mu'_quarter`ind_var', aggregated_sales_listReplication_Code_create_quarterly_dataset.do → Replication_Code_firm_level_local_projections.do: quarterly_aggregates_cleanReplication_Code_menu_costs_Kimball.py → Replication_Code_menu_costs_CES.py: cov_breakdown_25.npy, cov_breakdown_8.npy, demand_curve_extended.dta, final_res.npyReplication_Code_menu_costs_CES.py → Replication_Code_menu_costs_Kimball.py: demand_curve_extended.dtaReplication_Code_data_Monetary_shocks_RR_monetary_shock_update.do → Replication_Code_sector_productivity_projections.do: RR_monetary_shock_annual Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do · reads 4 input files · 4 estimations 1. Replication_Code_data_Monetary_shocks_RR_mo… 4 est.Replication_Code_estimate_quarterly_markups.do · reads 7 input files · 1 estimation 2. Replication_Code_estimate_quarterly_markups… 1 est.Replication_Code_aggregate_quarterly_markups.do 3. Replication_Code_aggregate_quarterly_markup… Replication_Code_add_markup_covariances.py 4. Replication_Code_add_markup_covariances.py Replication_Code_create_quarterly_dataset.do · reads 10 input files · 12 estimations 5. Replication_Code_create_quarterly_dataset.do 12 est.Replication_Code_firm_level_local_projections.do · 3 estimations 6. Replication_Code_firm_level_local_projectio… 3 est.Replication_Code_klenow_willis.py 7. Replication_Code_klenow_willis.py Replication_Code_sector_productivity_projections.do · reads 4 input files · 2 estimations 8. Replication_Code_sector_productivity_projec… 2 est.Replication_Code_statics_calibrations.py 9. Replication_Code_statics_calibrations.py Replication_Code_support_functions.py 10. Replication_Code_support_functions.py Replication_Code_TFP_local_projections.do · reads 2 input files · 1 estimation 11. Replication_Code_TFP_local_projections.do 1 est.Replication_Code_compare_menucost_IRFs.py 12. Replication_Code_compare_menucost_IRFs.py Replication_Code_menu_costs_CES.py · reads 1 input files 13. Replication_Code_menu_costs_CES.py Replication_Code_menu_costs_Kimball.py 14. Replication_Code_menu_costs_Kimball.py
  1. 1.Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do reads 4 input files · 10 merges · 4 estimations
    writes RR_monetary_shock_annual → read by Replication_Code_sector_productivity_projections.do
    writes RR_monetary_shock_quarterly → read by Replication_Code_create_quarterly_dataset.do, Replication_Code_TFP_local_projections.do
    writes (not read again): RR_monetary_shock_monthly.dta
  2. 2.Replication_Code_estimate_quarterly_markups.do reads 7 input files · 8 merges · 1 estimation
    writes Compustat_clean → read by Replication_Code_aggregate_quarterly_markups.do
  3. 3.Replication_Code_aggregate_quarterly_markups.do 1 merge ·
    reads what Replication_Code_estimate_quarterly_markups.do wrote
    writes Compustat_clean_with_lags.dta → read by Replication_Code_add_markup_covariances.py
    writes quarterly_mu_bar → read by Replication_Code_create_quarterly_dataset.do
    writes (not read again): aggregate_quarterly_mu
  4. 4.Replication_Code_add_markup_covariances.py 1 merge ·
    reads what Replication_Code_aggregate_quarterly_markups.do wrote
    writes aggregated_`mu'_quarter → read by Replication_Code_firm_level_local_projections.do
    writes aggregated_`mu'_quarter`ind_var' → read by Replication_Code_firm_level_local_projections.do
    writes aggregated_sales_list → read by Replication_Code_firm_level_local_projections.do
  5. 5.Replication_Code_create_quarterly_dataset.do reads 10 input files · 11 merges · 12 estimations
    reads what Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, Replication_Code_aggregate_quarterly_markups.do wrote
    writes quarterly_aggregates_clean → read by Replication_Code_firm_level_local_projections.do, Replication_Code_TFP_local_projections.do
  6. 6.Replication_Code_firm_level_local_projections.do 3 merges · 3 estimations
    reads what Replication_Code_add_markup_covariances.py, Replication_Code_create_quarterly_dataset.do wrote
  7. 7.Replication_Code_klenow_willis.py
  8. 8.Replication_Code_sector_productivity_projections.do reads 4 input files · 3 merges · 2 estimations
    reads what Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do wrote
    writes (not read again): concentration_ratios_2007
  9. 9.Replication_Code_statics_calibrations.py
  10. 10.Replication_Code_support_functions.py
  11. 11.Replication_Code_TFP_local_projections.do reads 2 input files · 3 merges · 1 estimation
    reads what Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, Replication_Code_create_quarterly_dataset.do wrote
    writes (not read again): quarterly_tfp_clean
  12. 12.Replication_Code_compare_menucost_IRFs.py
    reads what Replication_Code_menu_costs_Kimball.py wrote
  13. 13.Replication_Code_menu_costs_CES.py reads 1 input file ·
    reads what Replication_Code_menu_costs_Kimball.py wrote
    writes demand_curve_extended.dta → read by Replication_Code_menu_costs_Kimball.py
  14. 14.Replication_Code_menu_costs_Kimball.py
    reads what Replication_Code_menu_costs_CES.py wrote
    writes cov_breakdown_25.npy → read by Replication_Code_menu_costs_CES.py
    writes cov_breakdown_8.npy → read by Replication_Code_menu_costs_CES.py
    writes demand_curve_extended.dta → read by Replication_Code_menu_costs_CES.py
    writes final_res.npy → read by Replication_Code_compare_menucost_IRFs.py, Replication_Code_menu_costs_CES.py

3 · Merges — 39 joins, 29 followed by a check of the merge result; 1 appends

JoinsHowOn keysCheck that followsWhere
(data in memory) ← ``capvar'`sheet'' merge 1:1 fc_quarter release_date none
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:140
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 140 merge 1:1 fc_quarter release_date using ``capvar'`sheet'', nogenerate update;
rrshock_quarterly_2 ← rrshock_fred1 merge m:m fc_quarter none
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:279
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 279 merge m:m fc_quarter using `rrshock_fred1', nogenerate;
rrshock_quarterly_2 ← philforecasts merge 1:1 fc_quarter release_date none
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:333
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 333 merge 1:1 fc_quarter release_date using `philforecasts', generate(philfredmatch);
rrshock_quarterly_2 ← rrmonshock merge 1:1 meeting_month none
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:398
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 398 merge 1:1 meeting_month using `rrmonshock', generate(meeting_match) keepusing(meeting_month mtgdate meeting_date) ;
rrshock_quarterly_2 ← rrmonshock merge 1:1 meeting_month none
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:406
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 406 merge 1:1 meeting_month using `rrmonshock', generate(meeting_match) keepusing(meeting_month mtgdate meeting_date) update replace;
meetingmatches ← additionalreleases merge m:1 release_date none
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:427
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 427 merge m:1 release_date using `additionalreleases', nogenerate keepusing(mtgdate meeting_date);
(data in memory) ← meetingmatches merge m:1 release_date none
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:428
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 428 merge m:1 release_date using `meetingmatches', nogenerate keepusing(mtgdate meeting_date) update;
meetingmatches ← rrmonshock merge 1:1 mtgdate none
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:469
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 469 merge 1:1 mtgdate using `rrmonshock', nogenerate;
(data in memory) ← rrshocks merge m:1 date none
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:583
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 583 qui merge m:1 date using `rrshocks', keepusing(resid resid_romer resid_full) nogenerate;
compustat_clean ← totalq_clean merge m:1 gvkey fyearq drop if _merge==2
Replication_Code_estimate_quarterly_markups.do:63
Replication_Code_estimate_quarterly_markups.do, line 63 merge m:1 gvkey fyearq using "data/Compustat/TotalQ_clean"
10yrates_quarterly ← deflators merge 1:1 date drop _merge
Replication_Code_estimate_quarterly_markups.do:93
Replication_Code_estimate_quarterly_markups.do, line 93 merge 1:1 date using "data/FRED/deflators"
compustat_clean ← quarterly_allfred_clean merge m:1 quarter drop if _merge==2
Replication_Code_estimate_quarterly_markups.do:121
Replication_Code_estimate_quarterly_markups.do, line 121 merge m:1 quarter using "data/FRED/quarterly_allFRED_clean"

4 · The sample — 55 keep/drop steps, 12 variables winsorized or trimmed

Filters, by kind
industry screens ×1
  • drop if naics3==491
    Replication_Code_estimate_quarterly_markups.do:216
    Replication_Code_estimate_quarterly_markups.do, line 216 drop if naics3==491
time period ×6
  • drop if release_date==19680206
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:153
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 153 drop if release_date==19680206;
  • drop if release_date>20080000
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:244
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 244 qui drop if release_date>20080000;
  • drop if year(release_date)<1978
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:390
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 390 qui drop if year(release_date)<1978; /* these are already matched in part 2b */
  • drop if year < 1973
    Replication_Code_create_quarterly_dataset.do:224
    Replication_Code_create_quarterly_dataset.do, line 224 drop if year < 1973
  • drop if year > 2019
    Replication_Code_create_quarterly_dataset.do:225
    Replication_Code_create_quarterly_dataset.do, line 225 drop if year > 2019
  • drop if year >= 2008
    Replication_Code_TFP_local_projections.do:42
    Replication_Code_TFP_local_projections.do, line 42 drop if year >= 2008
value ranges ×8
  • keep if fc_horizon>=-1 & fc_horizon<=2
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:459
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 459 qui keep if fc_horizon>=-1 & fc_horizon<=2;
  • keep if firms_ordered['cumul_share'] <= c_share
    Replication_Code_statics_calibrations.py:162
    Replication_Code_statics_calibrations.py, line 162 subset_small_firms = firms_ordered.loc[firms_ordered['cumul_share'] <= c_share]
  • keep if realized_passthough_df['a_old_ind']==a
    Replication_Code_menu_costs_CES.py:453
    Replication_Code_menu_costs_CES.py, line 453 realized_passthough_df_a = realized_passthough_df.loc[realized_passthough_df['a_old_ind']==a]
  • keep if price_change_density > 0
    Replication_Code_menu_costs_CES.py:662
    Replication_Code_menu_costs_CES.py, line 662 price_change_density = price_change_density[price_change_density > 0].reset_index()
  • keep if price_change_density['index']!=0
    Replication_Code_menu_costs_CES.py:663
    Replication_Code_menu_costs_CES.py, line 663 price_change_density_nonzero = price_change_density.loc[price_change_density['index']!=0]
  • keep if realized_passthough_df['a_old_ind']==a
    Replication_Code_menu_costs_Kimball.py:450
    Replication_Code_menu_costs_Kimball.py, line 450 realized_passthough_df_a = realized_passthough_df.loc[realized_passthough_df['a_old_ind']==a]
  • keep if price_change_density > 0
    Replication_Code_menu_costs_Kimball.py:760
    Replication_Code_menu_costs_Kimball.py, line 760 price_change_density = price_change_density[price_change_density > 0].reset_index()
  • keep if price_change_density['index']!=0
    Replication_Code_menu_costs_Kimball.py:761
    Replication_Code_menu_costs_Kimball.py, line 761 price_change_density_nonzero = price_change_density.loc[price_change_density['index']!=0]
category values ×5
  • drop if concenfiid=="004"
    Replication_Code_sector_productivity_projections.do:35
    Replication_Code_sector_productivity_projections.do, line 35 drop if concenfiid=="004"
  • keep if naics_level==4
    Replication_Code_sector_productivity_projections.do:43
    Replication_Code_sector_productivity_projections.do, line 43 keep if naics_level==4
  • drop if concenfiid=="004"
    Replication_Code_sector_productivity_projections.do:50
    Replication_Code_sector_productivity_projections.do, line 50 drop if concenfiid=="004"
  • keep if naics_level==4
    Replication_Code_sector_productivity_projections.do:58
    Replication_Code_sector_productivity_projections.do, line 58 keep if naics_level==4
  • keep if display_level==3
    Replication_Code_sector_productivity_projections.do:78
    Replication_Code_sector_productivity_projections.do, line 78 keep if display_level==3
missing values ×18
  • drop if release_date==.
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:403
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 403 qui drop if release_date==.;
  • drop if release_date==.
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:422
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 422 qui drop if release_date==.;
  • drop if date==.
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:557
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 557 qui drop if date==.;
  • drop if fyearq==.
    Replication_Code_estimate_quarterly_markups.do:74
    Replication_Code_estimate_quarterly_markups.do, line 74 drop if fyearq==.
  • drop if gvkey==.
    Replication_Code_estimate_quarterly_markups.do:75
    Replication_Code_estimate_quarterly_markups.do, line 75 drop if gvkey==.
  • drop if datacqtr==""
    Replication_Code_estimate_quarterly_markups.do:76
    Replication_Code_estimate_quarterly_markups.do, line 76 drop if datacqtr==""
  • drop if naics3 == .
    Replication_Code_estimate_quarterly_markups.do:160
    Replication_Code_estimate_quarterly_markups.do, line 160 drop if naics3 == .
  • drop if sic==.
    Replication_Code_estimate_quarterly_markups.do:167
    Replication_Code_estimate_quarterly_markups.do, line 167 drop if sic==.
  • first 8 of 18
drops after a merge (_merge) ×17
  • drop if _merge==2
    Replication_Code_estimate_quarterly_markups.do:64
    Replication_Code_estimate_quarterly_markups.do, line 64 drop if _merge==2
  • drop if _merge==2
    Replication_Code_estimate_quarterly_markups.do:122
    Replication_Code_estimate_quarterly_markups.do, line 122 drop if _merge==2
  • drop if _merge==2
    Replication_Code_estimate_quarterly_markups.do:207
    Replication_Code_estimate_quarterly_markups.do, line 207 drop if _merge==2
  • drop if _merge==2
    Replication_Code_estimate_quarterly_markups.do:230
    Replication_Code_estimate_quarterly_markups.do, line 230 drop if _merge==2
  • drop if _merge==2
    Replication_Code_estimate_quarterly_markups.do:325
    Replication_Code_estimate_quarterly_markups.do, line 325 drop if _merge==2
  • drop if _merge==2
    Replication_Code_aggregate_quarterly_markups.do:101
    Replication_Code_aggregate_quarterly_markups.do, line 101 drop if _merge==2
  • drop if _merge==2
    Replication_Code_create_quarterly_dataset.do:188
    Replication_Code_create_quarterly_dataset.do, line 188 drop if _merge==2
  • drop if _merge==2
    Replication_Code_create_quarterly_dataset.do:191
    Replication_Code_create_quarterly_dataset.do, line 191 drop if _merge==2
  • first 8 of 17
Outliers
winsorize at 1/99 within quarter · 7 variables
mu_li mu_cfg1_dam mu_cfg2_dam mu_li_ms4 mu_cfg1_ms4 mu_cfg2_ms4 sale_ms4_win
Replication_Code_estimate_quarterly_markups.do:302
Replication_Code_estimate_quarterly_markups.do, line 302 winsor2 mu_li, replace cuts(1 99) by(quarter)
Replication_Code_estimate_quarterly_markups.do:354
Replication_Code_estimate_quarterly_markups.do, line 354 winsor2 `X', replace cuts(1 99) by(quarter)
Replication_Code_estimate_quarterly_markups.do:377
Replication_Code_estimate_quarterly_markups.do, line 377 winsor2 mu_li_ms4, replace cuts(1 99) by(quarter)
Replication_Code_estimate_quarterly_markups.do:384
Replication_Code_estimate_quarterly_markups.do, line 384 winsor2 `X', replace cuts(1 99) by(quarter)
winsorize at 5/95 · 5 variables
cum0_prod_output_ratio cum1_prod_output_ratio cum2_prod_output_ratio cum3_prod_output_ratio cum4_prod_output_ratio
Replication_Code_sector_productivity_projections.do:89
Replication_Code_sector_productivity_projections.do, line 89 winsor2 cum`h'_prod_output_ratio, replace cuts(5 95)
Missing values
filled with a value ×24
  • exp_infl_10 → exp_infl_10pred
    Replication_Code_estimate_quarterly_markups.do:110
    Replication_Code_estimate_quarterly_markups.do, line 110 replace exp_infl_10 = exp_infl_10pred if exp_infl_10==.
  • r10_real → r10 - exp_infl_10
    Replication_Code_estimate_quarterly_markups.do:111
    Replication_Code_estimate_quarterly_markups.do, line 111 replace r10_real = r10 - exp_infl_10 if r10_real==.
  • naics3 → naics3_mapped
    Replication_Code_estimate_quarterly_markups.do:176
    Replication_Code_estimate_quarterly_markups.do, line 176 replace naics3 = naics3_mapped if naics3==.
  • naics2 → naics2_mapped
    Replication_Code_estimate_quarterly_markups.do:177
    Replication_Code_estimate_quarterly_markups.do, line 177 replace naics2 = naics2_mapped if naics2==.
  • cap_with_intan → cap
    Replication_Code_estimate_quarterly_markups.do:342
    Replication_Code_estimate_quarterly_markups.do, line 342 replace cap_with_intan = cap if cap_with_intan==.
  • gnp → philgnp
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:354
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 354 replace gnp = philgnp if gnp==.;
dropped ×13
  • Replication_Code_aggregate_quarterly_markups.do:71
    Replication_Code_aggregate_quarterly_markups.do, line 71 drop if above_median_`mu'==.
  • Replication_Code_estimate_quarterly_markups.do:74
    Replication_Code_estimate_quarterly_markups.do, line 74 drop if fyearq==.
  • Replication_Code_estimate_quarterly_markups.do:75
    Replication_Code_estimate_quarterly_markups.do, line 75 drop if gvkey==.
  • Replication_Code_estimate_quarterly_markups.do:160
    Replication_Code_estimate_quarterly_markups.do, line 160 drop if naics3 == .
  • Replication_Code_estimate_quarterly_markups.do:167
    Replication_Code_estimate_quarterly_markups.do, line 167 drop if sic==.
  • Replication_Code_estimate_quarterly_markups.do:182
    Replication_Code_estimate_quarterly_markups.do, line 182 drop if sic==.
interpolated / carried forward ×5
  • Replication_Code_kimball_dynamics_Table6.py:251
    Replication_Code_kimball_dynamics_Table6.py, line 251 RHS = np.pad(RHS, (0, 2*periods), 'constant')
  • Replication_Code_kimball_dynamics_Table6.py:347
    Replication_Code_kimball_dynamics_Table6.py, line 347 RHS = np.pad(RHS, (0, 2*periods), 'constant')
  • Replication_Code_estimate_quarterly_markups.do:340
    Replication_Code_estimate_quarterly_markups.do, line 340 by gvkey: ipolate intanq quarter, generate(intanq_interp)
  • Replication_Code_kimball_dynamics.py:251
    Replication_Code_kimball_dynamics.py, line 251 RHS = np.pad(RHS, (0, 2*periods), 'constant')
  • Replication_Code_kimball_dynamics.py:347
    Replication_Code_kimball_dynamics.py, line 347 RHS = np.pad(RHS, (0, 2*periods), 'constant')
set to zero ×3
  • resid → 0
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:585
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 585 qui replace `var'=0 if `var'==.;
  • resid_romer → 0
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:585
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 585 qui replace `var'=0 if `var'==.;
  • resid_full → 0
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:585
    Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 585 qui replace `var'=0 if `var'==.;

5 · Key variables — what enters the models, and where the code builds it

Standard measures computed here: Cash Flow (Earnings + Depreciation) (cfatq
Replication_Code_estimate_quarterly_markups.do:286
Replication_Code_estimate_quarterly_markups.do, line 286 g cfatq = cfq/l.atq
), Cash Holdings (caq
Replication_Code_estimate_quarterly_markups.do:40
Replication_Code_estimate_quarterly_markups.do, line 40 g caq = cheq / atq
), Intangible Assets (intanatq
Replication_Code_estimate_quarterly_markups.do:298
Replication_Code_estimate_quarterly_markups.do, line 298 g intanatq = intanq/atq
), Log Total Assets (logatq
Replication_Code_estimate_quarterly_markups.do:244
Replication_Code_estimate_quarterly_markups.do, line 244 g logatq = log(atq)
), Operating Margin (li
Replication_Code_estimate_quarterly_markups.do:253
Replication_Code_estimate_quarterly_markups.do, line 253 g li = (oibdpq - dpq) / saleq
), R&D Intensity (xrdatq
Replication_Code_estimate_quarterly_markups.do:249
Replication_Code_estimate_quarterly_markups.do, line 249 g xrdatq = xrdq/atq
)
VariableUsed in models asBuilt by
u_structural outcome in 7, endogenous in 1
u_structural = uvar_T2Y (gen)
Replication_Code_create_quarterly_dataset.do:240
Replication_Code_create_quarterly_dataset.do, line 240 gen u_structural = uvar_T2Y
dtarg outcome in 4 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
uvar_T2Y outcome in 3 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
cum0_log_prod outcome in 2 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
exp_infl_10 outcome in 1
exp_infl_10 = r10 - r10_real (gen)
Replication_Code_estimate_quarterly_markups.do:98
Replication_Code_estimate_quarterly_markups.do, line 98 g exp_infl_10 = r10 - r10_real
exp_infl_10 = exp_infl_10pred (replace)
Replication_Code_estimate_quarterly_markups.do:110
Replication_Code_estimate_quarterly_markups.do, line 110 replace exp_infl_10 = exp_infl_10pred if exp_infl_10==.
uvar_ebp endogenous in 1 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
uvar_log_cpi_hp endogenous in 1 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
uvar_log_indpro_hp endogenous in 1 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
resid_full instrument in 1, regressor in 1
resid_full = predict(r) (predict)
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:537
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 537 qui predict resid_full, r;
vvar_ebp instrument in 1 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
vvar_log_cpi_hp instrument in 1 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
vvar_log_indpro_hp instrument in 1 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
oldtarg regressor in 4 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
grad0 regressor in 2 no statement builds it — a column of an input file, or made by a reshape/merge we do not trace
grad1 regressor in 2
grad1 = 3.5 (replace)
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:489
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 489 replace grad1 = 3.5 if release_date==mdy(8,12,1970);

6 · Models, by the table or figure they feed — 23 estimations, 1 traced into 1 exhibit

industry_prod_resid_full_2002.tex · 1 estimation → industry_prod_resid_full_2002.tex
CommandOutcomeRegressors Fixed effectsStandard errorsWhere
reghdfe
panel fe
cum0_log_prod pct`n_firm'_full cycle_pct`n_firm'_inter l(0/2).resid_full l(1/2).log_prod naics_code, year robust
Replication_Code_sector_productivity_projections.do:108
Replication_Code_sector_productivity_projections.do, line 108 reghdfe cum0_log_prod pct`n_firm'_full cycle_pct`n_firm'_inter L(0/2).`cycle_var' L(1/2).log_prod, absorb(naics_code year) vce(robust) as we read it (macros filled in / loop expanded): reghdfe cum0_log_prod pct`n_firm'_full cycle_pct`n_firm'_inter L(0/2).resid_full L(1/2).log_prod, absorb(naics_code year) vce(robust)
run 3× in a loop (n_firm=8; n_firm=20; n_firm=50)
written at Replication_Code_sector_productivity_projections.do:112
Estimations not traced to a table or figure · 22
CommandOutcomeRegressors Fixed effectsStandard errorsWhere
regress
ols
dtarg oldtarg `"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`regressors' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdpdefl_fcd`horizon' "' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdpdefl_fcd`horizon' "' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdpdefl_fcd`horizon' "' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdpdefl_fcd`horizon' "' +83 more — default
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:532
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 532 regress dtarg oldtarg `regressors' if year<=1996 & meeting_date!=mdy(10,6,1979) & (meeting_date<mdy(8,15,1972) | meeting_date>mdy(10,17,1972)); as we read it (macros filled in / loop expanded): regress dtarg oldtarg `"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`regressors' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdpdefl_fcd`horizon' "' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdp …
regress
ols
dtarg oldtarg `"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`regressors' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdpdefl_fcd`horizon' "' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdpdefl_fcd`horizon' "' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdpdefl_fcd`horizon' "' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdpdefl_fcd`horizon' "' +83 more — default
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:536
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 536 regress dtarg oldtarg `regressors'; as we read it (macros filled in / loop expanded): regress dtarg oldtarg `"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`"`regressors' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdpdefl_fcd`horizon' "' gdp`horizon' gdpdefl`horizon' gdp_fcd`horizon' gdp …
regress
ols
dtarg oldtarg gradm grad0 grad1 grad2 igrdm igrd0 igrd1 igrd2 graym gray0 gray1 +6 more — robust
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:542
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 542 regress dtarg oldtarg gradm grad0 grad1 grad2 igrdm igrd0 igrd1 igrd2 graym gray0 gray1 gray2 igrym igry0 igry1 igry2 grau0 if year<=1996 & meeting_date!=mdy(10,6,1979) & (meeting_date<mdy(8,15,1972) | meeting_date>mdy(10,17,1972)), r;
regress
ols
dtarg oldtarg gradm grad0 grad1 grad2 igrdm igrd0 igrd1 igrd2 graym gray0 gray1 +6 more — robust
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:545
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 545 regress dtarg oldtarg gradm grad0 grad1 grad2 igrdm igrd0 igrd1 igrd2 graym gray0 gray1 gray2 igrym igry0 igry1 igry2 grau0, r;
regress
ols
exp_infl_10 infl_*y — default
Replication_Code_estimate_quarterly_markups.do:108
Replication_Code_estimate_quarterly_markups.do, line 108 regress exp_infl_10 infl_*y
var
time series
— — default
Replication_Code_create_quarterly_dataset.do:236
Replication_Code_create_quarterly_dataset.do, line 236 var `var_list', lags(1/4) dfk small as we read it (macros filled in / loop expanded): var log_indpro_hp log_cpi_hp ebp T2Y, lags(1/4) dfk small
ivregress
iv
uvar_`v'
endogenous: u_structural
instruments: resid_full
— default
Replication_Code_create_quarterly_dataset.do:242
Replication_Code_create_quarterly_dataset.do, line 242 ivregress 2sls uvar_`v' (u_structural = resid_full)
run 3× in a loop (v=log_indpro_hp; v=log_cpi_hp; v=ebp)
ivregress
iv
uvar_T2Y
endogenous: uvar_log_indpro_hp
instruments: vvar_log_indpro_hp
— default
Replication_Code_create_quarterly_dataset.do:246
Replication_Code_create_quarterly_dataset.do, line 246 ivregress 2sls uvar_T2Y (uvar_log_indpro_hp = vvar_log_indpro_hp)
ivregress
iv
uvar_T2Y
endogenous: uvar_log_cpi_hp
instruments: vvar_log_cpi_hp
— default
Replication_Code_create_quarterly_dataset.do:247
Replication_Code_create_quarterly_dataset.do, line 247 ivregress 2sls uvar_T2Y (uvar_log_cpi_hp = vvar_log_cpi_hp)
ivregress
iv
uvar_T2Y
endogenous: uvar_ebp
instruments: vvar_ebp
— default
Replication_Code_create_quarterly_dataset.do:248
Replication_Code_create_quarterly_dataset.do, line 248 ivregress 2sls uvar_T2Y (uvar_ebp = vvar_ebp)
regress
ols
u_structural resid_full — default
Replication_Code_create_quarterly_dataset.do:252
Replication_Code_create_quarterly_dataset.do, line 252 qui regress u_structural resid_full
regress
ols
u_structural MPI_FF4 — default
Replication_Code_create_quarterly_dataset.do:254
Replication_Code_create_quarterly_dataset.do, line 254 qui regress u_structural MPI_FF4
regress
ols
u_structural GertlerKaradi — default
Replication_Code_create_quarterly_dataset.do:256
Replication_Code_create_quarterly_dataset.do, line 256 qui regress u_structural GertlerKaradi
regress
ols
u_structural FF4surprisesbyGSS — default
Replication_Code_create_quarterly_dataset.do:258
Replication_Code_create_quarterly_dataset.do, line 258 qui regress u_structural FF4surprisesbyGSS
regress
ols
u_structural tight_surprise — default
Replication_Code_create_quarterly_dataset.do:260
Replication_Code_create_quarterly_dataset.do, line 260 qui regress u_structural tight_surprise
regress
ols
u_structural wide_surprise — default
Replication_Code_create_quarterly_dataset.do:262
Replication_Code_create_quarterly_dataset.do, line 262 qui regress u_structural wide_surprise
regress
ols
u_structural MPS_ORTH — default
Replication_Code_create_quarterly_dataset.do:264
Replication_Code_create_quarterly_dataset.do, line 264 qui regress u_structural MPS_ORTH
newey
ols
`depvar'_`mu'_`h' l(0/4).resid_full `depvar'_`mu'_m1 `depvar'_`mu'_m2 `depvar'_`mu'_m3 `depvar'_`mu'_m4 — newey_west
Replication_Code_firm_level_local_projections.do:53
Replication_Code_firm_level_local_projections.do, line 53 qui newey `depvar'_`mu'_`h' L(0/4).`cycle_var' `depvar'_`mu'_m1 `depvar'_`mu'_m2 `depvar'_`mu'_m3 `depvar'_`mu'_m4, lag(4) as we read it (macros filled in / loop expanded): qui newey `depvar'_`mu'_`h' L(0/4).resid_full `depvar'_`mu'_m1 `depvar'_`mu'_m2 `depvar'_`mu'_m3 `depvar'_`mu'_m4, lag(4)
run 78× in a loop (mu=mu_li_ms4; depvar=dlogmu_cov; h=0; mu=mu_li_ms4; depvar=dlogmu_cov; h=1; mu=mu_li_ms4; depvar=dlogmu_cov; h=2…)
xtreg
panel fe
`depvar'_`mu'_`h' l(0/4).resid_full `depvar'_`mu'_m1 `depvar'_`mu'_m2 `depvar'_`mu'_m3 `depvar'_`mu'_m4 naics3 default
Replication_Code_firm_level_local_projections.do:124
Replication_Code_firm_level_local_projections.do, line 124 qui xtreg `depvar'_`mu'_`h' L(0/4).`cycle_var' `depvar'_`mu'_m1 `depvar'_`mu'_m2 `depvar'_`mu'_m3 `depvar'_`mu'_m4 if n_firms>=5, fe as we read it (macros filled in / loop expanded): qui xtreg `depvar'_`mu'_`h' L(0/4).resid_full `depvar'_`mu'_m1 `depvar'_`mu'_m2 `depvar'_`mu'_m3 `depvar'_`mu'_m4 if n_firms>=5, fe
run 78× in a loop (mu=mu_li_ms4; depvar=dlogmu_cov; h=0; mu=mu_li_ms4; depvar=dlogmu_cov; h=1; mu=mu_li_ms4; depvar=dlogmu_cov; h=2…)
regress
ols
`depvar'_`mu'_`h' l(0/4).resid_full `depvar'_`mu'_m1 `depvar'_`mu'_m2 `depvar'_`mu'_m3 `depvar'_`mu'_m4 — default
Replication_Code_firm_level_local_projections.do:127
Replication_Code_firm_level_local_projections.do, line 127 qui regress `depvar'_`mu'_`h' L(0/4).`cycle_var' `depvar'_`mu'_m1 `depvar'_`mu'_m2 `depvar'_`mu'_m3 `depvar'_`mu'_m4 if n_firms>=5 as we read it (macros filled in / loop expanded): qui regress `depvar'_`mu'_`h' L(0/4).resid_full `depvar'_`mu'_m1 `depvar'_`mu'_m2 `depvar'_`mu'_m3 `depvar'_`mu'_m4 if n_firms>=5
run 78× in a loop (mu=mu_li_ms4; depvar=dlogmu_cov; h=0; mu=mu_li_ms4; depvar=dlogmu_cov; h=1; mu=mu_li_ms4; depvar=dlogmu_cov; h=2…)
regress
ols
cum0_log_prod pct`n_firm'_full cycle_pct`n_firm'_inter l(0/2).resid_full l(1/2).log_prod — robust
Replication_Code_sector_productivity_projections.do:107
Replication_Code_sector_productivity_projections.do, line 107 regress cum0_log_prod pct`n_firm'_full cycle_pct`n_firm'_inter L(0/2).`cycle_var' L(1/2).log_prod, vce(robust) as we read it (macros filled in / loop expanded): regress cum0_log_prod pct`n_firm'_full cycle_pct`n_firm'_inter L(0/2).resid_full L(1/2).log_prod, vce(robust)
run 3× in a loop (n_firm=8; n_firm=20; n_firm=50)
newey
ols
cum`h'_`tfp_var' l(0/4).resid_full L(1/4).`tfp_var' — newey_west
Replication_Code_TFP_local_projections.do:64
Replication_Code_TFP_local_projections.do, line 64 qui newey cum`h'_`tfp_var' L(0/4).`cycle_var' L(1/4).`tfp_var', lag(4) as we read it (macros filled in / loop expanded): qui newey cum`h'_`tfp_var' L(0/4).resid_full L(1/4).`tfp_var', lag(4)
run 68× in a loop (tfp_var=dtfp_labor; h=0; tfp_var=dtfp_labor; h=1; tfp_var=dtfp_labor; h=2…)
Tables and figures the code writes: industry_prod_`cycle_var'_`concentration_year'.tex
Replication_Code_sector_productivity_projections.do:112
Replication_Code_sector_productivity_projections.do, line 112 esttab r* using "outputs/industry_prod_`cycle_var'_`concentration_year'.tex", replace booktabs keep(cycle_pct*_inter) star("*" 0.10 "**" 0.05) se nomtitles nonotes
· inv_`mu'_`depvar'`cycle_name'.pdf
Replication_Code_firm_level_local_projections.do:75
Replication_Code_firm_level_local_projections.do, line 75 graph export "outputs/inv_`mu'_`depvar'`cycle_name'.pdf", replace fontface("Palatino")
· TFP_LP_`tfp_var'_`cycle_var'.pdf
Replication_Code_TFP_local_projections.do:76
Replication_Code_TFP_local_projections.do, line 76 graph export "outputs/TFP_LP_`tfp_var'_`cycle_var'.pdf", replace fontface("Palatino")

7 · Figures: how each is drawn — 78 figures in the code (command, layers, options, the file it is saved to)

line 61 · scatter 8 · event-study plot 4 · bar 3 · histogram 2
commandlayersvariables optionssaved aswhere
coefplot
event-study plot
coefplot estimates p* xtitle Quarters since monetary shock · ytitle Change in `measure_name' (%) (set at run time) · yline 0 · ci rarea · legend off · vertical yes not saved
Replication_Code_TFP_local_projections.do:70
Replication_Code_TFP_local_projections.do, line 70 coefplot (p*), vertical keep(`cycle_var') asequation swapnames eqrename(^p(.*)$ = \1, regex) color("31 119 180") yline(0) legend(off) xtitle("Quarters since monetary shock") ytitle("Change in `measure_name' (%)") recast( …
coefplot
event-study plot
coefplot estimates p* xtitle Quarters since monetary shock · ytitle Change in `measure_name' (%) (set at run time) · yline 0 · ci rarea · legend off · vertical yes TFP_LP_`tfp_var'_`cycle_var'.pdf (set at run time)
Replication_Code_TFP_local_projections.do:73
Replication_Code_TFP_local_projections.do, line 73 coefplot (p*), vertical keep(`cycle_var') asequation swapnames eqrename(^p(.*)$ = \1, regex) color("31 119 180") yline(0) legend(off) xtitle("Quarters since monetary shock") ytitle("Change in `measure_name' (%)") recast( …
ax.plot
line
line y var_list[plot_ind][:tmax] * rescale title titlesplot_ind · panels subplots not saved
Replication_Code_compare_menucost_IRFs.py:24
Replication_Code_compare_menucost_IRFs.py, line 24 fig,axs = plt.subplots(int((len(titles) + 1)/2),2,figsize=(8,1.5*int((len(titles) + 1)/2)))
–34
coefplot
event-study plot
coefplot estimates p* xtitle Quarters after monetary shock · ytitle Var{sub:{&lambda}}(logμ) (%) · yline 0 · ci rarea · legend off · vertical yes inv_`mu'_`depvar'`cycle_name'.pdf (set at run time)
Replication_Code_firm_level_local_projections.do:69
Replication_Code_firm_level_local_projections.do, line 69 coefplot (p*), vertical keep(`cycle_var') asequation swapnames eqrename(^p(.*)$ = \1, regex) color("31 119 180") yline(0) legend(off) xtitle("Quarters after monetary shock") ytitle(`ylabel') recast(connected) levels(68 9 …
coefplot
event-study plot
coefplot estimates p* xtitle Quarters after monetary shock · ytitle Var{sub:{&lambda}}(logμ) (%) · yline 0 · ci rarea · legend off · vertical yes not saved
Replication_Code_firm_level_local_projections.do:144
Replication_Code_firm_level_local_projections.do, line 144 coefplot (p*), vertical keep(`cycle_var') asequation swapnames eqrename(^p(.*)$ = \1, regex) color("31 119 180") yline(0) legend(off) xtitle("Quarters after monetary shock") ytitle(`ylabel') recast(connected) levels(68 9 …
plt.plot
line
line y cov_mu_dlogmu[:t_max] x range(t_max) xtitle Quarters · ytitle $Cov_{\lambda}(\mu, d\log \mu)$ not saved
Replication_Code_kimball_dynamics.py:436
Replication_Code_kimball_dynamics.py, line 436 fig = plt.figure()
–439
plt.plot
line
line y cov_mu_dlogcosts[:t_max] x range(t_max) xtitle Quarters · ytitle $Cov_{\lambda}(\mu, d\log Costs)$ not saved
Replication_Code_kimball_dynamics.py:443
Replication_Code_kimball_dynamics.py, line 443 fig = plt.figure()
–446
plt.plot
line
line y var_logmu[:t_max] x range(t_max) xtitle Quarters · ytitle $Var_{\lambda}(\log \mu)$ not saved
Replication_Code_kimball_dynamics.py:455
Replication_Code_kimball_dynamics.py, line 455 fig = plt.figure()
–458
ax.plot
line
line + line y cov_invmu_dlogmu[:t_max], cov_invmu_dlogcosts[:t_max] title $Cov_{\lambda}(-1/\mu, d\log \mu)$ · panels 1×2 not saved
Replication_Code_kimball_dynamics.py:460
Replication_Code_kimball_dynamics.py, line 460 fig,axs = plt.subplots(1,2)
–475
ax.plot
line
line + line + line y cov_invmu_dlogmu[:t_max], cov_invmu_dlogcosts[:t_max], dlambda_theta[int(i * (len(shares)-1))][:15] title $Cov_{\lambda}(-1/\mu, d\log \mu)$ · panels 1×2 · legend True not saved
Replication_Code_kimball_dynamics.py:479
Replication_Code_kimball_dynamics.py, line 479 fig,axs = plt.subplots(1,2)
–515
ax.plot
line
line + line + line y impulse_res_CES[i][:t_max], impulse_res_homog[i][:t_max], impulse_res[i][:t_max] title labelsi · panels subplots not saved
Replication_Code_kimball_dynamics.py:637
Replication_Code_kimball_dynamics.py, line 637 fig,axs = plt.subplots(int((len(mod_var_list) + 1)/2),2,figsize=(8,1.5*int((len(var_list) + 1)/2)))
–651
ax.plot
line
line + line + line y impulse_res_CES[i][:t_max], impulse_res_homog[i][:t_max], impulse_res[i][:t_max] title labelsi · panels 1×2 not saved
Replication_Code_kimball_dynamics.py:655
Replication_Code_kimball_dynamics.py, line 655 fig,axs = plt.subplots(1,2)
–669
ax.plot
line
line + line + line + line + line y impulse_res[Y_index][:t_max], impulse_res_homog[Y_index][:t_max], impulse_res_CES[Y_index][:t_max], impulse_res[Y_index][:t_max] / impulse_res_homog[Y_index][:t_max], impulse_res_homog[Y_index][:t_max] / impulse_res_CES[Y_index][:t_max] title $d\log Y_t$ · panels 1×2 not saved
Replication_Code_kimball_dynamics.py:675
Replication_Code_kimball_dynamics.py, line 675 fig,axs = plt.subplots(1,2)
–691
ax.plot
line
line + line + line + line + line y impulse_res[Y_index][:t_max], impulse_res_homog[Y_index][:t_max], impulse_res_CES[Y_index][:t_max], impulse_res[Y_index][:t_max] / impulse_res_homog[Y_index][:t_max], impulse_res_homog[Y_index][:t_max] / impulse_res_CES[Y_index][:t_max] title Impact on output ($d\log Y_t$) · panels 1×2 · legend True not saved
Replication_Code_kimball_dynamics.py:703
Replication_Code_kimball_dynamics.py, line 703 fig,axs = plt.subplots(1,2)
–718
ax.plot
line
line + line + line + line + line + line y impulse_res_CES[var_list.index('A')][:t_max], impulse_res_homog[var_list.index('A')][:t_max], impulse_res[var_list.index('A')][:t_max], impulse_res_CES[var_list.index('std_mu')][:t_max], impulse_res_homog[var_list.index('std_mu')][:t_max], impulse_res[var_list.index('std_mu')][:t_max] title Aggregate TFP ($d\log A_t$) · panels 1×2 · legend True not saved
Replication_Code_kimball_dynamics.py:720
Replication_Code_kimball_dynamics.py, line 720 fig,axs = plt.subplots(1,2)
–733
ax.plot
line
line + line + line + line + line + line y np.log(0.5) / np.log(np.roll(impulse_res_CES[Y_index],-1)/impulse_res_CES[Y_inde, np.log(0.5) / np.log(np.roll(impulse_res_homog[Y_index],-1)/impulse_res_homog[Y_, np.log(0.5) / np.log(np.roll(impulse_res[Y_index],-1)/impulse_res[Y_index])[:2*t, np.log(0.5) / np.log(np.roll(impulse_res_CES[Pi_index],-1)/impulse_res_CES[Pi_in, np.log(0.5) / np.log(np.roll(impulse_res_homog[Pi_index],-1)/impulse_res_homog[P, np.log(0.5) / np.log(np.roll(impulse_res[Pi_index],-1)/impulse_res[Pi_index])[:2 title $d\log Y_t$ · ytitle Instantaneous half-life · panels 1×2 · legend True not saved
Replication_Code_kimball_dynamics.py:746
Replication_Code_kimball_dynamics.py, line 746 fig,axs = plt.subplots(1,2)
–786
plt.plot
line
line y cov_mu_dlogmu[:t_max] x range(t_max) xtitle Quarters · ytitle $Cov_{\lambda}(\mu, d\log \mu)$ not saved
Replication_Code_kimball_dynamics_Table6.py:436
Replication_Code_kimball_dynamics_Table6.py, line 436 fig = plt.figure()
–439
plt.plot
line
line y cov_mu_dlogcosts[:t_max] x range(t_max) xtitle Quarters · ytitle $Cov_{\lambda}(\mu, d\log Costs)$ not saved
Replication_Code_kimball_dynamics_Table6.py:443
Replication_Code_kimball_dynamics_Table6.py, line 443 fig = plt.figure()
–446
plt.plot
line
line y var_logmu[:t_max] x range(t_max) xtitle Quarters · ytitle $Var_{\lambda}(\log \mu)$ not saved
Replication_Code_kimball_dynamics_Table6.py:455
Replication_Code_kimball_dynamics_Table6.py, line 455 fig = plt.figure()
–458
ax.plot
line
line + line y cov_mu_dlogmu[:t_max], cov_mu_dlogcosts[:t_max] title $Cov_{\lambda}(\mu, d\log \mu)$ · panels 1×2 not saved
Replication_Code_kimball_dynamics_Table6.py:460
Replication_Code_kimball_dynamics_Table6.py, line 460 fig,axs = plt.subplots(1,2)
–475
ax.plot
line
line + line + line y cov_invmu_dlogmu[:t_max], cov_invmu_dlogcosts[:t_max], dlambda_theta[int(i * (len(shares)-1))][:15] title $Cov_{\lambda}(-1/\mu, d\log \mu)$ · panels 1×2 · legend True not saved
Replication_Code_kimball_dynamics_Table6.py:479
Replication_Code_kimball_dynamics_Table6.py, line 479 fig,axs = plt.subplots(1,2)
–515
ax.plot
line
line + line + line y impulse_res_CES[i][:t_max], impulse_res_homog[i][:t_max], impulse_res[i][:t_max] title labelsi · panels subplots not saved
Replication_Code_kimball_dynamics_Table6.py:637
Replication_Code_kimball_dynamics_Table6.py, line 637 fig,axs = plt.subplots(int((len(mod_var_list) + 1)/2),2,figsize=(8,1.5*int((len(var_list) + 1)/2)))
–651
ax.plot
line
line + line + line y impulse_res_CES[i][:t_max], impulse_res_homog[i][:t_max], impulse_res[i][:t_max] title labelsi · panels 1×2 not saved
Replication_Code_kimball_dynamics_Table6.py:655
Replication_Code_kimball_dynamics_Table6.py, line 655 fig,axs = plt.subplots(1,2)
–669
ax.plot
line
line + line + line + line + line y impulse_res[Y_index][:t_max], impulse_res_homog[Y_index][:t_max], impulse_res_CES[Y_index][:t_max], impulse_res[Y_index][:t_max] / impulse_res_homog[Y_index][:t_max], impulse_res_homog[Y_index][:t_max] / impulse_res_CES[Y_index][:t_max] title $d\log Y_t$ · panels 1×2 not saved
Replication_Code_kimball_dynamics_Table6.py:675
Replication_Code_kimball_dynamics_Table6.py, line 675 fig,axs = plt.subplots(1,2)
–691
ax.plot
line
line + line + line + line + line y impulse_res[Y_index][:t_max], impulse_res_homog[Y_index][:t_max], impulse_res_CES[Y_index][:t_max], impulse_res[Y_index][:t_max] / impulse_res_homog[Y_index][:t_max], impulse_res_homog[Y_index][:t_max] / impulse_res_CES[Y_index][:t_max] title Impact on output ($d\log Y_t$) · panels 1×2 · legend True not saved
Replication_Code_kimball_dynamics_Table6.py:703
Replication_Code_kimball_dynamics_Table6.py, line 703 fig,axs = plt.subplots(1,2)
–718
ax.plot
line
line + line + line + line + line + line y impulse_res_CES[var_list.index('A')][:t_max], impulse_res_homog[var_list.index('A')][:t_max], impulse_res[var_list.index('A')][:t_max], impulse_res_CES[var_list.index('std_mu')][:t_max], impulse_res_homog[var_list.index('std_mu')][:t_max], impulse_res[var_list.index('std_mu')][:t_max] title Aggregate TFP ($d\log A_t$) · panels 1×2 · legend True not saved
Replication_Code_kimball_dynamics_Table6.py:720
Replication_Code_kimball_dynamics_Table6.py, line 720 fig,axs = plt.subplots(1,2)
–733
ax.plot
line
line + line + line + line + line + line y np.log(0.5) / np.log(np.roll(impulse_res_CES[Y_index],-1)/impulse_res_CES[Y_inde, np.log(0.5) / np.log(np.roll(impulse_res_homog[Y_index],-1)/impulse_res_homog[Y_, np.log(0.5) / np.log(np.roll(impulse_res[Y_index],-1)/impulse_res[Y_index])[:2*t, np.log(0.5) / np.log(np.roll(impulse_res_CES[Pi_index],-1)/impulse_res_CES[Pi_in, np.log(0.5) / np.log(np.roll(impulse_res_homog[Pi_index],-1)/impulse_res_homog[P, np.log(0.5) / np.log(np.roll(impulse_res[Pi_index],-1)/impulse_res[Pi_index])[:2 title $d\log Y_t$ · ytitle Instantaneous half-life · panels 1×2 · legend True not saved
Replication_Code_kimball_dynamics_Table6.py:746
Replication_Code_kimball_dynamics_Table6.py, line 746 fig,axs = plt.subplots(1,2)
–784
ax.plot
line
line + line + line y shares, markups, passthroughs xtitle Firms ordered by size · ytitle $\lambda_\theta$ · panels 3×1 not saved
Replication_Code_klenow_willis.py:80
Replication_Code_klenow_willis.py, line 80 fig,axs = plt.subplots(3,1, figsize=(4,8))
–89
plt.plot
line
line y passthroughs x np.linspace(0,1,N_firms) title None not saved
Replication_Code_klenow_willis.py:90
Replication_Code_klenow_willis.py, line 90 plt.figure()
–94
plt.plot
line
line + line + line + line + line y np.log(shares), mu_kw, markups, passthroughs x np.linspace(0,1,N_firms), np.linspace(0,1,len(shares)), mu_kw, +1 more title None · legend True · xscale log · yscale log not saved
Replication_Code_klenow_willis.py:97
Replication_Code_klenow_willis.py, line 97 plt.figure()
–120
ax.plot
line
line + line y mu_kw, markups x passthroughs title Klenow and Willis (2016) preferences · xtitle Passthrough $(\rho_\theta)$ · ytitle Implied markup $(\mu_\theta)$ · panels 1×2 · yscale log not saved
Replication_Code_klenow_willis.py:121
Replication_Code_klenow_willis.py, line 121 fig,axs = plt.subplots(1,2, figsize=(8,4))
–136
plt.plot
line
line y mu_levels xtitle Period · ytitle Markup (by productivity level) not saved
Replication_Code_menu_costs_CES.py:395
Replication_Code_menu_costs_CES.py, line 395 plt.plot(mu_levels.T)
–397
plt.plot
line
line y mu_levels[MASK_LO:MASK_HI,:].T xtitle Period · ytitle Markup (by productivity level) not saved
Replication_Code_menu_costs_CES.py:402
Replication_Code_menu_costs_CES.py, line 402 plt.plot(mu_levels[MASK_LO:MASK_HI,:].T)
–404
ax.plot
line
line y var_list[plot_ind][:tmax] * rescale title titlesplot_ind · panels subplots savename
Replication_Code_menu_costs_CES.py:570
Replication_Code_menu_costs_CES.py, line 570 fig,axs = plt.subplots(int((len(var_list) + 1)/2),2,figsize=(8,1.5*int((len(var_list) + 1)/2)))
–577
ax.plot
line
line + line + line y value_fn[:,ind,np.searchsorted(dlogB_grid,0)], value_fn_paths[0][:,ind,np.searchsorted(dlogB_grid,0)], ss_dist[:,ind,:].sum(axis=1)/ss_dist[:,ind,:].sum() x dlogp_grid title Value functions · panels 1×2 · legend True savename
Replication_Code_menu_costs_CES.py:581
Replication_Code_menu_costs_CES.py, line 581 fig,axs = plt.subplots(1,2,figsize=(8,4))
–613
plt.plot
line
line y (ss_dist * mu_grid_dist).sum(axis=2).sum(axis=0)/(ss_dist.sum(axis=2).sum(axis=0 x np.linspace(0,1,n_A) xtitle Firm productivity space · ytitle Steady-state avg. markup not saved
Replication_Code_menu_costs_CES.py:608
Replication_Code_menu_costs_CES.py, line 608 plt.plot(np.linspace(0,1,n_A), (ss_dist * mu_grid_dist).sum(axis=2).sum(axis=0)/(ss_dist.sum(axis=2).sum(axis=0)))
–610
plt.plot
line
line + line y transition_mid, norm_pdf x dlogA_grid_mid, dlogA_grid_mid[1:-1] xtitle $d \log A$ · ytitle Density · legend True savename + '.png
Replication_Code_menu_costs_CES.py:637
Replication_Code_menu_costs_CES.py, line 637 fig = plt.figure()
–709
DataFrame.plot
bar
bar y binned_price_change_density xtitle $d\log p$ · ytitle Density not saved
Replication_Code_menu_costs_CES.py:669
Replication_Code_menu_costs_CES.py, line 669 binned_price_change_density.plot(kind='bar', width=1.0)
–673
plt.plot
line
line y fpa_arr x np.linspace(0,1,n_A) xtitle Firm productivity space · ytitle Frequency of price adjustment not saved
Replication_Code_menu_costs_CES.py:704
Replication_Code_menu_costs_CES.py, line 704 plt.plot(np.linspace(0,1,n_A), fpa_arr)
–706
ax.plot
line
line y var_list[plot_ind][:tmax] * rescale title titlesplot_ind · panels subplots savename
Replication_Code_menu_costs_CES.py:715
Replication_Code_menu_costs_CES.py, line 715 fig,axs = plt.subplots(int((len(titles) + 1)/2),2,figsize=(8,1.5*int((len(titles) + 1)/2)))
–727
ax.plot
line
line y var_list[plot_ind][:tmax] * rescale title titlesplot_ind · panels subplots saveprefix + '.png
Replication_Code_menu_costs_CES.py:733
Replication_Code_menu_costs_CES.py, line 733 fig,axs = plt.subplots(int((len(titles) + 1)/2),2,figsize=(8,2*int((len(titles) + 1)/2)))
–747
ax.plot
line
line y var_list[plot_ind][:tmax] * rescale title titlesplot_ind · panels subplots saveprefix + '.png
Replication_Code_menu_costs_CES.py:755
Replication_Code_menu_costs_CES.py, line 755 fig,axs = plt.subplots(int((len(titles) + 1)/2),2,figsize=(8,3.5*int((len(titles) + 1)/2)))
–769
Series.plot.bar
bar
bar y cov_df ytitle Covariance of markups with realized passthrough not saved
Replication_Code_menu_costs_CES.py:834
Replication_Code_menu_costs_CES.py, line 834 cov_df.T.plot.bar()
–836
plt.plot
line
line y mu_levels xtitle Period · ytitle Markup (by productivity level) not saved
Replication_Code_menu_costs_Kimball.py:393
Replication_Code_menu_costs_Kimball.py, line 393 plt.plot(mu_levels.T)
–395
plt.plot
line
line y mu_levels[MASK_LO:MASK_HI,:].T xtitle Period · ytitle Markup (by productivity level) not saved
Replication_Code_menu_costs_Kimball.py:400
Replication_Code_menu_costs_Kimball.py, line 400 plt.plot(mu_levels[MASK_LO:MASK_HI,:].T)
–402
ax.plot
line
line y var_list[plot_ind][:tmax] * rescale title titlesplot_ind · panels subplots savename
Replication_Code_menu_costs_Kimball.py:673
Replication_Code_menu_costs_Kimball.py, line 673 fig,axs = plt.subplots(int((len(var_list) + 1)/2),2,figsize=(8,1.5*int((len(var_list) + 1)/2)))
–680
ax.plot
line
line + line + line y value_fn[:,ind,np.searchsorted(dlogB_grid,0)], value_fn_paths[0][:,ind,np.searchsorted(dlogB_grid,0)], ss_dist[:,ind,:].sum(axis=1)/ss_dist[:,ind,:].sum() x dlogp_grid title Value functions · panels 1×2 · legend True savename
Replication_Code_menu_costs_Kimball.py:684
Replication_Code_menu_costs_Kimball.py, line 684 fig,axs = plt.subplots(1,2,figsize=(8,4))
–807
plt.plot
line
line + line + line y (ss_dist * mu_grid_dist).sum(axis=2).sum(axis=0)/(ss_dist.sum(axis=2).sum(axis=0, transition_mid, norm_pdf x np.linspace(0,1,n_A), dlogA_grid_mid, dlogA_grid_mid[1:-1] xtitle Firm productivity space · ytitle Steady-state avg. markup · legend True not saved
Replication_Code_menu_costs_Kimball.py:711
Replication_Code_menu_costs_Kimball.py, line 711 plt.plot(np.linspace(0,1,n_A), (ss_dist * mu_grid_dist).sum(axis=2).sum(axis=0)/(ss_dist.sum(axis=2).sum(axis=0)))
–745
DataFrame.plot
bar
bar y binned_price_change_density xtitle $d\log p$ · ytitle Density not saved
Replication_Code_menu_costs_Kimball.py:767
Replication_Code_menu_costs_Kimball.py, line 767 binned_price_change_density.plot(kind='bar', width=1.0)
–771
plt.plot
line
line y fpa_arr x np.linspace(0,1,n_A) xtitle Firm productivity space · ytitle Frequency of price adjustment not saved
Replication_Code_menu_costs_Kimball.py:802
Replication_Code_menu_costs_Kimball.py, line 802 plt.plot(np.linspace(0,1,n_A), fpa_arr)
–804
plt.scatter
scatter
scatter + axhline + axhline + axhline y passthroughs.flatten() x shares.flatten() title $\rho_i^{flex}$ compared to Amiti et al estimates · xtitle Sales share · ytitle $\rho_i^{flex}$ · yline sp.weighted_exp(passthroughs.flatten(), , 0.478, 0.972 · legend True not saved
Replication_Code_statics_calibrations.py:141
Replication_Code_statics_calibrations.py, line 141 plt.figure()
–149
plt.plot
line
line + errorbar y weighted_passthrough_grid, passthrough_est x total_share_grid, share band np.asarray(amiti_A2[['yerr_btm', 'yerr_top']]).T xtitle Share of sales below size threshold · ytitle Sales-weighted average passthrough · ci errorbar · legend True not saved
Replication_Code_statics_calibrations.py:175
Replication_Code_statics_calibrations.py, line 175 plt.figure()
–184
ax.scatter
scatter
scatter + scatter + scatter + scatter y passthrough, np.log(all_firms['share']), markup, productivity x norm_rank title 'Distributions (firms ordered by ' + sort_by + ')' · panels 2×2 not saved
Replication_Code_statics_calibrations.py:194
Replication_Code_statics_calibrations.py, line 194 fig,axs = plt.subplots(2,2, figsize=FIG_SIZE_2x2)
–204
plt.plot
line
line y passthrough x norm_rank not saved
Replication_Code_statics_calibrations.py:206
Replication_Code_statics_calibrations.py, line 206 plt.figure()
–207
plt.plot
line
line y markup x norm_rank not saved
Replication_Code_statics_calibrations.py:211
Replication_Code_statics_calibrations.py, line 211 plt.figure()
–212
plt.hist
histogram
hist + axvline + axvline x hhi title Distribution of industry HHI with Amiti parameters · xtitle HHI · ytitle Frequency · xline np.median(hhi), np.mean(hhi) · bins 20 · legend True not saved
Replication_Code_statics_calibrations.py:223
Replication_Code_statics_calibrations.py, line 223 plt.figure()
–230
plt.hist
histogram
hist + axvline + axvline x largest_firm title Distribution of market share of largest firm (Amiti parameters) · xtitle Market share of largest firm · ytitle Frequency · xline np.median(largest_firm), np.mean(largest_firm) · bins 20 · legend True not saved
Replication_Code_statics_calibrations.py:232
Replication_Code_statics_calibrations.py, line 232 plt.figure()
–239
plt.plot
line
line + axvline + axhline y cumul_shares x np.linspace(0,1,len(cumul_shares)) title Replication of 20% of firms have 60% of market share · xtitle Percent of firms · ytitle Cumulative share · xline 0.20 · yline 0.60 not saved
Replication_Code_statics_calibrations.py:241
Replication_Code_statics_calibrations.py, line 241 plt.figure()
–251
ax.scatter
scatter
scatter + scatter + scatter + scatter + scatter + scatter y markups.flatten(), markups2.flatten(), markups3.flatten(), passthroughs.flatten(), passthroughs2.flatten(), passthroughs3.flatten() x shares.flatten(), shares2.flatten(), shares3.flatten() title Replication of Figure A3 from Amiti et al (2019) · xtitle Market share · ytitle Markup · panels 1×2 · legend True not saved
Replication_Code_statics_calibrations.py:253
Replication_Code_statics_calibrations.py, line 253 fig,axs = plt.subplots(1,2, figsize=FIG_SIZE_1x2)
–271
plt.scatter
scatter
scatter + line + line + line + line + line y passthroughs_oligopoly.flatten(), *calculate_klenow_willis_passthroughs(shares_grid, 5, 0), *calculate_klenow_willis_passthroughs(shares_grid, 5, 1.6), *calculate_klenow_willis_passthroughs(shares_grid, 5, 10), passthroughs_dar, dlog_shares x output_oligopoly.flatten(), output_dar, np.linspace(0, 1, len(dlog_shares)) title Comparison of $\rho_i$ distributions from various models · xtitle $y_i / Y$ · ytitle Passthrough ($\rho_i^{flex}$) · legend loc='upper right' not saved
Replication_Code_statics_calibrations.py:303
Replication_Code_statics_calibrations.py, line 303 plt.figure()
–356
the first 60 of 78, in file and line order