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
Datasets this package uses (item detector / README):
Compustat, Compustat North America Fundamentals Quarterly, Compustat North America (database)
data/Compustat/20220329_TotalQ.csvCSVReplication_Code_estimate_quarterly_markups.do:58
Replication_Code_estimate_quarterly_markups.do, line 58 import delimited using "data/Compustat/20220329_TotalQ.csv", cleardata/Compustat/20220401_Compustat_quarterly.csvCSVReplication_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.xlsxExcel · read by 2 scriptsReplication_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 cleardata/markup_estimates/aggregate_markup_mu_li_annualStata · read by 2 scriptsReplication_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.xlsxExcel · read by 2 scriptsReplication_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 cleardata/Bauer_Swanson_2022/FOMC_Bauer_Swanson.xlsxExcelReplication_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 cleardata/BEA/DetailNonres_rate.xlsxExcelReplication_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 cleardata/BLS_Productivity/BLS_annual_prod_cleanStataReplication_Code_sector_productivity_projections.do:65
Replication_Code_sector_productivity_projections.do, line 65 use "data/BLS_Productivity/BLS_annual_prod_clean", cleardata/Census_Mfg_Concentration/2002_31-33_Con_Ratios_US/ECN_2002_US_31SR12_with_ann.csvCSVReplication_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.csvCSVReplication_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.xlsxExcelReplication_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 firstrowdata/Damadoran_ERP/histimpl.xlsExcelReplication_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 cleardata/FRED/10Yrates_quarterly.csvCSVReplication_Code_estimate_quarterly_markups.do:90
Replication_Code_estimate_quarterly_markups.do, line 90 import delimited using "data/FRED/10Yrates_quarterly.csv", cleardata/FRED/CPIAUCSL.csvCSVReplication_Code_create_quarterly_dataset.do:28
Replication_Code_create_quarterly_dataset.do, line 28 import delimited "data/FRED/CPIAUCSL.csv", cleardata/FRED/deflators.csvCSVReplication_Code_estimate_quarterly_markups.do:87
Replication_Code_estimate_quarterly_markups.do, line 87 import delimited using "data/FRED/deflators.csv", cleardata/FRED/INDPRO.csvCSVReplication_Code_create_quarterly_dataset.do:14
Replication_Code_create_quarterly_dataset.do, line 14 import delimited "data/FRED/INDPRO.csv", cleardata/GZ_ExcessBond/ebp_csv.csvCSVReplication_Code_create_quarterly_dataset.do:43
Replication_Code_create_quarterly_dataset.do, line 43 import delimited "data/GZ_ExcessBond/ebp_csv.csv", cleardata/Miranda_Agrippino_Ricco_2017/ff4_instruments_shared.xlsxExcelReplication_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 cleardata/Miranda_Agrippino_Ricco_2017/MPS_IV.xlsxExcelReplication_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 cleardata/Treasury_Yield/feds200628.csvCSVReplication_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.xlsxExcelReplication_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.npyNumPyReplication_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.xlsxExcelReplication_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.txttextReplication_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.txttextReplication_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.
-
1.
Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.doreads 4 input files · 10 merges · 4 estimationswritesRR_monetary_shock_annual→ read byReplication_Code_sector_productivity_projections.dowritesRR_monetary_shock_quarterly→ read byReplication_Code_create_quarterly_dataset.do,Replication_Code_TFP_local_projections.dowrites (not read again):RR_monetary_shock_monthly.dta -
2.
Replication_Code_estimate_quarterly_markups.doreads 7 input files · 8 merges · 1 estimationwritesCompustat_clean→ read byReplication_Code_aggregate_quarterly_markups.do -
3.
Replication_Code_aggregate_quarterly_markups.do1 merge ·reads whatReplication_Code_estimate_quarterly_markups.dowrotewritesCompustat_clean_with_lags.dta→ read byReplication_Code_add_markup_covariances.pywritesquarterly_mu_bar→ read byReplication_Code_create_quarterly_dataset.dowrites (not read again):aggregate_quarterly_mu -
4.
Replication_Code_add_markup_covariances.py1 merge ·reads whatReplication_Code_aggregate_quarterly_markups.dowrotewritesaggregated_`mu'_quarter→ read byReplication_Code_firm_level_local_projections.dowritesaggregated_`mu'_quarter`ind_var'→ read byReplication_Code_firm_level_local_projections.dowritesaggregated_sales_list→ read byReplication_Code_firm_level_local_projections.do -
5.
Replication_Code_create_quarterly_dataset.doreads 10 input files · 11 merges · 12 estimationsreads whatReplication_Code_data_Monetary_shocks_RR_monetary_shock_update.do,Replication_Code_aggregate_quarterly_markups.dowrotewritesquarterly_aggregates_clean→ read byReplication_Code_firm_level_local_projections.do,Replication_Code_TFP_local_projections.do -
6.
Replication_Code_firm_level_local_projections.do3 merges · 3 estimationsreads whatReplication_Code_add_markup_covariances.py,Replication_Code_create_quarterly_dataset.dowrote -
7.
Replication_Code_klenow_willis.py -
8.
Replication_Code_sector_productivity_projections.doreads 4 input files · 3 merges · 2 estimationsreads whatReplication_Code_data_Monetary_shocks_RR_monetary_shock_update.dowrotewrites (not read again):concentration_ratios_2007 -
9.
Replication_Code_statics_calibrations.py -
10.
Replication_Code_support_functions.py -
11.
Replication_Code_TFP_local_projections.doreads 2 input files · 3 merges · 1 estimationreads whatReplication_Code_data_Monetary_shocks_RR_monetary_shock_update.do,Replication_Code_create_quarterly_dataset.dowrotewrites (not read again):quarterly_tfp_clean -
12.
Replication_Code_compare_menucost_IRFs.pyreads whatReplication_Code_menu_costs_Kimball.pywrote -
13.
Replication_Code_menu_costs_CES.pyreads 1 input file ·reads whatReplication_Code_menu_costs_Kimball.pywrotewritesdemand_curve_extended.dta→ read byReplication_Code_menu_costs_Kimball.py -
14.
Replication_Code_menu_costs_Kimball.pyreads whatReplication_Code_menu_costs_CES.pywrotewritescov_breakdown_25.npy→ read byReplication_Code_menu_costs_CES.pywritescov_breakdown_8.npy→ read byReplication_Code_menu_costs_CES.pywritesdemand_curve_extended.dta→ read byReplication_Code_menu_costs_CES.pywritesfinal_res.npy→ read byReplication_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
| Joins | How | On keys | Check that follows | Where |
|---|---|---|---|---|
(data in memory) ← ``capvar'`sheet'' |
merge 1:1 | fc_quarter release_date |
none | Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:140Replication_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:279Replication_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:333Replication_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:398Replication_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:406Replication_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:427Replication_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:428Replication_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:469Replication_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:583Replication_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:63Replication_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:93Replication_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:121Replication_Code_estimate_quarterly_markups.do, line 121
merge m:1 quarter using "data/FRED/quarterly_allFRED_clean" |
compustat_clean ← sic_naics_xwalk |
merge m:1 | sic |
drop _merge |
Replication_Code_estimate_quarterly_markups.do:175Replication_Code_estimate_quarterly_markups.do, line 175
merge m:1 sic using "data/Compustat/sic_naics_xwalk" |
compustat_clean ← naics4_bea |
merge m:1 | naics4 |
drop if _merge==2 |
Replication_Code_estimate_quarterly_markups.do:206Replication_Code_estimate_quarterly_markups.do, line 206
merge m:1 naics4 using "data/crosswalks/naics4_bea" |
compustat_clean ← naics3_bea |
merge m:1 | naics3 |
drop _merge |
Replication_Code_estimate_quarterly_markups.do:209Replication_Code_estimate_quarterly_markups.do, line 209
merge m:1 naics3 using "data/crosswalks/naics3_bea" |
compustat_clean ← bea_code_depreciation_rates |
merge m:1 | bea_code year |
drop if _merge==2 |
Replication_Code_estimate_quarterly_markups.do:229Replication_Code_estimate_quarterly_markups.do, line 229
merge m:1 bea_code year using "data/BEA/bea_code_depreciation_rates" |
compustat_clean ← damadoran_erp_clean |
merge m:1 | year |
drop if _merge==2 |
Replication_Code_estimate_quarterly_markups.do:324Replication_Code_estimate_quarterly_markups.do, line 324
merge m:1 year using "data/Damadoran_ERP/Damadoran_ERP_clean" |
compustat_clean_withmediandata ← quarterly_diff_sales_growth_`mu' |
merge m:1 | quarter |
drop if _merge==2 |
Replication_Code_aggregate_quarterly_markups.do:100Replication_Code_aggregate_quarterly_markups.do, line 100
merge m:1 quarter using "data/data_temp/quarterly_diff_sales_growth_`mu'" |
cov_dlogmu ← cov_sales |
join (outer) | <index> |
none | Replication_Code_add_markup_covariances.py:70Replication_Code_add_markup_covariances.py, line 70
all_measures = pd.concat([cov_dlogmu, cov_sales], axis=1) |
mps_iv ← mar_2017_clean |
merge 1:1 | date |
drop _merge |
Replication_Code_create_quarterly_dataset.do:148Replication_Code_create_quarterly_dataset.do, line 148
merge 1:1 date using "data/Miranda_Agrippino_Ricco_2017/MAR_2017_clean" |
quarterly_tfp_clean ← quarterly_mu_bar |
merge m:1 | quarter |
drop if _merge==2 |
Replication_Code_create_quarterly_dataset.do:187Replication_Code_create_quarterly_dataset.do, line 187
merge m:1 quarter using "data/markup_estimates/quarterly_mu_bar" |
quarterly_tfp_clean ← aggregate_markup_mu_li_annual |
merge m:1 | year |
drop if _merge==2 |
Replication_Code_create_quarterly_dataset.do:190Replication_Code_create_quarterly_dataset.do, line 190
merge m:1 year using "data/markup_estimates/aggregate_markup_mu_li_annual" |
quarterly_tfp_clean ← rr_monetary_shock_quarterly |
merge 1:1 | date |
drop _merge |
Replication_Code_create_quarterly_dataset.do:201Replication_Code_create_quarterly_dataset.do, line 201
merge 1:1 date using "data/Monetary_shocks/RR_monetary_shock_quarterly" |
quarterly_tfp_clean ← mar_2017_clean |
merge 1:1 | date |
drop _merge |
Replication_Code_create_quarterly_dataset.do:203Replication_Code_create_quarterly_dataset.do, line 203
merge 1:1 date using "data/Miranda_Agrippino_Ricco_2017/MAR_2017_clean" |
quarterly_tfp_clean ← gw_clean |
merge 1:1 | date |
drop _merge |
Replication_Code_create_quarterly_dataset.do:205Replication_Code_create_quarterly_dataset.do, line 205
merge 1:1 date using "data/Gorodnichenko_Weber_2016/GW_clean" |
quarterly_tfp_clean ← bs_clean |
merge 1:1 | date |
drop _merge |
Replication_Code_create_quarterly_dataset.do:207Replication_Code_create_quarterly_dataset.do, line 207
merge 1:1 date using "data/Bauer_Swanson_2022/BS_clean" |
quarterly_tfp_clean ← indpro_clean |
merge 1:1 | date |
drop if _merge==2 |
Replication_Code_create_quarterly_dataset.do:211Replication_Code_create_quarterly_dataset.do, line 211
merge 1:1 date using "data/FRED/INDPRO_clean" |
quarterly_tfp_clean ← cpi_clean |
merge 1:1 | date |
drop if _merge==2 |
Replication_Code_create_quarterly_dataset.do:214Replication_Code_create_quarterly_dataset.do, line 214
merge 1:1 date using "data/FRED/CPI_clean" |
quarterly_tfp_clean ← ebp_clean |
merge 1:1 | date |
drop if _merge==2 |
Replication_Code_create_quarterly_dataset.do:217Replication_Code_create_quarterly_dataset.do, line 217
merge 1:1 date using "data/GZ_ExcessBond/ebp_clean" |
quarterly_tfp_clean ← yield_clean |
merge 1:1 | date |
drop if _merge==2 |
Replication_Code_create_quarterly_dataset.do:220Replication_Code_create_quarterly_dataset.do, line 220
merge 1:1 date using "data/Treasury_Yield/yield_clean" |
aggregated_`mu'_quarter ← quarterly_aggregates_clean |
merge m:1 | year quarter |
drop if _m!=3 |
Replication_Code_firm_level_local_projections.do:29Replication_Code_firm_level_local_projections.do, line 29
merge m:1 year quarter using "data/data_temp/quarterly_aggregates_clean" |
aggregated_`mu'_quarter`ind_var' ← quarterly_aggregates_clean |
merge m:1 | year quarter |
drop if _m!=3 |
Replication_Code_firm_level_local_projections.do:96Replication_Code_firm_level_local_projections.do, line 96
merge m:1 year quarter using "data/data_temp/quarterly_aggregates_clean" |
aggregated_`mu'_quarter`ind_var' ← aggregated_sales_list_clean |
merge 1:1 | naics3 quarter |
drop if _m!=3 |
Replication_Code_firm_level_local_projections.do:103Replication_Code_firm_level_local_projections.do, line 103
merge 1:1 naics3 quarter using "data/data_temp/aggregated_sales_list_clean" |
bls_annual_prod_clean ← rr_monetary_shock_annual |
merge m:1 | year |
tab year if _merge==2 |
Replication_Code_sector_productivity_projections.do:68Replication_Code_sector_productivity_projections.do, line 68
merge m:1 year using "data/Monetary_shocks/RR_monetary_shock_annual" |
bls_annual_prod_clean ← gw_clean_annual |
merge m:1 | year |
tab year if _merge==2 |
Replication_Code_sector_productivity_projections.do:72Replication_Code_sector_productivity_projections.do, line 72
merge m:1 year using "data/Gorodnichenko_Weber_2016/GW_clean_annual" |
bls_annual_prod_clean ← concentration_ratios_2002 |
merge m:1 | naics_code |
drop _merge |
Replication_Code_sector_productivity_projections.do:95Replication_Code_sector_productivity_projections.do, line 95
merge m:1 naics_code using "data/Census_Mfg_Concentration/concentration_ratios_`concentration_year'" |
quarterly_tfp_clean ← aggregate_markup_mu_li_annual |
merge m:1 | year |
drop _merge |
Replication_Code_TFP_local_projections.do:20Replication_Code_TFP_local_projections.do, line 20
merge m:1 year using "data/markup_estimates/aggregate_markup_mu_li_annual" |
quarterly_tfp_clean ← quarterly_aggregates_clean |
merge m:1 | year quarter |
drop _merge |
Replication_Code_TFP_local_projections.do:33Replication_Code_TFP_local_projections.do, line 33
merge m:1 year quarter using "data/data_temp/quarterly_aggregates_clean" |
quarterly_tfp_clean ← rr_monetary_shock_quarterly |
merge 1:1 | date |
drop _merge |
Replication_Code_TFP_local_projections.do:37Replication_Code_TFP_local_projections.do, line 37
merge 1:1 date using "data/Monetary_shocks/RR_monetary_shock_quarterly" |
4 · The sample — 55 keep/drop steps, 12 variables winsorized or trimmed
Filters, by kind
industry screens ×1
- drop if
naics3==491Replication_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==19680206Replication_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>20080000Replication_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)<1978Replication_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 < 1973Replication_Code_create_quarterly_dataset.do:224
Replication_Code_create_quarterly_dataset.do, line 224 drop if year < 1973 - drop if
year > 2019Replication_Code_create_quarterly_dataset.do:225
Replication_Code_create_quarterly_dataset.do, line 225 drop if year > 2019 - drop if
year >= 2008Replication_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<=2Replication_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_shareReplication_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']==aReplication_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 > 0Replication_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']!=0Replication_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']==aReplication_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 > 0Replication_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']!=0Replication_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==4Replication_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==4Replication_Code_sector_productivity_projections.do:58
Replication_Code_sector_productivity_projections.do, line 58 keep if naics_level==4 - keep if
display_level==3Replication_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==2Replication_Code_estimate_quarterly_markups.do:64
Replication_Code_estimate_quarterly_markups.do, line 64 drop if _merge==2 - drop if
_merge==2Replication_Code_estimate_quarterly_markups.do:122
Replication_Code_estimate_quarterly_markups.do, line 122 drop if _merge==2 - drop if
_merge==2Replication_Code_estimate_quarterly_markups.do:207
Replication_Code_estimate_quarterly_markups.do, line 207 drop if _merge==2 - drop if
_merge==2Replication_Code_estimate_quarterly_markups.do:230
Replication_Code_estimate_quarterly_markups.do, line 230 drop if _merge==2 - drop if
_merge==2Replication_Code_estimate_quarterly_markups.do:325
Replication_Code_estimate_quarterly_markups.do, line 325 drop if _merge==2 - drop if
_merge==2Replication_Code_aggregate_quarterly_markups.do:101
Replication_Code_aggregate_quarterly_markups.do, line 101 drop if _merge==2 - drop if
_merge==2Replication_Code_create_quarterly_dataset.do:188
Replication_Code_create_quarterly_dataset.do, line 188 drop if _merge==2 - drop if
_merge==2Replication_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_winReplication_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_ratioReplication_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_10predReplication_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_10Replication_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_mappedReplication_Code_estimate_quarterly_markups.do:176
Replication_Code_estimate_quarterly_markups.do, line 176 replace naics3 = naics3_mapped if naics3==.naics2→naics2_mappedReplication_Code_estimate_quarterly_markups.do:177
Replication_Code_estimate_quarterly_markups.do, line 177 replace naics2 = naics2_mapped if naics2==.cap_with_intan→capReplication_Code_estimate_quarterly_markups.do:342
Replication_Code_estimate_quarterly_markups.do, line 342 replace cap_with_intan = cap if cap_with_intan==.gnp→philgnpReplication_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→0Replication_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→0Replication_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→0Replication_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) (), Cash Holdings (), Intangible Assets (), Log Total Assets (), Operating Margin (), R&D Intensity ()
cfatq Replication_Code_estimate_quarterly_markups.do:286
Replication_Code_estimate_quarterly_markups.do, line 286
g cfatq = cfq/l.atq
caq Replication_Code_estimate_quarterly_markups.do:40
Replication_Code_estimate_quarterly_markups.do, line 40
g caq = cheq / atq
intanatq Replication_Code_estimate_quarterly_markups.do:298
Replication_Code_estimate_quarterly_markups.do, line 298
g intanatq = intanq/atq
logatq Replication_Code_estimate_quarterly_markups.do:244
Replication_Code_estimate_quarterly_markups.do, line 244
g logatq = log(atq)
li Replication_Code_estimate_quarterly_markups.do:253
Replication_Code_estimate_quarterly_markups.do, line 253
g li = (oibdpq - dpq) / saleq
xrdatq Replication_Code_estimate_quarterly_markups.do:249
Replication_Code_estimate_quarterly_markups.do, line 249
g xrdatq = xrdq/atq
| Variable | Used in models as | Built by |
|---|---|---|
u_structural |
outcome in 7, endogenous in 1 | u_structural = uvar_T2Y (gen) Replication_Code_create_quarterly_dataset.do:240Replication_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:98Replication_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:110Replication_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:537Replication_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:489Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 489
replace grad1 = 3.5 if release_date==mdy(8,12,1970); |
grad2 |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
gradm |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
grau0 |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
gray0 |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
gray1 |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
gray2 |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
graym |
regressor in 2 | graym = 0.3 (replace) Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:486Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 486
replace graym = 0.3 if release_date==mdy(7,15,1970); |
igrd0 |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
igrd1 |
regressor in 2 | igrd1 = igrd1+0.2 (replace) Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:490Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 490
replace igrd1 = igrd1+0.2 if release_date==mdy(8,12,1970); igrd1 = igrd1-0.2 (replace) Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:491Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 491
replace igrd1 = igrd1-0.2 if release_date==mdy(9,9,1970); |
igrd2 |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
igrdm |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
igry0 |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
igry1 |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
igry2 |
regressor in 2 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
igrym |
regressor in 2 | igrym = igrym+0.1 (replace) Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:487Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 487
replace igrym = igrym+0.1 if release_date==mdy(7,15,1970); igrym = igrym-0.1 (replace) Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do:488Replication_Code_data_Monetary_shocks_RR_monetary_shock_update.do, line 488
replace igrym = igrym-0.1 if release_date==mdy(8,12,1970); |
FF4surprisesbyGSS |
regressor in 1 | FF4surprisesbyGSS = FF4surprisesbyGSS_phiwt + L1.FF4surprisesbyGSS_antiphiwt (gen) Replication_Code_create_quarterly_dataset.do:142Replication_Code_create_quarterly_dataset.do, line 142
g FF4surprisesbyGSS = FF4surprisesbyGSS_phiwt + L1.FF4surprisesbyGSS_antiphiwt FF4surprisesbyGSS = FF4surprisesbyGSS_phiwt (replace) Replication_Code_create_quarterly_dataset.do:145Replication_Code_create_quarterly_dataset.do, line 145
replace FF4surprisesbyGSS = FF4surprisesbyGSS_phiwt if FF4surprisesbyGSS==. |
GertlerKaradi |
regressor in 1 | GertlerKaradi = GertlerKaradi_phiwt + L1.GertlerKaradi_antiphiwt (gen) Replication_Code_create_quarterly_dataset.do:141Replication_Code_create_quarterly_dataset.do, line 141
g GertlerKaradi = GertlerKaradi_phiwt + L1.GertlerKaradi_antiphiwt GertlerKaradi = GertlerKaradi_phiwt (replace) Replication_Code_create_quarterly_dataset.do:144Replication_Code_create_quarterly_dataset.do, line 144
replace GertlerKaradi = GertlerKaradi_phiwt if GertlerKaradi==. |
MPI_FF4 |
regressor in 1 | MPI_FF4 = MPI_FF4_phiwt + L1.MPI_FF4_antiphiwt (gen) Replication_Code_create_quarterly_dataset.do:110Replication_Code_create_quarterly_dataset.do, line 110
g MPI_FF4 = MPI_FF4_phiwt + L1.MPI_FF4_antiphiwt MPI_FF4 = MPI_FF4_phiwt (replace) Replication_Code_create_quarterly_dataset.do:112Replication_Code_create_quarterly_dataset.do, line 112
replace MPI_FF4 = MPI_FF4_phiwt if MPI_FF4==. |
MPS_ORTH |
regressor in 1 | MPS_ORTH = MPS_ORTH_phiwt + L1.MPS_ORTH_antiphiwt (gen) Replication_Code_create_quarterly_dataset.do:166Replication_Code_create_quarterly_dataset.do, line 166
g MPS_ORTH = MPS_ORTH_phiwt + L1.MPS_ORTH_antiphiwt MPS_ORTH = MPS_ORTH_phiwt (replace) Replication_Code_create_quarterly_dataset.do:167Replication_Code_create_quarterly_dataset.do, line 167
replace MPS_ORTH = MPS_ORTH_phiwt if MPS_ORTH==. |
infl_ |
regressor in 1 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
tight_surprise |
regressor in 1 | tight_surprise = tight_surprise_phiwt + L1.tight_surprise_antiphiwt (gen) Replication_Code_create_quarterly_dataset.do:83Replication_Code_create_quarterly_dataset.do, line 83
g tight_surprise = tight_surprise_phiwt + L1.tight_surprise_antiphiwt tight_surprise = tight_surprise_phiwt + L1.tight_surprise_antiphiwt (gen) Replication_Code_sector_productivity_projections.do:25Replication_Code_sector_productivity_projections.do, line 25
g tight_surprise = tight_surprise_phiwt + L1.tight_surprise_antiphiwt tight_surprise = tight_surprise_phiwt (replace) Replication_Code_create_quarterly_dataset.do:85Replication_Code_create_quarterly_dataset.do, line 85
replace tight_surprise = tight_surprise_phiwt if tight_surprise==. +1 more statements set it |
wide_surprise |
regressor in 1 | wide_surprise = wide_surprise_phiwt + L1.wide_surprise_antiphiwt (gen) Replication_Code_create_quarterly_dataset.do:84Replication_Code_create_quarterly_dataset.do, line 84
g wide_surprise = wide_surprise_phiwt + L1.wide_surprise_antiphiwt wide_surprise = wide_surprise_phiwt + L1.wide_surprise_antiphiwt (gen) Replication_Code_sector_productivity_projections.do:26Replication_Code_sector_productivity_projections.do, line 26
g wide_surprise = wide_surprise_phiwt + L1.wide_surprise_antiphiwt wide_surprise = wide_surprise_phiwt (replace) Replication_Code_create_quarterly_dataset.do:86Replication_Code_create_quarterly_dataset.do, line 86
replace wide_surprise = wide_surprise_phiwt if wide_surprise==. +1 more statements set it |
y |
regressor in 1 | y = x.loc[~pd.isna(x[[wt, var1, var2]]).any(axis=1)] (assign) Replication_Code_add_markup_covariances.py:10Replication_Code_add_markup_covariances.py, line 10
y = x.loc[~pd.isna(x[[wt, var1, var2]]).any(axis=1)] y = x.loc[~pd.isna(x[[wt, var]]).any(axis=1)] (assign) Replication_Code_add_markup_covariances.py:15Replication_Code_add_markup_covariances.py, line 15
y = x.loc[~pd.isna(x[[wt, var]]).any(axis=1)] y = shares / prices (assign) Replication_Code_statics_calibrations.py:48Replication_Code_statics_calibrations.py, line 48
y = shares / prices +4 more statements set it |
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
| Command | Outcome | Regressors | Fixed effects | Standard errors | Where |
|---|---|---|---|---|---|
reghdfepanel 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:108Replication_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
| Command | Outcome | Regressors | Fixed effects | Standard errors | Where |
|---|---|---|---|---|---|
regressols |
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:532Replication_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 … |
regressols |
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:536Replication_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 … |
regressols |
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:542Replication_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; |
regressols |
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:545Replication_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; |
regressols |
exp_infl_10 |
infl_*y
|
— | default | Replication_Code_estimate_quarterly_markups.do:108Replication_Code_estimate_quarterly_markups.do, line 108
regress exp_infl_10 infl_*y |
vartime series |
— |
— | default | Replication_Code_create_quarterly_dataset.do:236Replication_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 |
|
ivregressiv |
uvar_`v' |
endogenous:
u_structural instruments: resid_full |
— | default | Replication_Code_create_quarterly_dataset.do:242Replication_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)
|
ivregressiv |
uvar_T2Y |
endogenous:
uvar_log_indpro_hp instruments: vvar_log_indpro_hp |
— | default | Replication_Code_create_quarterly_dataset.do:246Replication_Code_create_quarterly_dataset.do, line 246
ivregress 2sls uvar_T2Y (uvar_log_indpro_hp = vvar_log_indpro_hp) |
ivregressiv |
uvar_T2Y |
endogenous:
uvar_log_cpi_hp instruments: vvar_log_cpi_hp |
— | default | Replication_Code_create_quarterly_dataset.do:247Replication_Code_create_quarterly_dataset.do, line 247
ivregress 2sls uvar_T2Y (uvar_log_cpi_hp = vvar_log_cpi_hp) |
ivregressiv |
uvar_T2Y |
endogenous:
uvar_ebp instruments: vvar_ebp |
— | default | Replication_Code_create_quarterly_dataset.do:248Replication_Code_create_quarterly_dataset.do, line 248
ivregress 2sls uvar_T2Y (uvar_ebp = vvar_ebp) |
regressols |
u_structural |
resid_full
|
— | default | Replication_Code_create_quarterly_dataset.do:252Replication_Code_create_quarterly_dataset.do, line 252
qui regress u_structural resid_full |
regressols |
u_structural |
MPI_FF4
|
— | default | Replication_Code_create_quarterly_dataset.do:254Replication_Code_create_quarterly_dataset.do, line 254
qui regress u_structural MPI_FF4 |
regressols |
u_structural |
GertlerKaradi
|
— | default | Replication_Code_create_quarterly_dataset.do:256Replication_Code_create_quarterly_dataset.do, line 256
qui regress u_structural GertlerKaradi |
regressols |
u_structural |
FF4surprisesbyGSS
|
— | default | Replication_Code_create_quarterly_dataset.do:258Replication_Code_create_quarterly_dataset.do, line 258
qui regress u_structural FF4surprisesbyGSS |
regressols |
u_structural |
tight_surprise
|
— | default | Replication_Code_create_quarterly_dataset.do:260Replication_Code_create_quarterly_dataset.do, line 260
qui regress u_structural tight_surprise |
regressols |
u_structural |
wide_surprise
|
— | default | Replication_Code_create_quarterly_dataset.do:262Replication_Code_create_quarterly_dataset.do, line 262
qui regress u_structural wide_surprise |
regressols |
u_structural |
MPS_ORTH
|
— | default | Replication_Code_create_quarterly_dataset.do:264Replication_Code_create_quarterly_dataset.do, line 264
qui regress u_structural MPS_ORTH |
neweyols |
`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:53Replication_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…)
|
xtregpanel 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:124Replication_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…)
|
regressols |
`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:127Replication_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…)
|
regressols |
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:107Replication_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)
|
neweyols |
cum`h'_`tfp_var' |
l(0/4).resid_full L(1/4).`tfp_var'
|
— | newey_west | Replication_Code_TFP_local_projections.do:64Replication_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
| command | layers | variables | options | saved as | where |
|---|---|---|---|---|---|
coefplotevent-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:70Replication_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( … |
coefplotevent-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:73Replication_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.plotline
|
line |
y var_list[plot_ind][:tmax] * rescale
|
title titlesplot_ind · panels subplots |
not saved | Replication_Code_compare_menucost_IRFs.py:24Replication_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))) |
coefplotevent-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:69Replication_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 … |
coefplotevent-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:144Replication_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.plotline
|
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:436Replication_Code_kimball_dynamics.py, line 436
fig = plt.figure() |
plt.plotline
|
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:443Replication_Code_kimball_dynamics.py, line 443
fig = plt.figure() |
plt.plotline
|
line |
y var_logmu[:t_max]
x range(t_max)
|
xtitle Quarters · ytitle $Var_{\lambda}(\log \mu)$ |
not saved | Replication_Code_kimball_dynamics.py:455Replication_Code_kimball_dynamics.py, line 455
fig = plt.figure() |
ax.plotline
|
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:460Replication_Code_kimball_dynamics.py, line 460
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:479Replication_Code_kimball_dynamics.py, line 479
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:637Replication_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))) |
ax.plotline
|
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:655Replication_Code_kimball_dynamics.py, line 655
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:675Replication_Code_kimball_dynamics.py, line 675
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:703Replication_Code_kimball_dynamics.py, line 703
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:720Replication_Code_kimball_dynamics.py, line 720
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:746Replication_Code_kimball_dynamics.py, line 746
fig,axs = plt.subplots(1,2) |
plt.plotline
|
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:436Replication_Code_kimball_dynamics_Table6.py, line 436
fig = plt.figure() |
plt.plotline
|
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:443Replication_Code_kimball_dynamics_Table6.py, line 443
fig = plt.figure() |
plt.plotline
|
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:455Replication_Code_kimball_dynamics_Table6.py, line 455
fig = plt.figure() |
ax.plotline
|
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:460Replication_Code_kimball_dynamics_Table6.py, line 460
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:479Replication_Code_kimball_dynamics_Table6.py, line 479
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:637Replication_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))) |
ax.plotline
|
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:655Replication_Code_kimball_dynamics_Table6.py, line 655
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:675Replication_Code_kimball_dynamics_Table6.py, line 675
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:703Replication_Code_kimball_dynamics_Table6.py, line 703
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:720Replication_Code_kimball_dynamics_Table6.py, line 720
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:746Replication_Code_kimball_dynamics_Table6.py, line 746
fig,axs = plt.subplots(1,2) |
ax.plotline
|
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:80Replication_Code_klenow_willis.py, line 80
fig,axs = plt.subplots(3,1, figsize=(4,8)) |
plt.plotline
|
line |
y passthroughs
x np.linspace(0,1,N_firms)
|
title None |
not saved | Replication_Code_klenow_willis.py:90Replication_Code_klenow_willis.py, line 90
plt.figure() |
plt.plotline
|
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:97Replication_Code_klenow_willis.py, line 97
plt.figure() |
ax.plotline
|
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:121Replication_Code_klenow_willis.py, line 121
fig,axs = plt.subplots(1,2, figsize=(8,4)) |
plt.plotline
|
line |
y mu_levels
|
xtitle Period · ytitle Markup (by productivity level) |
not saved | Replication_Code_menu_costs_CES.py:395Replication_Code_menu_costs_CES.py, line 395
plt.plot(mu_levels.T) |
plt.plotline
|
line |
y mu_levels[MASK_LO:MASK_HI,:].T
|
xtitle Period · ytitle Markup (by productivity level) |
not saved | Replication_Code_menu_costs_CES.py:402Replication_Code_menu_costs_CES.py, line 402
plt.plot(mu_levels[MASK_LO:MASK_HI,:].T) |
ax.plotline
|
line |
y var_list[plot_ind][:tmax] * rescale
|
title titlesplot_ind · panels subplots |
savename |
Replication_Code_menu_costs_CES.py:570Replication_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))) |
ax.plotline
|
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:581Replication_Code_menu_costs_CES.py, line 581
fig,axs = plt.subplots(1,2,figsize=(8,4)) |
plt.plotline
|
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:608Replication_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))) |
plt.plotline
|
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:637Replication_Code_menu_costs_CES.py, line 637
fig = plt.figure() |
DataFrame.plotbar
|
bar |
y binned_price_change_density
|
xtitle $d\log p$ · ytitle Density |
not saved | Replication_Code_menu_costs_CES.py:669Replication_Code_menu_costs_CES.py, line 669
binned_price_change_density.plot(kind='bar', width=1.0) |
plt.plotline
|
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:704Replication_Code_menu_costs_CES.py, line 704
plt.plot(np.linspace(0,1,n_A), fpa_arr) |
ax.plotline
|
line |
y var_list[plot_ind][:tmax] * rescale
|
title titlesplot_ind · panels subplots |
savename |
Replication_Code_menu_costs_CES.py:715Replication_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))) |
ax.plotline
|
line |
y var_list[plot_ind][:tmax] * rescale
|
title titlesplot_ind · panels subplots |
saveprefix + '.png |
Replication_Code_menu_costs_CES.py:733Replication_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))) |
ax.plotline
|
line |
y var_list[plot_ind][:tmax] * rescale
|
title titlesplot_ind · panels subplots |
saveprefix + '.png |
Replication_Code_menu_costs_CES.py:755Replication_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))) |
Series.plot.barbar
|
bar |
y cov_df
|
ytitle Covariance of markups with realized passthrough |
not saved | Replication_Code_menu_costs_CES.py:834Replication_Code_menu_costs_CES.py, line 834
cov_df.T.plot.bar() |
plt.plotline
|
line |
y mu_levels
|
xtitle Period · ytitle Markup (by productivity level) |
not saved | Replication_Code_menu_costs_Kimball.py:393Replication_Code_menu_costs_Kimball.py, line 393
plt.plot(mu_levels.T) |
plt.plotline
|
line |
y mu_levels[MASK_LO:MASK_HI,:].T
|
xtitle Period · ytitle Markup (by productivity level) |
not saved | Replication_Code_menu_costs_Kimball.py:400Replication_Code_menu_costs_Kimball.py, line 400
plt.plot(mu_levels[MASK_LO:MASK_HI,:].T) |
ax.plotline
|
line |
y var_list[plot_ind][:tmax] * rescale
|
title titlesplot_ind · panels subplots |
savename |
Replication_Code_menu_costs_Kimball.py:673Replication_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))) |
ax.plotline
|
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:684Replication_Code_menu_costs_Kimball.py, line 684
fig,axs = plt.subplots(1,2,figsize=(8,4)) |
plt.plotline
|
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:711Replication_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))) |
DataFrame.plotbar
|
bar |
y binned_price_change_density
|
xtitle $d\log p$ · ytitle Density |
not saved | Replication_Code_menu_costs_Kimball.py:767Replication_Code_menu_costs_Kimball.py, line 767
binned_price_change_density.plot(kind='bar', width=1.0) |
plt.plotline
|
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:802Replication_Code_menu_costs_Kimball.py, line 802
plt.plot(np.linspace(0,1,n_A), fpa_arr) |
plt.scatterscatter
|
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:141Replication_Code_statics_calibrations.py, line 141
plt.figure() |
plt.plotline
|
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:175Replication_Code_statics_calibrations.py, line 175
plt.figure() |
ax.scatterscatter
|
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:194Replication_Code_statics_calibrations.py, line 194
fig,axs = plt.subplots(2,2, figsize=FIG_SIZE_2x2) |
plt.plotline
|
line |
y passthrough
x norm_rank
|
not saved | Replication_Code_statics_calibrations.py:206Replication_Code_statics_calibrations.py, line 206
plt.figure() |
|
plt.plotline
|
line |
y markup
x norm_rank
|
not saved | Replication_Code_statics_calibrations.py:211Replication_Code_statics_calibrations.py, line 211
plt.figure() |
|
plt.histhistogram
|
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:223Replication_Code_statics_calibrations.py, line 223
plt.figure() |
plt.histhistogram
|
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:232Replication_Code_statics_calibrations.py, line 232
plt.figure() |
plt.plotline
|
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:241Replication_Code_statics_calibrations.py, line 241
plt.figure() |
ax.scatterscatter
|
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:253Replication_Code_statics_calibrations.py, line 253
fig,axs = plt.subplots(1,2, figsize=FIG_SIZE_1x2) |
plt.scatterscatter
|
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:303Replication_Code_statics_calibrations.py, line 303
plt.figure() |
the first 60 of 78, in file and line order