Instrumental variables
How the design is counted — the same count on the recipe, outcomes and methods pages
- The universe is every replication package our extractors have read (code_model_design) that is linked to a live paper by a confirmed link; the field is the linked paper's.
- A package is in a design when (a) our extractor found the design's identification pattern on a line of code it runs (not a path, a folder macro, an export or an install line), or (b) it runs a model of the design's own estimator family. An ivreg2 / ivreghdfe call with no (endog = z) group counts for neither: it is OLS with robust or HAC errors, not IV.
- Panel fixed effects is the rest: a fixed-effects estimation and none of the other designs. A package can be in several designs (not panel FE).
- A model is an estimation OF the design only when the model itself carries the design's signature; the recipe's estimation choices, the outcomes, the instruments and every example are read from those models.
- This design's signature in a model: an excluded instrument: an (endog = z) group, an instrument list, or R's ivreg(y ~ x | z) / felm(... | d ~ z).
- 1,421 packages declare the design in code; 1799 are in it by their estimator (a package can be both).
Adoption over time — the dedicated estimator
Share of each publication year's packages with parsed models that run this estimator at least once (hover for counts). Grey years have fewer than 10 packages and are not a trend; package coverage is thin before ~2010, when journal data policies began.
Validation practice
Of the 1,899 packages in the design, how many run each standard check (read from the code; the same checks and numbers as the recipe). A check run under a macro or in a file we could not read is missed, so these are lower bounds. Greyed: fewer than 10 packages.
What it is used to study
The dependent variables of this design's estimations, read from the model roles we read from the code. Of the 1,899 packages in the design, 1,799 have a model that shows the design itself, and 1,666 of those have a readable outcome (41,330 models; for 466 packages some outcome is read only through a loop's expansion). Shares are of those 1,666 packages, one count per package; greyed rows rest on fewer than 10. An outcome that is a taxonomy measure's variable in the same package is shown as the measure; other names are grouped by what they name. Compare every design →
How this is counted
- The unit is the package: a package counts once for an outcome, measure or instrument type however many of its models carry it; the model count is shown second.
- A design's packages are the ONE design membership every page shows (identification fact on a line of code, or the design's own estimator). Its models are the ones that carry the design's signature in the model itself — a DiD estimator or a treatment × post term, event-time dummies or an abnormal-return outcome, an excluded instrument, an RD estimator or a bandwidth around a cutoff, a matching estimator or matched weights. A package with none of those models is counted in the design but has no outcome here.
- Roles are read from each model's literal row. Only where a literal role still holds a macro (`y', $dep) are the loop-expanded rows written on the same line read for that role; an expanded row whose literal row is resolved adds nothing, and an unresolved role with no expansion is dropped.
- An outcome is a taxonomy measure when the dependent variable is that measure's variable in the same package; otherwise it is grouped by its name (a word list, field-aware for short names like car, q, ret); otherwise it is shown as the bare variable.
- Instruments are the EXCLUDED ones: a term also among the model's regressors is an included control. Types are read from the name (and L. / lag for lagged values). Where the name says nothing (`z`, `shock`, `iv1`), the instrument is traced to the statement in the package that builds it, up to three statements back, and typed by that statement's shape — (total − own)/(n − 1) a leave-out mean, L.x or x[_n-1] a lag, predict after a model a predicted value, a by-group sum of share × shock a shift-share, geodist a distance — or by the name of the one variable it copies or transforms. Products, thresholds and aggregates of other variables are not read, and an instrument nothing reliable types stays untyped. Each such example shows the statement, linked to its line.
Finance — 214 of 241 packages have a readable outcome
-
credit / lending / default8% · 17written as
FD3_GFDD_NPL,approved,ch_loans_full_assets,ch_loans_full_assetsu,d73to78_loans4 examples in the code
- The Rise of Finance Companies and FinTech Lenders in Small Business Lending
Review of Financial Studies 2022 · pkg 4
code/figures_and_tables.do:1655 ·
loans_07_160eststo p8: ivreghdfe loans_07_160 `controls' (bank_change_tot_share = pre_crisis_bank_share), abs(state) cluster(county) first
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo p8: ivreghdfe loans_07_160 unemp_rate_2002_2006 lfp_rate_2002_2006 est_2002_2006 wage_2002_2006 log_pop unemp_rate2005 lfp_rate2005 wage2005 (bank_change_tot_share = pre_crisis_bank_share), abs …
- Student Loans, Access to Credit, and Consumer Credit Demand
Review of Financial Studies 2024 · pkg 175
Rest_of_Code_Step3_25_2SLS_IntensiveMargin_NonRevDebt_Fig_11.do:427 ·
mortgage_hicredit_22(loop-expanded: inst=sum_i4; depvar=mortgage_hicredit_)xtivreg `depvar'22 (tot_fedloans_22 = c.`inst'_`s'#c.ever_with_pub4_22) ever_with_pub4_22
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):xtivreg `depvar'22 (tot_fedloans_22 = c.`inst'_st_e_new#c.ever_with_pub4_22) ever_with_pub4_22 nocollege_22 degree_AS_22 degree_BA_22 degree_MA_22 degree_butunknown_22 ever_with_pub2_22 ever_with_priv …
- Collateral Effects: The Role of FinTech in Small Business Lending
Review of Financial Studies 2026 · pkg 205
eststo second: ivreghdfe lloan (p2pqtrcapturing=scoredeltapost) post volloanv $control_0 if deltaqdummy, cl(siren) a(qdate siren)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo second: ivreghdfe lloan (p2pqtrcapturing=scoredeltapost) post volloanv `"*_0 dum_*"' if deltaqdummy, cl(siren) a(qdate siren)
- When Two Become One: Foreign Capital and Household Credit Expansion
Review of Financial Studies 2026 · pkg 256
Do_Files/4_Tables.do:846 ·
FD3_GFDD_NPLxtivreg2 FD3_GFDD_NPL Fd3y LD3_HH_HH_RD_GDP LD3_HH_GG_RD_GDP (LD3_HH_RoTW_RD_GDP=LD3supply_GDP) LD3_B_L_NonFiInLoans_GDP LD3_CA_IFSorWEO_GDP, fe cluster(id Year) first
- The Rise of Finance Companies and FinTech Lenders in Small Business Lending
Review of Financial Studies 2022 · pkg 4
-
sales / output / quantities / productivity8% · 17written as
log_gdp_d(2),E_gdp,SALES_IC_1d,Sales_rank,d_logsale4 examples in the code
- The Rise of Star Firms: Intangible Capital and Competition
Review of Financial Studies 2024 · pkg 131
qui: xi: eststo: ivreghdfe `v1' L.LIC L.Lage (L.impUSA=L.impOTH), first cluster(naics2007_4dig) absorb(year naics2007_4dig)
- The Effects of Going Public on Firm Profitability and Strategy
Review of Financial Studies 2025 · pkg 203
Replication_Do_files_Main_Tables_7-Table_7.do:26 ·
log_sales_wqui xtivreg2 log_sales_w (IPO=instrument) deventyear2 deventyear3 deventyear4 deventyear5 dsic1year* dmonth* , fe first cluster(id) partial(deventyear2 deventyear3 deventyear4 deventyear5 dsic1year* d …
- The Product Market Effects of Index Inclusion
Review of Financial Studies 2026 · pkg 292
code/03_tables.do:245 ·
d_quantity_ln_t_tp1eststo: ivreghdfe d_quantity_ln_t_tp1 (d_qix = r_1_to_2 r_2_to_1) $running_1 $controls, a(year#prod_cat year#industry) clus(firm)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo: ivreghdfe d_quantity_ln_t_tp1 (d_qix = r_1_to_2 r_2_to_1) d_total_mv_ln d_ff_rus band band_d02, a(year#prod_cat year#industry) clus(firm)
- Managerial Ownership in a Private Firm Framework
Review of Corporate Finance Studies 2026 · pkg 7272
Managerial_Ownership_in_a_Private_Firm_Framework_Replication_Code_-_Pseudo_Data.do:245 ·
sales_growth(loop-expanded: i=sales_growth)ivreghdfe `i' l_ln_assets l_ln_sales l_ppe_assets l_capex l_lev age l_sga_rev (l_ownership = bank1), a(year) cl(company) first
- The Rise of Star Firms: Intangible Capital and Competition
Review of Financial Studies 2024 · pkg 131
-
employment / labour supply7% · 14written as
emp(2),d_hrs,d_lnemp_0107,d_lnemp_9600,d_logemp4 examples in the code
- The Impact of the Opioid Crisis on Firm Value and Investment
Review of Financial Studies 2025 · pkg 133
ivreghdfe emp (opioid=provprob), a(`fe') cluster(FIPS)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe emp (opioid=provprob), a(gfe plantyp) cluster(FIPS)
- The Effects of Going Public on Firm Profitability and Strategy
Review of Financial Studies 2025 · pkg 203
Replication_Do_files_Main_Tables_7-Table_7.do:56 ·
sales_empl_wqui xtivreg2 sales_empl_w (IPO=instrument) deventyear2 deventyear3 deventyear4 deventyear5 dsic1year* dmonth* , fe first cluster(id) partial(deventyear2 deventyear3 deventyear4 deventyear5 dsic1year* …
- Managerial Ownership in a Private Firm Framework
Review of Corporate Finance Studies 2026 · pkg 7272
Managerial_Ownership_in_a_Private_Firm_Framework_Replication_Code_-_Pseudo_Data.do:245 ·
delta_emp(loop-expanded: i=delta_emp)ivreghdfe `i' l_ln_assets l_ln_sales l_ppe_assets l_capex l_lev age l_sga_rev (l_ownership = bank1), a(year) cl(company) first
- Credit Environment and Small Business Dynamics: Evidence from Establishment-Level Data
Review of Corporate Finance Studies 2023 · pkg 7317
ivreghdfe y_emp ($boom = $boom_iv), absorb(county#g_emp year) cluster(county)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe y_emp (xboom 10.g_emp#c.xboom 50.g_emp#c.xboom = xboom_iv 10.g_emp#c.xboom_iv 50.g_emp#c.xboom_iv), absorb(county#g_emp year) cluster(county)
- The Impact of the Opioid Crisis on Firm Value and Investment
Review of Financial Studies 2025 · pkg 133
-
prices / inflation / rents7% · 14written as
Wtd_price_diff,d2ln_hh_tot_prc,d_price_ln_t_tp1,inflation,interest_rate_prc4 examples in the code
- Effects of Credit Expansions on Stock Market Booms and Busts
Review of Financial Studies 2025 · pkg 196
ivreghdfe price590 (F.price590=f(2/3).d) d if vintage!=1 & vintage!=0 ,cl(code ) a(code date2)
- Corporate Bond Liquidity during the COVID-19 Crisis
Review of Financial Studies 2021 · pkg 237
Replicating_sigma_estimates.R:124 ·
Wtd_price_diffIV_reg_volc <- ivreg( Wtd_price_diff ~ LN + dum_SMCCF_expansion | Deseasonalized_ln_vol_C2 + dum_SMCCF_expansion, data = Regdata)
- The Product Market Effects of Index Inclusion
Review of Financial Studies 2026 · pkg 292
code/02_figures.do:299 ·
d_price_ln_t_tp1eststo: ivreghdfe d_price_ln_t_tp1 (d_qix = r_1_to_2 r_2_to_1) $running_3 $controls if share_product_module==`i', a(year#prod_cat year#industry) clus(firm) nocollin noid
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo: ivreghdfe d_price_ln_t_tp1 (d_qix = r_1_to_2 r_2_to_1) d_total_mv_ln d_total_mv_ln_sq d_total_mv_ln_cu d_ff_rus band band_d02 if share_product_module==`i', a(year#prod_cat year#industry) clus( …
- Did pandemic relief fraud inflate house prices?
Journal of Financial Economics 2026 · pkg 14273
Replication Package/Code/Stata/FigIA28.do:21 ·
price_change_20_21ivreghdfe price_change_20_21 log_pop_density vacancy_rate log_housing log_income share_within_50mi share_within_150mi i.prev_price_change_percentile i.loans_per_capita_percentile i.high_median_income …
- Effects of Credit Expansions on Stock Market Booms and Busts
Review of Financial Studies 2025 · pkg 196
-
stock returns / abnormal returns6% · 12written as
basis_return,car2,ch_secured_ar,cum_return,e_ret_2015_pop4 examples in the code
- Monetary Policy, Business Liquidity and Survival: Evidence from the Refinancing Channel
Review of Financial Studies 2023 · pkg 88
RFS_final_code.do:760 ·
win_loc_ret_chgivreghdfe win_loc_ret_chg (refi_pct_2009=pdum3) median_income2009_ln pop2010_ln percent_white2009 percent_black2009 if pdum2!=1 [aw=pop2010], absorb(state) cluster(state) first
- Finding Fortune: How Do Institutional Investors Pick Asset Managers?
Review of Financial Studies 2023 · pkg 229
RepFiles4RFS_function_calls_Table6output.do:97 ·
xret_style_nr_tbeststo A4: ivregress 2sls ${indep1}_tb (laum_tb = laum_bb), nocons vce(cl fundid)As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo A4: ivregress 2sls xret_style_nr_tb (laum_tb = laum_bb), nocons vce(cl fundid)
- A Catering Theory of Earnings Guidance: Empirical Evidence and Stock Market Implications
Journal of Financial and Quantitative Analysis 2026 · pkg 14132
02_RCodeManagerialGuidance.R:1519 ·
guidance_carc1 <- ivreg(data = guidance, guidance_car ~ bias + beta + size + bm + horizon + loss_d + process + prev_bias + op + analysts + disp + vola + stock_issues_d + sentiment + sic_two + year | cgo + beta + …
- Capital Allocation and the Market for Mutual Funds: Inspecting the Mechanism
Journal of Financial and Quantitative Analysis 2026 · pkg 14140
qui ivreg2 fd`y' (fdLogRealSize_lag = One LogRealSize_lag) if year(dofm(tm))>1990&!last, cl(FundId2 clust) noc
- Monetary Policy, Business Liquidity and Survival: Evidence from the Refinancing Channel
Review of Financial Studies 2023 · pkg 88
-
investment / capex / R&D5% · 11written as
Investment,RD_Chg,capex_ra_h1,capx_IC_1d,capx_aqc_at4 examples in the code
- Health Care Costs and Corporate Investment
Review of Financial Studies 2024 · pkg 63
ivreghdfe `var' `controls' (log_prem_percapita= `health' `controls'), absorb(fyear gvkey) cluster(state_n)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe `var' l1_firm_logat l1_firm_cash2lat l1_firm_netprofitmargin l1_firm_logppent l1_firm_q firm_logage l1_unemployment_rate l1_log_personalincome_adj (log_prem_percapita= `health' l1_firm_logat …
- Return Predictability, Expectations, and Investment: Experimental Evidence
Review of Financial Studies 2025 · pkg 105
quietly ivreghdfe invest (forecast = a) if (wave==1 | wave==2 | wave==3 | wave==4) & correct_flag==1 & per_predict==1, a(plabel order) vce(cluster order) //no clustering on individuals (plabels) becau …
- The Rise of Star Firms: Intangible Capital and Competition
Review of Financial Studies 2024 · pkg 131
qui: xi: eststo: ivreghdfe `v1' L.LIC L.Lage (L.impUSA=L.impOTH), first cluster(naics2007_4dig) absorb(year naics2007_4dig)
- The Product Market Effects of Index Inclusion
Review of Financial Studies 2026 · pkg 292
code/03_tables.do:383 ·
d_capex_t_tp1eststo: ivreghdfe d_capex_t_tp1 (d_qix= r_1_to_2 r_2_to_1) $running_1 $controls, a(year#industry) clus(firm) nocons
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo: ivreghdfe d_capex_t_tp1 (d_qix= r_1_to_2 r_2_to_1) d_total_mv_ln d_ff_rus band band_d02, a(year#industry) clus(firm) nocons
- Health Care Costs and Corporate Investment
Review of Financial Studies 2024 · pkg 63
-
leverage / debt5% · 11written as
borrow,ccard_debt_22,ccard_debt_23,ccard_debt_24,ccard_debt_254 examples in the code
- Student Loans, Access to Credit, and Consumer Credit Demand
Review of Financial Studies 2024 · pkg 175
Rest_of_Code_Step3_25_2SLS_CreditCardBalances_Fig_10.do:411 ·
ccard_debt_22(loop-expanded: inst=sum_i4; depvar=ccard_debt_)xtivreg `depvar'22 (tot_fedloans_22 = c.`inst'_`s'#c.ever_with_pub4_22) ever_with_pub4_22
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):xtivreg `depvar'22 (tot_fedloans_22 = c.`inst'_st_e_new#c.ever_with_pub4_22) ever_with_pub4_22 nocollege_22 degree_AS_22 degree_BA_22 degree_MA_22 degree_butunknown_22 ever_with_pub2_22 ever_with_priv …
- The Value of Firm Networks: A Natural Experiment on Board Connections
Review of Corporate Finance Studies 2026 · pkg 7330
FMP_RCFS_Replication/Code/Main Results/table_1.do:157 ·
lev_w(loop-expanded: ThisOut=lev_w; ThisVar=pc1)qui: ivreghdfe `ThisOut' (`ThisVar' = interact), a(id dateid) cluster(id)
- Stock Market Returns and Consumption
The Journal of Finance 2020 · pkg 15763
Final submission codes/Regressions/Table 4_CashFlow_Componenets.do:69 ·
delta_cashflow_debtivreg2 delta_cashflow_debt (delta_bartik delta_dividend=new_delta_bartik bartik_div) delta_dinc_div delta_lag_finwealth double_div_zero /// i.year, cluster (fam_id)
- Import Competition and Household Debt
The Journal of Finance 2022 · pkg 15880
final_replication/src/main_tables.do:176 ·
fd7_ldebt_toteststo: ivregress 2sls fd7_ldebt_tot (d9907_NIMP_CH =SC) [weight=population_adult] , cl(fipstate) first
- Student Loans, Access to Credit, and Consumer Credit Demand
Review of Financial Studies 2024 · pkg 175
-
profitability (ROA, ROE, margins, earnings)5% · 11written as
roa(2),EBIT,ROIC_wogw3_1d,d_margin_aprFTX_bps,d_profitability_t_tp14 examples in the code
- The Rise of Star Firms: Intangible Capital and Competition
Review of Financial Studies 2024 · pkg 131
qui: xi: eststo: ivreghdfe `v1' L.LIC L.Lage (L.impUSA=L.impOTH), first cluster(naics2007_4dig) absorb(year naics2007_4dig)
- Leaky Director Networks and Innovation Herding
Review of Financial Studies 2026 · pkg 172
tables_1_to_7_figures_3_and_4.do:277 ·
profitability_wivreghdfe profitability_w (oddensity4l1_wz = c.z2#c.post2004 log_atl1 log_agel1 ) if year>=2000 & year<=2009 & tsim4_wz!=. & profitability_wz!=. & mkt_book_wz!=. & numpat2at_wz!=. & val …
- Shared Destinies? Small Banks and Small Businesses
Review of Financial Studies 2025 · pkg 200
BankRegs.do:115 ·
roaeststo: xtivreg2 roa (bank_gSmallFirm1 = bank_bartikGS1 ) year_* if roa<roa99 & roa>roa01 & year>2002 & Lsmall==1 & `Filters' , fe cluster(cluster3)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo: xtivreg2 roa (bank_gSmallFirm1 = bank_bartikGS1 ) year_* if roa<roa99 & roa>roa01 & year>2002 & Lsmall==1 & year>2002 & abs(bank_lndep)<=5 & small2002==1 & Lsmall==1 & merger==0 , fe cluster(c …
- The Effects of Going Public on Firm Profitability and Strategy
Review of Financial Studies 2025 · pkg 203
eststo: qui xtivreg2 EBIT (IPO=instrument) deventyear2 deventyear3 deventyear4 deventyear5 dsic1year* dmonth* , fe first cluster(id) partial(deventyear2 deventyear3 deventyear4 deventyear5 dsic1year* …
- The Rise of Star Firms: Intangible Capital and Competition
Review of Financial Studies 2024 · pkg 131
Economics — 1436 of 1,642 packages have a readable outcome
-
employment / labour supply10% · 139written as
employed(8),working(4),work(3),empl(2),flfp(2)4 examples in the code
- The Lifetime Impacts of the New Deal's Youth Employment Program
Quarterly Journal of Economics 2024 · pkg 7353
ivregress 2sls `y' (duration=treatmnt) [pw=WGT48B] if male==1, robust
- Army Service in the All-Volunteer Era
Quarterly Journal of Economics 2022 · pkg 7537
Greenberg_et_al_Army_Service_Replication_Materials_table_a_21_a_22.do:61 ·
not_working(loop-expanded: outcome=not_working)ivregress 2sls `outcome' k31 instk31 k31_2 instk31_2 i.quarter (access=inst31) if inrange(firstafqt,12,49) & white==1 , r
- The Earnings And Labor Supply Of U.S. Physicians [∗]
Quarterly Journal of Economics 2025 · pkg 7543
code_govt_policy_ACA_docinc-govtpolicy02-ACA_regressions.do:254 ·
retired_1099ssa(loop-expanded: outcome=retired_1099ssa)ivreghdfe `outcome' (share_insured=iv) if inrange(year, 2005, 2017) & inrange(age,`agerng'), a(cfips year age) cluster(cfips_num)
- Channeling Fisher: Randomization Tests and the Statistical Insignificance of Seemingly Sig
Quarterly Journal of Economics 2019 · pkg 7644
files/GRS/ReplicationGRS.do:42 ·
unemploymentxi: ivreg unemployment (sm = highnumber) i.cohort if cohort > 1956 & cohort < 1963, robust
- The Lifetime Impacts of the New Deal's Youth Employment Program
Quarterly Journal of Economics 2024 · pkg 7353
-
wages / earnings8% · 117written as
lnw(5),lwage(5),log_wage(4),dwage(3),logwage(3)4 examples in the code
- The Lifetime Impacts of the New Deal's Youth Employment Program
Quarterly Journal of Economics 2024 · pkg 7353
ivregress 2sls `y' (duration=treatmnt) [pw=WGT48B] if male==1, robust
- Old Boys’ Clubs and Upward Mobility Among the Educational Elite
Quarterly Journal of Economics 2022 · pkg 7375
ivreghdfe wage_index (final_tier2=nbdranki) if pf_wm==1 /// , absorb(${rblock} i.hs_wm ) cluster(dorm_nbd_id)As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe wage_index (final_tier2=nbdranki) if pf_wm==1 , absorb(price_year_cap i.hs_wm ) cluster(dorm_nbd_id)
- Flexible Wages, Bargaining, and the Gender Gap
Quarterly Journal of Economics 2022 · pkg 7377
tables_publ.do:118 ·
logsalaryeststo r5: ivreghdfe logsalary $tag_exp female (female_postext = female_postexp), a($exp i.extension##i.year) cluster(district_code)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo r5: ivreghdfe logsalary Ed Edexp Yr female (female_postext = female_postexp), a($exp i.extension##i.year) cluster(district_code)
- Army Service in the All-Volunteer Era
Quarterly Journal of Economics 2022 · pkg 7537
Greenberg_et_al_Army_Service_Replication_Materials_cumulative.do:66 ·
wages_0_19_mean(loop-expanded: outcome=wages)ivregress 2sls `outcome'_0_19_mean k31 k31_2 instk31 instk31_2 i.quarterFE `controls' (access=inst31) [aw=yrs_observed_0_19] if inrange(firstafqt,12,49) & inrange(firstyear,1990,2011), robust
- The Lifetime Impacts of the New Deal's Youth Employment Program
Quarterly Journal of Economics 2024 · pkg 7353
-
sales / output / quantities / productivity8% · 110written as
lq(5),lnprod(3),lnq(3),Dgdp(2),ch_prod(2)4 examples in the code
- Imports, Exports, and Earnings Inequality: Measures of Exposure and Estimates of Incidence
Quarterly Journal of Economics 2022 · pkg 7540
ivreghdfe lsales (scost = sexpiv simpiv suvalrow) c.sfactor_t0#i.year [aw=weight], a(sid bid_year) cluster(sid)
- Household Debt and Business Cycles Worldwide
Quarterly Journal of Economics 2017 · pkg 7608
ivregress gmm lnGDP_Fd3 (L1D3PD_GDP=`inst') , first wmatrix(hac nwest 6)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivregress gmm lnGDP_Fd3 (L1D3PD_GDP=L1toL3hys) , first wmatrix(hac nwest 6)
- Competition and Relational Contracts in the Rwanda Coffee Chain
Quarterly Journal of Economics 2021 · pkg 7628
qui ivregress 2sls ${outcome} $CONTROLFARMER (${endog} = ${instr}), vce(boot , reps(100))As we read it — macros filled in / loop expanded (an interpretation, not the file's text):qui ivregress 2sls `y' $CONTROLFARMER (competition = instrument), vce(boot , reps(100))
- Mandatory Notice of Layoff, Job Search, and Efficiency
Quarterly Journal of Economics 2025 · pkg 7669
ivreg2 `outcome' (chi=chi_djl chi_djl2) m_djl $a_controls $c_controls if evyear==-`kk' , cluster(lopnr_peorgnr) first partial($c_controls)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreg2 `outcome' (chi=chi_djl chi_djl2) m_djl age cumten s_age s_ten s i.my i.sni3 i.r_s i.r_m_djl if evyear==-`kk' , cluster(lopnr_peorgnr) first partial(i.my i.sni3 i.r_s i.r_m_djl)
- Imports, Exports, and Earnings Inequality: Measures of Exposure and Estimates of Incidence
Quarterly Journal of Economics 2022 · pkg 7540
-
education / test scores6% · 93written as
attendance(3),math(3),educ(2),int_edu(2),school(2)4 examples in the code
- Concessions, Violence, and Indirect Rule: Evidence from the Congo Free State
Quarterly Journal of Economics 2021 · pkg 7382
ivreg2 `dep_var' (in_AA=in_basins) `controls' `poly' if abs(norm_dist) < `fixed_bw2', cluster(cluster_id) ffirst partial(`controls')
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreg2 literacy (in_AA=in_basins) rconc year age age2 gender norm_dist c.norm_dist#c.in_basins if abs(norm_dist) < 35000, cluster(cluster_id) ffirst partial(rconc year age age2 gender)
- Army Service in the All-Volunteer Era
Quarterly Journal of Economics 2022 · pkg 7537
Greenberg_et_al_Army_Service_Replication_Materials_cumulative.do:66 ·
school_q_0_19_mean(loop-expanded: outcome=school_q)ivregress 2sls `outcome'_0_19_mean k31 k31_2 instk31 instk31_2 i.quarterFE `controls' (access=inst31) [aw=yrs_observed_0_19] if inrange(firstafqt,12,49) & inrange(firstyear,1990,2011), robust
- Digital Distractions with Peer Influence: The Impact of Mobile App Usage on Academic and L
Quarterly Journal of Economics 2026 · pkg 7564
Replication files/Programs/student_FE_and_iv.do:66 ·
gpa_must_semesterivreghdfe gpa_must_semester cee_trend (log_total_dur log_avg_total_dur = iv1 iv2 iv1_policy iv2_policy weighted_teen_friends avg_weighted_teen_friends), a(student_id i.group##i.semester, savefe) clust …
- Marginal Returns to Public Universities
Quarterly Journal of Economics 2026 · pkg 7567
ivreghdfe `Y'_D (1.d1 = 1.above) [w=tri], absorb(i.yearsout##(i.cell c.runbelow c.runabove)) vce(cluster ssnrep) nocollin noid
- Concessions, Violence, and Indirect Rule: Evidence from the Congo Free State
Quarterly Journal of Economics 2021 · pkg 7382
-
income / consumption / wealth / inequality6% · 79written as
income(3),lnincome(3),Dinc(2),ln_income(2),log_income(2)4 examples in the code
- Local Elites as State Capacity: How City Chiefs Use Local Information to Increase Tax Comp
American Economic Review 2022 · pkg 3482
eststo: ivreg2 inc_mo_el (taxes_paid = t_l) i.house i.stratum if inlist(tmt,1,2), cl(a7)
- War Reparations, Structural Change, and Intergenerational Mobility
Quarterly Journal of Economics 2025 · pkg 7507
Replication_package_bartik_BHJ_robustness.do:123 ·
income_rankivreg2 income_rank (bartik_standardized=repa_scaled) [aw=s_n], r
- Army Service in the All-Volunteer Era
Quarterly Journal of Economics 2022 · pkg 7537
Greenberg_et_al_Army_Service_Replication_Materials_sumstats.do:209 ·
aXmed_hhinc1990(loop-expanded: cov=med_hhinc1990; strata=black)ivregress 2sls aX`cov' k31 k31_2 instk31 instk31_2 i.quarterFE (access=inst31) if inrange(firstyear,1990,2011) & inrange(firstafqt,12,49) & `strata' == 1, robust
- Imports, Exports, and Earnings Inequality: Measures of Exposure and Estimates of Incidence
Quarterly Journal of Economics 2022 · pkg 7540
Replication Package/3 - Estimation/codes/est_eta_upper.do:78 ·
rel_spending_factorivreghdfe rel_spending_factor (rel_price_factor = rel_exp_iv rel_imp_iv) [aw=weight], a(id year) cluster(id)
- Local Elites as State Capacity: How City Chiefs Use Local Information to Increase Tax Comp
American Economic Review 2022 · pkg 3482
-
health / mortality5% · 75written as
bmi(2),death(2),health12(2),health_index(2),imr(2)4 examples in the code
- The Lifetime Impacts of the New Deal's Youth Employment Program
Quarterly Journal of Economics 2024 · pkg 7353
quietly ivregress 2sls `yvar' (${X0} = ${iv}) $ifstat & qin == 1, $option_seAs we read it — macros filled in / loop expanded (an interpretation, not the file's text):quietly ivregress 2sls `yvar' (`Xvar' = `iv') if death_age >= 45 & EOTCOG == 1 & qin == 1, vce(cluster groupayq)
- Health Insurance and Mortality: Experimental Evidence from Taxpayer Outreach
Quarterly Journal of Economics 2021 · pkg 7400
ivregress 2sls dead1718 (covered1718=treatment) if treatment == 0 | `i' == 1, cl(tin)
- Selection with Variation in Diagnostic Skill: Evidence from Radiologists
Quarterly Journal of Economics 2022 · pkg 7483
ivreghdfe `var' $all (diag_PNA = diag_PNA_jk), absorb($controls) small cluster(id)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe `var' $all (diag_PNA = diag_PNA_jk), absorb(sta3n##hourofday sta3n##dayofweek sta3n##yearmonth) small cluster(id)
- Eviction and Poverty in American Cities
Quarterly Journal of Economics 2024 · pkg 7602
0_Code_3_regressions_ivols_Cook_experian_regs_iv_ols_gr.do:43 ·
fin_health_1_4(loop-expanded: pop=great_recession; popval=0; var=fin_health; rng=1_4)ivregress 2sls `var'_`rng' i.$fe $controls (evicted=$instrument) if `pop'==`popval', r cluster($cluster_iv)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivregress 2sls `var'_`rng' i.districtXquarter $controls (evicted=stringency_n100_loo) if `pop'==`popval', r cluster(judgeXyear)
- The Lifetime Impacts of the New Deal's Youth Employment Program
Quarterly Journal of Economics 2024 · pkg 7353
-
prices / inflation / rents5% · 68written as
lnp(5),lprice(3),lnP(2),ln_price(2),D_price_PRP_rent_ratio4 examples in the code
- Buyers’ Sourcing Strategies and Suppliers’ Markups in Bangladeshi Garments
Quarterly Journal of Economics 2023 · pkg 7525
eststo: ivreghdfe ln_p_inpf_sbjo (ln_q_inpf=ln_q_sbq_inst3b) /// if sample==1, /// abs(gr_sjt ) cluster(b_id)
- The Unequal Gains from Product Innovations: Evidence from the U.S. Retail Sector
Quarterly Journal of Economics 2019 · pkg 7579
code_4h_Table5.do:43 ·
RMS_lces_price_index_winivreg2 RMS_lces_price_index_win (RMS_avg_Dlog_realspending=inst_linageres) [aw=sqrt(RMS_avg_spending)] /// , first cluster(product_module_code)
- Eviction and Poverty in American Cities
Quarterly Journal of Economics 2024 · pkg 7602
0_Code_3_regressions_ivols_Cook_judgestringency_regs_iv_ols.do:49 ·
nbrhd_med_rent_5yr(loop-expanded: pop=all; popval=1; var=nbrhd_med_rent_5yr)ivregress 2sls `var' i.$fe (evicted=$instrument) if `pop'==`popval', r cluster($cluster_iv)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivregress 2sls `var' i.districtxyearxquarter (evicted=loo_vc_ivsamp100) if `pop'==`popval', r cluster(judgexyear)
- Competition and Relational Contracts in the Rwanda Coffee Chain
Quarterly Journal of Economics 2021 · pkg 7628
qui ivregress 2sls ${outcome} $CONTROLFARMER (${endog} = ${instr}), vce(boot , reps(100))As we read it — macros filled in / loop expanded (an interpretation, not the file's text):qui ivregress 2sls `y' $CONTROLFARMER (competition = instrument), vce(boot , reps(100))
- Buyers’ Sourcing Strategies and Suppliers’ Markups in Bangladeshi Garments
Quarterly Journal of Economics 2023 · pkg 7525
-
demographics (often balance / covariate checks)4% · 61written as
married(10),black(2),hhsize(2),jail_black_male_p25(2),jail_black_male_p75(2)4 examples in the code
- The Other Great Migration: Southern Whites and the New Right
Quarterly Journal of Economics 2023 · pkg 7541
BFFPT-QJE2023-Replication/do-files/3_cultural_transmission.do:465 ·
pct_Southerners_white1970ivreghdfe pct_Southerners_white1970 (pct_Southerners_white = iv_mig_hat1_00_2) $controls if year==1940, cluster(km_grid_cel_code) a(statefip dummy_trunmig_hat1_00_2) ffirst
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe pct_Southerners_white1970 (pct_Southerners_white = iv_mig_hat1_00_2) lnpopdens_hist pct_mfgempl pct_unemploy pct_laborforce pct_btot pct_popmexico pct_popgerman pct_popcanada pct_popireland …
- Eviction and Poverty in American Cities
Quarterly Journal of Economics 2024 · pkg 7602
0_Code_3_regressions_ivols_Cook_judgestringency_regs_iv_ols.do:49 ·
black(loop-expanded: pop=all; popval=1; var=black)ivregress 2sls `var' i.$fe (evicted=$instrument) if `pop'==`popval', r cluster($cluster_iv)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivregress 2sls `var' i.districtxyearxquarter (evicted=loo_vc_ivsamp100) if `pop'==`popval', r cluster(judgexyear)
- Systemic Discrimination Among Large U.S. Employers
Quarterly Journal of Economics 2022 · pkg 7613
replication_code_covariates.do:548 ·
race_difivreg2 race_dif (score_cust_interaction = i.sic_code), cluster(job_id)
- The Effects of Combat Deployments on Veterans’ Outcomes
Journal of Political Economy 2024 · pkg 7795
ivreghdfe `dv' (${NEWENDOG} = ${NEWINST}), absorb($FE1_temp) robust $ivregsettingsAs we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe `dv' (${NEWENDOG} = instrument_mths_dep_qtr), absorb(mos_tc_post_yr_terms) robust nocollin noid
- The Other Great Migration: Southern Whites and the New Right
Quarterly Journal of Economics 2023 · pkg 7541
Outcomes that are taxonomy measures (all fields: the package computes the measure and estimates it as the outcome)
- Capital Expenditure 4 packages · 42 models
4 examples in the code
- Asset Specificity of Nonfinancial Firms
Quarterly Journal of Economics 2023 · pkg 7590
Datasharing/Main/Investment.do:268 ·
f.capx_ppenteststo: ivreghdfe f.capx_ppent sd_ret_ann mean_ret_ann (c.sd_ret_ann#c.RecoveryPPEMidG1 RecoveryPPEMidG1 c.mean_ret_ann#c.RecoveryPPEMidG1 RecoveryPPEMidG1 = c.sd_ret_ann#c.RecoveryPPEMidG2 Recovery …
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo: ivreghdfe f.capx_ppent sd_ret_ann mean_ret_ann (c.sd_ret_ann#c.RecoveryPPEMidG1 RecoveryPPEMidG1 c.mean_ret_ann#c.RecoveryPPEMidG1 RecoveryPPEMidG1 = c.sd_ret_ann#c.RecoveryPPEMidG2 RecoveryPP …
- Investment Functions with q in the Presence of Unobserved Persistent Shocks
Journal of Financial and Quantitative Analysis 2026 · pkg 14131
All_Tables.do:231 ·
d.invivreg2 d.inv d.CF d.l.lnK d.l.lnN_K d.tfp (d.l.TQ =d.l3.TQ d.l4.TQ ), /// first savefirst nocons savefprefix(st4) gmm2s robust cluster(gvkey)
- Scope, Scale, and Concentration: The 21 st ‐Century Firm
The Journal of Finance 2025 · pkg 16155
xi: xtivreg2 capxassets logassets0 logage i.year (scopevar= redeploy_outward0 ind_dist_hhi20), fe cluster(gvkey)
- In Safe Hands: The Financial and Real Impact of Investor Composition over the Credit Cycle
Review of Financial Studies 2025 · pkg 160819
ivreghdfe capx_at (share* = instr_*), absorb(firm_id year `controls') cluster(firm_id)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe capx_at (share* = instr_*), absorb(firm_id year i.leverage_decile#i.year i.size_decile#i.year i.naics2#i.year i._issuer_rating_cat_pm#i.year i._firm_drn_bucket#i.year) cluster(firm_id)
- Asset Specificity of Nonfinancial Firms
Quarterly Journal of Economics 2023 · pkg 7590
- Return on Assets (ROA) 2 packages · 11 models
2 examples in the code
- The Value of Firm Networks: A Natural Experiment on Board Connections
Review of Corporate Finance Studies 2026 · pkg 7330
FMP_RCFS_Replication/Code/Main Results/table_10.do:58 ·
roa(loop-expanded: ThisOut=roa; ThisVar=pc1)ivreghdfe `ThisOut' (`ThisVar' = interact), a(id dateid) cluster(id)
- Scope, Scale, and Concentration: The 21 st ‐Century Firm
The Journal of Finance 2025 · pkg 16155
xi: xtivreg2 oiassets logassets0 logage i.year (scopevar= redeploy_outward0 ind_dist_hhi30), fe cluster(gvkey)
- The Value of Firm Networks: A Natural Experiment on Board Connections
Review of Corporate Finance Studies 2026 · pkg 7330
- Book Leverage 1 package · 1 models
1 example in the code
- The Value of Firm Networks: A Natural Experiment on Board Connections
Review of Corporate Finance Studies 2026 · pkg 7330
FMP_RCFS_Replication/Code/Main Results/table_10.do:58 ·
lev(loop-expanded: ThisOut=lev; ThisVar=pc1)ivreghdfe `ThisOut' (`ThisVar' = interact), a(id dateid) cluster(id)
- The Value of Firm Networks: A Natural Experiment on Board Connections
Review of Corporate Finance Studies 2026 · pkg 7330
- Dividend Payout 1 package · 10 models
1 example in the code
- Scope, Scale, and Concentration: The 21 st ‐Century Firm
The Journal of Finance 2025 · pkg 16155
xi: xtivreg2 divass logassets0 logage i.year (scopevar= redeploy_outward0 ind_dist_hhi30), fe cluster(gvkey)
- Scope, Scale, and Concentration: The 21 st ‐Century Firm
The Journal of Finance 2025 · pkg 16155
- Equity Issuance 1 package · 10 models
1 example in the code
- Scope, Scale, and Concentration: The 21 st ‐Century Firm
The Journal of Finance 2025 · pkg 16155
xi: xtivreg2 equityiss logassets0 logage i.year (scopevar= redeploy_outward0 ind_dist_hhi30), fe cluster(gvkey)
- Scope, Scale, and Concentration: The 21 st ‐Century Firm
The Journal of Finance 2025 · pkg 16155
Commonest outcome names no group reads (all fields, packages): y1 (9), y2 (6), a (5), w (5), y0 (5), delta (4), ln_value (4), q (4), temp (4), dy (3), f15cumuly (3), f1cumuly (3).
Instruments and endogenous regressors
Excluded instruments in 1,747 of the 1,899 IV packages
— those where we read an instrument list (40,305 models) — typed by how they are written,
or, where the name says nothing, by the statement in the package that builds them (165 package–type pairs, each example linked to that statement).
A term also listed among the model's regressors is an included control, not an instrument. Most instruments carry a name only their paper explains
(g, exp0newsy) and are built from several variables at once, so the types below are lower bounds.
Instrument types (share of the 1747)
-
written as
l.m(6),l.lm(4),l.m2(4),l.l(3),l.l2(3)all 223 packages →4 examples in the code
- The Rise of Star Firms: Intangible Capital and Competition
Review of Financial Studies 2024 · pkg 131
TablesADM_RFS.do:148 ·
l.impOTHqui: xi: eststo: ivreghdfe `v1' L.LIC L.Lage (L.impUSA=L.impOTH), first cluster(naics2007_4dig) absorb(year naics2007_4dig)
- Small Bank Lending in the Era of Fintech and Shadow Banks: A Sideshow?
Review of Financial Studies 2022 · pkg 148
03_CountyLevelTests.do:123 ·
w_L7_Sh_LenderType_1_nloancapture eststo gB4LT_`t'_IV1: ivreghdfe w_Gr7_LenderType_`t'_nloan (w_Gr7_LenderType_1_nloan = w_L7_Sh_LenderType_1_nloan) $L7_CONTROL if year==2015 & $FILT, absorb($FE ) cluster($CLVAR )
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):capture eststo gB4LT_`t'_IV1: ivreghdfe w_Gr7_LenderType_`t'_nloan (w_Gr7_LenderType_1_nloan = w_L7_Sh_LenderType_1_nloan) L7.z_ln_total_pop L7.z_minority L7.z_PerCapInc L7.z_SP_Shr L7.z_ln_BHCs L7.z_ …
- Leaky Director Networks and Innovation Herding
Review of Financial Studies 2026 · pkg 172
tables_1_to_7_figures_3_and_4.do:275 ·
log_atl1ivreghdfe tsim4_wz (oddensity4l1_wz = c.z2#c.post2004 log_atl1 log_agel1 ) if year>=2000 & year<=2009 & tsim4_wz!=. & profitability_wz!=. & mkt_book_wz!=. & numpat2at_wz!=. & valpat2at_wz!= …
typed from its definition at tables_1_to_7_figures_3_and_4.do:64:log_at[_n-1] - International Portfolio Choice with Frictions: Evidence from Mutual Funds
Review of Financial Studies 2023 · pkg 188
ivreghdfe zint (lzint val xer = q1 q2 q3 q4 q5 q6 q7 q8 ), absorb(fundid#id) cluster(datem) first
typed from its definition at replication_files_codes__do_estim_MainResults.do:70 (via lval):val[_n-1]
- The Rise of Star Firms: Intangible Capital and Competition
Review of Financial Studies 2024 · pkg 131
-
written as
Z(24),instrument(19),z(19),iv(14),z1(8)all 151 packages →4 examples in the code
- Estimating General Equilibrium Spillovers of Large-Scale Shocks
Review of Financial Studies 2023 · pkg 29
Code_Huber_RFS_Simulations.do:216 ·
instrumentivreg y_1_spillover_x2 (x2 industry_mean_x2_1 = instrument industry_mean_instrument_1), cluster(county)
- The Effects of Going Public on Firm Profitability and Strategy
Review of Financial Studies 2025 · pkg 203
qui xtivreg2 wroa (IPO=instrument) deventyear2 deventyear3 deventyear4 deventyear5 dsic1year* dmonth* , fe first cluster(id) partial(deventyear2 deventyear3 deventyear4 deventyear5 dsic1year* dmonth*)
- 3G Internet and Confidence in Government
Quarterly Journal of Economics 2021 · pkg 7447
ivreghdfe pr_component (three_g_w= instr) $income_controls c.max_elevation#c.year i.popul_density_bins_5#c.year c.share_desert#c.year c.share_mountains#c.year c.three_g_2008#c.year c.three_g_2008_0#c …
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe pr_component (three_g_w= instr) income_control democ7 democ5 lngdp_pc unemployment c.max_elevation#c.year i.popul_density_bins_5#c.year c.share_desert#c.year c.share_mountains#c.year c.three …
- Do Energy Efficiency Investments Deliver? Evidence from the Weatherization Assistance Prog
Quarterly Journal of Economics 2018 · pkg 7461
xtivreg2 lnBTU (D=IV) _Iyear_* D_monXyea_*, fe robust cluster(fwhhid) first
- Estimating General Equilibrium Spillovers of Large-Scale Shocks
Review of Financial Studies 2023 · pkg 29
-
written as
treat(21),treatment(19),treated(11),treat2(8),treat1(5)all 116 packages →4 examples in the code
- Growing Markets through Business Training for Female Entrepreneurs: A Market-Level Randomi
American Economic Journal: Applied Economics 2021 · pkg 3478
DoFiles/GrowingMarkets_replicationfile_TablesAndFigures.do:2039 ·
r1_treated_r23xi: ivreg2 survives (everattends_r23 everattends_r45=r1_treated_r23 r1_treated_r45) spillovertreat_r23 spillovertreat_r45 round3 round4 round5 i.r1_Strata, r cluster(r1_market1)
- Local Elites as State Capacity: How City Chiefs Use Local Information to Increase Tax Comp
American Economic Review 2022 · pkg 3482
eststo: ivreg2 inc_mo_el (taxes_paid = t_l) i.house i.stratum if inlist(tmt,1,2), cl(a7)
typed from its definition at Replication Materials - Updated October 2025/Dofiles/Tables_Figures/Table5.do:111:treatment==2 - Double for Nothing? Experimental Evidence on an Unconditional Teacher Salary Increase in I
Quarterly Journal of Economics 2018 · pkg 7384
eststo m2: xi: ivreg2 ITT_score (P2 = treatment) $controls10 i.triplet_id if year==2 [pweight=weight], cluster(school_id)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo m2: xi: ivreg2 ITT_score (P2 = treatment) ITT_score0 missing_ITT_score0 schoolscore0 missing_schoolscore0 i.triplet_id if year==2 [pweight=weight], cluster(school_id)
- The Allocation of Authority in Organizations: A Field Experiment with Bureaucrats
Quarterly Journal of Economics 2021 · pkg 7397
Code/7-2_Table3.do:148 ·
Incentives0ivregress 2sls lUnitPrice /// lPriceHat NewItemID#c.lQuantity i.NewItemID NCC i.strata /// (ProcTime = Incentives0) [aweight=ExpInCtrl] if agD_l48 == 0 & (Incentives0 == 1 | (Rules0 == …typed from its definition at Code/4-7_TableF5.do:6:(Treatment == 1)
- Growing Markets through Business Training for Female Entrepreneurs: A Market-Level Randomi
American Economic Journal: Applied Economics 2021 · pkg 3478
-
written as
ln_iv_price(3),ln_iv_price_DebtLong(2),ln_iv_price_Equity(2),ln_tariff_iv(2),price(2)all 65 packages →4 examples in the code
- Complete Pass-Through in Levels
Quarterly Journal of Economics 2026 · pkg 7364
code/manufacturing_passthrough_regs_vRepl.R:170 ·
wb_commodity_factor*sic_factor*L1_material_sharefeols(D1_log_piship_cpi ~ 1 | sic + year | D1_log_pimat_cpi*L1_material_share ~ wb_commodity_factor*sic_factor*L1_material_share, data=nber_ces, cluster=c("year","sic")), - Buyers’ Sourcing Strategies and Suppliers’ Markups in Bangladeshi Garments
Quarterly Journal of Economics 2023 · pkg 7525
Replication_Package_for_Online_Publication_1_Code_Estimation_Elasticities.do:55 ·
ln_cotton_price_x_ratecapture ivreghdfe ln_WR_o ( ${endogenous} ${exogenous} = ${instrument} ln_cotton_price_x_rate c.ln_cotton_price_x_rate#i1.numf_orig ) /// if SAMPLE_THETA==1, abs(${fes})As we read it — macros filled in / loop expanded (an interpretation, not the file's text):capture ivreghdfe ln_WR_o ( ln_q_sbjo ln_p_inpf_sbjo = ln_q_sbq_inst3b ln_cotton_price_x_rate c.ln_cotton_price_x_rate#i1.numf_orig ) if SAMPLE_THETA==1, abs(gr_sjt)
- Imports, Exports, and Earnings Inequality: Measures of Exposure and Estimates of Incidence
Quarterly Journal of Economics 2022 · pkg 7540
ivreghdfe `oil' `extra_controls' `balanced_Y' [aw=`win_Y'], a(`base_FEs') `cluster'
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe lx_fn (lwage = exp_iv_f_oil imp_iv_f) c.ee_f_t0#i.year c.ie_f_t0#i.year if samp_est_all==1 [aw=weight], a(id_f firm_year) cluster(id_f)
- Global Trade and the Maritime Transport Revolution
Review of Economics and Statistics 2010 · pkg 13226
transport_web.do:91 ·
logcoalxtivreg2 logaverage loggdpsum logsprod logavertar gold ervol decade_1 decade_2 decade_3 decade_4 decade_5 (freight=L1.(log_steam_tonnage log_sail_tonnage distsailtonnage diststeamtonnage) L2.(log_stea …
typed from its definition at transport_web.do:51:log(coal_prices)
- Complete Pass-Through in Levels
Quarterly Journal of Economics 2026 · pkg 7364
-
written as
2tor(r_max)km_in,Bantu_Distance,Dist_Bound_Verdun,Distance_Bantu_bin_W,GRtot100plus_dist_INSTall 59 packages →4 examples in the code
- Owner Incentives and Performance in Healthcare: Private Equity Investment in Nursing Homes
Review of Financial Studies 2024 · pkg 121
Figures.do:365 ·
diff_dist_modivreghdfe mortality_`durn' `x' (peind = `z') , absorb(facid bene_hrr#year) tol(1e-6) accel(sd) cluster(facid)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe mortality_90 female married dual black age female_age gp_old_1 gp_old_2 gp_old_3 gp_old_4 gp_old_5 gp_old_6 gp_old_7 gp_old_8 gp_old_9 gp_old_10 gp_old_11 gp_old_12 gp_old_13 gp_old_14 gp_ol …
- Trading Nontradables: The Implications of Europe’s Job-Posting Policy
Quarterly Journal of Economics 2024 · pkg 7539
Replication_package_code_Fig5_Tab1.do:772 ·
logdistanceivreg2 deltadom20032015 (logexposure_post_pp=logdistance) [aw=pop2003], ro first
typed from its definition at Replication_package_code_Fig5_Tab1.do:770:log(distancenms2) - How Merchant Towns Shaped Parliaments: From the Norman Conquest of England to the Great Re
American Economic Review 2022 · pkg 11299
AER Replication Files/1_AMV_AER_Main.do:1525 ·
inter_royal_navigable_river/*6*/eststo: ivreg2 Parliament_1348 (grant_farm_1348=inter_royal_navigable_river inter_royal_seacoast inter_royal_Roman_road) navigable_river seacoast Roman_road royal_borough if insample_pre1348==1, …
- Community Colleges and Upward Mobility
American Economic Review 2022 · pkg 11321
prog/overid.do:37 ·
z2ivreg2 `Y' $CONTROLS (d0 d4 = z2 z4), cluster(campusyear)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreg2 `Y' i.female i.economic i.year10 i.ethnic i.cz i.ulocal c.hoodfactor_100 c.hoodfactor_100#c.hoodfactor_100 c.hoodfactor_100#c.hoodfactor_100#c.hoodfactor_100 c.hsoilgas_100 c.hsoilgas_100#c.hso …
typed from its definition at prog/create_analysis.do:17:miles2
- Owner Incentives and Performance in Healthcare: Private Equity Investment in Nursing Homes
Review of Financial Studies 2024 · pkg 121
-
written as
GM_hat2(2),(i.INS#c.phat_f_prc c.INS2#c.phat_f_prc#c.ln_pred_p_prc)#QT_risk,1.cocaine_producer_o#c.predicted_immig_l10y2001,1.cocaine_producer_o#c.predicted_immig_l10y2001#c.predicted_immig_l10y2001,1.cocaine_producer_o#c.predicted_immig_l10y2011_rall 56 packages →4 examples in the code
- Digitalization and Retirement Contribution Behavior: Evidence from Administrative Data
Review of Financial Studies 2024 · pkg 92
ReplicationRFS/codes/3_RCT_main.do:63 ·
appuser_predeststo LATE_dummy: ivregress 2sls buyin_dummy (appuser = appuser_pred) $controls_a , vce(cluster id)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo LATE_dummy: ivregress 2sls buyin_dummy (appuser = appuser_pred) male log_wage age age_2 fund i.mstat log_tenure i.year , vce(cluster id)
- Institutional Corporate Bond Pricing
Review of Financial Studies 2026 · pkg 147
ReplicationCodes_ICBP_Estimation_01_ss.do:231 ·
LNoutweight_conditional_hat1eststo: ivreghdfe LNweight_assetclass (LNoutweight_conditional1 LNoutweight_conditional2 = LNoutweight_conditional_hat1 LNoutweight_conditional_hat2) [aw=aum_tot1] if type_new2==`i', a(fundid) cl(fund …
- Imports, Exports, and Earnings Inequality: Measures of Exposure and Estimates of Incidence
Quarterly Journal of Economics 2022 · pkg 7540
ivreghdfe `spec' [aw=weight], a(`base_FEs') `cluster'
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe lwage (hat_w_ree_p1 = hat_w_reeiv_p1) [aw=weight], a(year factor_id) cluster(factor_id)
- The Other Great Migration: Southern Whites and the New Right
Quarterly Journal of Economics 2023 · pkg 7541
BFFPT-QJE2023-Replication/do-files/1e_longrun_presidential_elections.do:1036 ·
c.iv_mig_hat1_00_2#i.voteyearivreghdfe Prep (c.pct_Southerners_white#i.voteyear = c.iv_mig_hat1_00_2#i.voteyear) if year==1940, cluster(km_grid) a(icpsrfip voteyear stateyear dummy_trunmig_hat1_00_2)
- Digitalization and Retirement Contribution Behavior: Evidence from Administrative Data
Review of Financial Studies 2024 · pkg 92
-
written as
Ireland_imm_perc_1920_Gamanj(2),colony(2),legor_fr(2),legor_ge(2),st_logTotalPop_1920_Gamanj(2)all 46 packages →4 examples in the code
- War, Socialism, and the Rise of Fascism: An Empirical Exploration
Quarterly Journal of Economics 2022 · pkg 7438
do_tables_Tab_A3_A13-A15_A21.do:428 ·
z_excess_mf1918ivreg2 `depvar' (z_psu1919_vv=z_excess_mf1918) `cntls_excess_spec`i'', partial(province*) cl(circondario1921)
- The Macroeconomic Consequences of Exchange Rate Depreciations
Quarterly Journal of Economics 2025 · pkg 7659
Replication/Empirics/Stata_Code/subfile/sub_main_regression_loop.do:642 ·
dlogUS_colonized_by_Franceivreghdfe dlog`t'_`var' (peg_dlogUS = $instruments ) `controls_compile' [aw = $weight] if out_`t'_`var' == 0 $time_condition & region == 1, $absorb_set vce(cluster Country_Code Time_Period)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe dlog`t'_`var' (peg_dlogUS = dlogUS_colonized_by_France dlogUS_colonized_by_UK dlogUS_colonized_by_Spain dlogUS_colonized_by_others ) peg_USD L`L'_dlog0_`var' L`L'_`convar' lag1_peg_dlogUS la …
- Cultural diversity and economic growth: Evidence from the US during the age of mass migrat
European Economic Review 2013 · pkg 11866
Replication_Files(EER_D_12_00583R2)/Replication_Files(EER_D_12_00583R2)/data(EER_D_12_00583R2)/culturaldiversity(EER_D_12_00583R2).do:111 ·
FRACT_NFB1870xi: ivreg2 totva_d5 (RQ_NFBd5 FRACT_NFBd5 = FRACT_NFB1870 RQ_NFB1870 FRhat_d5 POLhat_d5) i.state urb_1870 totpop_d5 lnwforce_1870pc totpop_1870 Gini_1870 mfct_share1870 totva_1870 rail_1870 phi1870_1 …
- Does foreign aid harm political institutions?
Journal of Development Economics 2016 · pkg 11898
xi: ivreg2 d.(calpha) l.(calpha) (aidGDP = colony l.rc_wdi_lifexp l.recipientPop_log) `controls' len D_*, r endog(aidGDP) liml
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):xi: ivreg2 d.(calpha) l.(calpha) (aidGDP = colony l.rc_wdi_lifexp l.recipientPop_log) *_mean len D_*, r endog(aidGDP) liml
- War, Socialism, and the Rise of Fascism: An Empirical Exploration
Quarterly Journal of Economics 2022 · pkg 7438
-
written as
z(2),Av_PolIns,Continuation_Bias_SD,Jackknife,Zall 44 packages →4 examples in the code
- Dominant Currencies: How Firms Choose Currency Invoicing and Why it Matters
Quarterly Journal of Economics 2022 · pkg 7412
eststo col1: ivreghdfe Ix mphi_xeu lnmemp ms (mshcompetitor_other = IVsh_US IVsh_CHN IVsh_other lncomp_memp comp_mphi_xeu ), absorb(cty_num hs4 date) cluster(vat) first savefirst savefprefix(col1_fs_ …
typed from its definition at DataReplication_dofiles_data_competitor_instruments.do:54 (via comp_memp):(totvalue_memp - value_memp)/(totvalue - value) - Selection with Variation in Diagnostic Skill: Evidence from Radiologists
Quarterly Journal of Economics 2022 · pkg 7483
quietly ivregress 2sls f alphahat (d = d_jk) if rank <= `i', small cluster(id)
typed from its definition at source/analysis/Rad_PlotControlSkill.do:12:(total_d - d) / (n - 1) - The Morale Effects of Pay Inequality
Quarterly Journal of Economics 2018 · pkg 7574
replication_code_main_forsubmission.do:827 ·
peer_VEjackxi: ivregress 2sls attendance VE_jack i.numsame i.month i.day_centered (peer_attend = peer_VEjack) if Het==0, cl(team_id) first
- Eviction and Poverty in American Cities
Quarterly Journal of Economics 2024 · pkg 7602
0_Code_3_regressions_ivols_Cook_hmis_regs_iv_ols.do:78 ·
loo_vc_ivsamp100ivregress 2sls `var'`rng' i.$fe $controls (evicted=$instrument) if `pop'==`popval', r cluster($cluster_iv)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivregress 2sls `var'`rng' i.districtXyearXquarter $controls (evicted=loo_vc_ivsamp100) if `pop'==`popval', r cluster(judgeXyear)
- Dominant Currencies: How Firms Choose Currency Invoicing and Why it Matters
Quarterly Journal of Economics 2022 · pkg 7412
-
written as
d_tradeotch_pw_lag(5),(c.denial_rate)#c.d_tradeotch_pw_lag,(c.ln_real_rentgrs c.Llnchg_real_rentgrs)#c.d_tradeotch_pw_lag,(c.sh_emp_manuf)#c.d_tradeotch_pw_lag,(c.sh_poverty_status c.lnmn_inc_invst)#c.d_tradeotch_pw_lagall 42 packages →4 examples in the code
- Shared Destinies? Small Banks and Small Businesses
Review of Financial Studies 2025 · pkg 200
BankDeposits.do:58 ·
bank_bartikGS1eststo: ivreg2 bank_lndep (bank_gSmallFirm1 = bank_bartikGS1 ) year_* if `filterbus', cluster(cluster3)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo: ivreg2 bank_lndep (bank_gSmallFirm1 = bank_bartikGS1 ) year_* if abs(bank_busdep)<1 & abs(bank_hhdep)<1 & year>2013 & asset<10000000 & bank_busdep!=0 & L.busdep!=., cluster(cluster3)
- The Evolution of Access to Public Accommodations in the United States
Quarterly Journal of Economics 2023 · pkg 7536
Do_Files_CJLR_GreenBooks_QJE_Rep.do:866 ·
a_bartikshock4050eststo main_iv_hotel_bartik: ivreg2 a_d_gbhotel4050 (a_d_blackshr4050 = a_bartikshock4050) i.stateid if num_hotel_CoBab1935 != . & us_region != "South", first
- The Slope of the Phillips Curve: Evidence from U.S. States
Quarterly Journal of Economics 2022 · pkg 7671
code_to_share_regressions_cs.do:153 ·
l4.d20_qt_bartik_saeststo: ivreghdfe infl_reg_sign (L4.mean_une = L4.d20_qt_bartik_sa) L4.rp, absorb(i.statecode i.date) cluster(statecode)
- Trade with Nominal Rigidities: Understanding the Unemployment and Welfare Effects of the C
Journal of Political Economy 2026 · pkg 7732
Empirics_codes_3-coefs_graphs_decadal.do:117 ·
d_tradeotch_pw_lageststo mp_2000_$i : qui ivreg2 d_sh_${outcome}_$i $controls (d_tradeusch_pw=d_tradeotch_pw_lag) [aw=timepwt48], cluster(statefip)As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo mp_2000_`i' : qui ivreg2 d_sh_`outcome'_`i' l_shind_manuf_cbp l_sh_popedu_c l_sh_popfborn l_sh_empl_f l_sh_routine33 l_task_outsource reg* t2 (d_tradeusch_pw=d_tradeotch_pw_lag) [aw=timepwt48], …
- Shared Destinies? Small Banks and Small Businesses
Review of Financial Studies 2025 · pkg 200
-
written as
above(5),above_cutoff(2),0.cp#female#reltime#reformyear#c.quota,1.above,1.above#i.schoolall 39 packages →4 examples in the code
- O Brother, Where Start Thou? Sibling Spillovers on College and Major Choice in Four Countr
Quarterly Journal of Economics 2021 · pkg 7372
qje_replication_files/chi-cro/table3_cl.do:65 ·
above_cutoffivreghdfe `choice'_`level' `covs' (enrolls_old = above_cutoff) if `if'
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe `choice'_`level' c.score_rd c.score_rdc (enrolls_old = above_cutoff) if `if' & score_rd >= -1*`bw_`level'' & score_rd <= `bw_`level'', absorb(i.year i.mcfe) cluster(family_id) first ffirst s …
- Long-Range Growth: Economic Development in the Global Network of Air Links
Quarterly Journal of Economics 2018 · pkg 7481
Table_7.do:31 ·
shareEI_below6000_w500ivreg2 zcompany_nr_dist6000 (z_EIGEN_2014 z_EIGEN_2014_X10=shareEI_below6000_w500 shareEI_below6000_w500_X10) $CONTROLS0_EI $TZONE_DistEq $NLPOP819 $CONTROLS1989, cl(countrycode) ffirst
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreg2 zcompany_nr_dist6000 (z_EIGEN_2014 z_EIGEN_2014_X10=shareEI_below6000_w500 shareEI_below6000_w500_X10) EIGEN89_55to65 regdum* timezone_fullhours ldist_eq Lights92_025grid pop90_025grid z_EIGEN_ …
- Cognitive Endurance As Human Capital [∗]
Quarterly Journal of Economics 2025 · pkg 7486
do/Table 7.do:96 ·
above_cutoffeststo reg`i': ivreg2 question_correct /// `running`n'' pred_decline3 /// (grade grade_pred_dec3=above_cutoff above_preddec3) /// if totz!=. [pw=weight1], cl(stude …As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo reg1: ivreg2 question_correct `running`n'' pred_decline3 (grade grade_pred_dec3=above_cutoff above_preddec3) if totz!=. [pw=weight1], cl(student_id)
- Nation Building Through Foreign Intervention: Evidence from Discontinuities in Military St
Quarterly Journal of Economics 2018 · pkg 7514
rd_reg.do:3 ·
belowquietly ivregress 2sls `outcome' (fr_strikes_mean=below) md_* ab bc cd de i.qdate vmb22-vt54 [aw=oweight20], nocons robust cluster(villageid)
- O Brother, Where Start Thou? Sibling Spillovers on College and Major Choice in Four Countr
Quarterly Journal of Economics 2021 · pkg 7372
-
written as
gust(2),rain(2),thunder(2),abs_spei,adverse_weatherall 22 packages →4 examples in the code
- War, Socialism, and the Rise of Fascism: An Empirical Exploration
Quarterly Journal of Economics 2022 · pkg 7438
do_tables_Tab_A3_A13-A15_A21.do:440 ·
z_rain1919ivreg2 `depvar' (z_psu1919_vv=z_rain1919) z_rain_var `cntls_spec`i'', partial(d_reg* province* z_lpop1911 z_lpop2 z_lpop3 z_lpop4) cl(circondario1921 cl1_stn1919)
- Policy Experimentation in China: The Political Economy of Policy Learning
Journal of Political Economy 2025 · pkg 7717
ivreghdfe rollout gdppc_growth (blank = rain gust thunder rainI gustI thunderI), a(city year name) vce(cluster code) first
- Economic Determinants of Land Invasions
Review of Economics and Statistics 2010 · pkg 13182
InvasionsReplication.do:60 ·
rain_monthlyxtivreg2 occs_0_1 (ag_income=rain_monthly) logpop _T*, cluster(code) fe
- The Effect of Microinsurance on Economic Activities: Evidence from a Randomized Field Expe
Review of Economics and Statistics 2015 · pkg 13190
sow_appendix.do:62 ·
snow_groupd2ivreg sow3 snow sow0 (insuredpig snow_insured =groupd2-groupd3 snow_groupd2 snow_groupd3) towndummy* ,robust cluster(townid)
- War, Socialism, and the Rise of Fascism: An Empirical Exploration
Quarterly Journal of Economics 2022 · pkg 7438
-
written as
i.casemanagerstaffid(2),Leniency2,Leniency2_std,Zb,dommernr_ext1_ctype_scoreall 15 packages →4 examples in the code
- Eviction and Poverty in American Cities
Quarterly Journal of Economics 2024 · pkg 7602
0_Code_3_regressions_ivols_Cook_experian_regs_iv_ols.do:104 ·
stringency_n100_looivregress 2sls `var'_`rng' $controls `lags' i.$fe (evicted=$instrument) if `pop'==`popval' & samplerestriction==1, r cluster($cluster_iv)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivregress 2sls `var'_`rng' $controls `var'_b9_16 `var'_b9_16_miss `var'_b9 `var'_b10 `var'_b11 `var'_b12 `var'_b9_miss `var'_b10_miss `var'_b11_miss `var'_b12_miss i.districtXquarter (evicted=stringen …
- Racial Bias in Bail Decisions
Quarterly Journal of Economics 2018 · pkg 7603
results_qje_final.do:425 ·
judgeiv_bail_met_ever_rs_n(loop-expanded: z=judgeiv_bail_met_ever_rs; endog=bail_met_ever; y=recid_arrest_onbail)ivreg2 `y' (`endog'_n `endog'_b = `z'_n `z'_b) $x_regcrime_full fe_* bfe_* , r cluster($clusteroption)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreg2 `y' (`endog'_n `endog'_b = `z'_n `z'_b) cr_* male* r_a_* prior_offender_1year* n_counts* any_drug* any_dui* any_violent* any_property* prior_recid_onbail_1year* prior_fta_1year* missing_prior_f …
typed from part of its name - Halfway Home? Residential Housing and Reincarceration
American Economic Journal: Applied Economics 2023 · pkg 11711
Stata-Do-Files/step05_Main_Analysis.do:602 ·
i.casemanagerstaffidqui ivregress 2sls recid_all i.`fe_var' (Resi_File = i.casemanagerstaffid) if `group' == 1 , vce(cluster casemanagerstaffid)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):qui ivregress 2sls recid_all i.fac_manager_year (Resi_File = i.casemanagerstaffid) if `group' == 1 , vce(cluster casemanagerstaffid)
- Assessing Human Information Processing in Lending Decisions: A Machine Learning Approach
Journal of Accounting Research 2022 · pkg 12630
model.do:125 ·
officer_leniencyivregress 2sls profit2 (loan_size_signed = officer_leniency), /// first vce(cluster audit_empname_num)
- Eviction and Poverty in American Cities
Quarterly Journal of Economics 2024 · pkg 7602
1441 packages (82%) have an instrument no type reads, e.g. elasticity, shock, D, T, distM_UK, g.
Endogenous regressors (share of the 1732 naming one)
-
written as
price(12),lprice(7),lnprice(3),ln_price_lc_d_DebtLong(2),ln_price_lc_d_Equity(2)all 69 packages →4 examples in the code
- Effects of Credit Expansions on Stock Market Booms and Busts
Review of Financial Studies 2025 · pkg 196
HHJLM_Replication_RFS_do_02_estimate_model.do:72 ·
f.price590ivreghdfe price590 (F.price590=f(2/3).d) d if vintage!=1 & vintage!=0 ,cl(code ) a(code date2)
- Investors’ Beliefs and Cryptocurrency Prices
Review of Asset Pricing Studies 2024 · pkg 7227
ivreg2 const (logprice = logsupply) beta momentum4 incomenewdummy agenewdummy countrynewdummy type_objective log_sp500 log_libor if survey==1 , robust ffirst
- Measuring Welfare by Matching Households across Time
Quarterly Journal of Economics 2024 · pkg 7369
Replication_file_data_Est_XYelast.do:143 ·
dlogp_pctivreghdfe dlogbX (dlogp_pct=dlogpoil), cluster(pct1000) absorb(pct1000)
- Buyers’ Sourcing Strategies and Suppliers’ Markups in Bangladeshi Garments
Quarterly Journal of Economics 2023 · pkg 7525
capture ivreghdfe ln_WR_o ( ${endogenous} ${exogenous} = ${instrument} ln_cotton_price_x_rate c.ln_cotton_price_x_rate#i1.numf_orig ) /// if SAMPLE_THETA==1, abs(${fes})As we read it — macros filled in / loop expanded (an interpretation, not the file's text):capture ivreghdfe ln_WR_o ( ln_q_sbjo ln_p_inpf_sbjo = ln_q_sbq_inst3b ln_cotton_price_x_rate c.ln_cotton_price_x_rate#i1.numf_orig ) if SAMPLE_THETA==1, abs(gr_sjt)
- Effects of Credit Expansions on Stock Market Booms and Busts
Review of Financial Studies 2025 · pkg 196
-
written as
educ(4),EDUC(2),edu16(2),rMEANstream_std_math(2),schooling(2)all 60 packages →4 examples in the code
- O Brother, Where Start Thou? Sibling Spillovers on College and Major Choice in Four Countr
Quarterly Journal of Economics 2021 · pkg 7372
qje_replication_files/chi-cro/table3_cl.do:65 ·
enrolls_oldivreghdfe `choice'_`level' `covs' (enrolls_old = above_cutoff) if `if'
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe `choice'_`level' c.score_rd c.score_rdc (enrolls_old = above_cutoff) if `if' & score_rd >= -1*`bw_`level'' & score_rd <= `bw_`level'', absorb(i.year i.mcfe) cluster(family_id) first ffirst s …
- Cognitive Endurance As Human Capital [∗]
Quarterly Journal of Economics 2025 · pkg 7486
do/Table 7.do:96 ·
gradeeststo reg`i': ivreg2 question_correct /// `running`n'' pred_decline3 /// (grade grade_pred_dec3=above_cutoff above_preddec3) /// if totz!=. [pw=weight1], cl(stude …As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo reg1: ivreg2 question_correct `running`n'' pred_decline3 (grade grade_pred_dec3=above_cutoff above_preddec3) if totz!=. [pw=weight1], cl(student_id)
- The Mortgage Piggy Bank: Building Wealth Through Amortization
Quarterly Journal of Economics 2024 · pkg 7588
MortgagePiggyBank_Tables.do:189 ·
hi_educ_mtg_bal_repay_15_14ivreghdfe wealth_15_14 (mtg_bal_repay_15_14 hi_educ_mtg_bal_repay_15_14 = treated hi_educ_treated) hi_educ if sample_main, absorb(dummy) cluster(household_id)
- Channeling Fisher: Randomization Tests and the Statistical Insignificance of Seemingly Sig
Quarterly Journal of Economics 2019 · pkg 7644
files/DDK/ReplicationDDK.do:125 ·
rMEANstream_std_mathxi: ivreg stdR_mathscore (rMEANstream_std_math = rMEANstream_std_baselinemark) std_mark etpteacher girl agetest i.schoolid, cluster(section)
- O Brother, Where Start Thou? Sibling Spillovers on College and Major Choice in Four Countr
Quarterly Journal of Economics 2021 · pkg 7372
-
written as
D_female(2),pct_Southerners_white(2),planinterview_age_u30(2),AL_D_80_77_black,A__ageall 55 packages →4 examples in the code
- O Brother, Where Start Thou? Sibling Spillovers on College and Major Choice in Four Countr
Quarterly Journal of Economics 2021 · pkg 7372
qje_replication_files/us/us_analyze.do:431 ·
oldest_went_age5ivreghdfe `y' dist above_dist age5 (oldest_went oldest_went_age5 = above above_age5 ), cluster(famid) a(oc_tc_c)
- Flexible Wages, Bargaining, and the Gender Gap
Quarterly Journal of Economics 2022 · pkg 7377
tables_publ.do:118 ·
female_postexteststo r5: ivreghdfe logsalary $tag_exp female (female_postext = female_postexp), a($exp i.extension##i.year) cluster(district_code)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo r5: ivreghdfe logsalary Ed Edexp Yr female (female_postext = female_postexp), a($exp i.extension##i.year) cluster(district_code)
- The Other Great Migration: Southern Whites and the New Right
Quarterly Journal of Economics 2023 · pkg 7541
BFFPT-QJE2023-Replication/do-files/1e_longrun_presidential_elections.do:911 ·
c.pct_Southerners_white#i.voteyearivreghdfe Prep (c.pct_Southerners_white#i.voteyear = c.pct_Southerners_white_dyn1900_2#i.voteyear), cluster(km_grid) a(statefip stateyear voteyear dummy_truncate_dyn1900)
- Systemic Discrimination Among Large U.S. Employers
Quarterly Journal of Economics 2022 · pkg 7613
replication_code_covariates.do:635 ·
firm_share_female_mgmt(loop-expanded: var=firm_share_female_mgmt)qui eststo: ivreg2 race_dif i.wave (`var' = `var'_other), cluster(firm_id)
- O Brother, Where Start Thou? Sibling Spillovers on College and Major Choice in Four Countr
Quarterly Journal of Economics 2021 · pkg 7372
-
written as
log_gdp_d(2),prod(2),tfp(2),Dgdp,Dsales_local_nevertoUS_lnall 53 packages →4 examples in the code
- Do You Know that I Know that You Know…? Higher-Order Beliefs in Survey Data
Quarterly Journal of Economics 2021 · pkg 7499
replication/do-files/step411 - Appendix G - Table G1.do:66 ·
rev_epi_12m_experivreg2 FE_`var'_3m (rev_epi_12m_exper=surp_epi) /// if w8_exper_groupN==2 | w8_exper_groupN==1, ffirst robust - Buyers’ Sourcing Strategies and Suppliers’ Markups in Bangladeshi Garments
Quarterly Journal of Economics 2023 · pkg 7525
capture ivreghdfe ln_WR_o ${exogenous} (${endogenous}=${instrument}) if SAMPLE_THETA==1, abs(${fes})As we read it — macros filled in / loop expanded (an interpretation, not the file's text):capture ivreghdfe ln_WR_o ln_p_inpf_sbjo (ln_q_sbjo=ln_q_sbq_inst3b) if SAMPLE_THETA==1, abs(gr_sjt)
- The Effects of Mandatory Profit-Sharing on Workers and Firms: Evidence from France
Quarterly Journal of Economics 2026 · pkg 7600
Codes/3A_Main_tables.do:449 ·
participation_vaeststo a6: qui ivreghdfe temp (participation_va = inter1) $sample, a($fe) $se first
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo a6: qui ivreghdfe temp (participation_va = inter1) , a(firm DP#annee SEC2#annee) cl(firm) first
- Climate Change and Agriculture: Subsistence Farmers’ Response to Extreme Heat
American Economic Journal: Economic Policy 2021 · pkg 11128
do files/Tables_and_figures.do:193 ·
ln_totsup_prodeststo C:ivreghdfe ln_totag_07prices DDavg hDDavg PP_gs PP_sq_gs (ln_nrHHmem_agricwork_all ln_totsup_prod = ln_hhsize ln_totsup_all) ln_peones $indconts $soilq $farmconts if sample==1 [pw=factor07 …
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo C:ivreghdfe ln_totag_07prices DDavg hDDavg PP_gs PP_sq_gs (ln_nrHHmem_agricwork_all ln_totsup_prod = ln_hhsize ln_totsup_all) ln_peones edad edad2 female i.educ_att i.month i.sq1 i.sq2 i.sq3 i. …
- Do You Know that I Know that You Know…? Higher-Order Beliefs in Survey Data
Quarterly Journal of Economics 2021 · pkg 7499
-
written as
lemp(2),lempl(2),planinterview_employed_bl(2),retired(2),(c.sh_emp_manuf)#c.d_tradeusch_pwall 51 packages →4 examples in the code
- Credit Environment and Small Business Dynamics: Evidence from Establishment-Level Data
Review of Corporate Finance Studies 2023 · pkg 7317
Lin_Tai_Xie_2022_RCFS_Real_dynamics.do:35 ·
10.g_emp#c.xboomivreghdfe y_emp ($boom = $boom_iv), absorb(county#g_emp year) cluster(county)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe y_emp (xboom 10.g_emp#c.xboom 50.g_emp#c.xboom = xboom_iv 10.g_emp#c.xboom_iv 50.g_emp#c.xboom_iv), absorb(county#g_emp year) cluster(county)
- Dual returns to experience
Labour Economics 2023 · pkg 12454
xtivreg lnw (aexp_oec aexp_ftc tenure tenure_sq = dev_aexp_oec2 dev_aexp_ftc2 dev_tenure dev_tenure_sq) /// i.ed2 i.ed3 i.female i.sme i.young i.sk2 i.sk3 i.parttime i.dummyT i.pexpgroup i.year i.s …
- Disability Benefit Take-Up and Local Labor Market Conditions
Review of Economics and Statistics 2018 · pkg 13125
eststo: ivreg2 D.log_real_`depv' (D.log_`econ' = $og_oilprice_cont_67) /// $controls stateyrv* $regWeight, cluster(fips) savefirstAs we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo: ivreg2 D.log_real_`depv' (D.log_`econ' = L(0/2).d_oilprice_by_emp1967) msa1990 log_pop D.log_pop manufact_earn_share_1969 stateyrv* $regWeight, cluster(fips) savefirst
- Benign Effects of Automation: New Evidence from Patent Texts
Review of Economics and Statistics 2023 · pkg 13143
Data archive/patent-analysis/do/08. MP_use_regressions.do:244 ·
s5f_ln_autopats_mfg_USxi:ivreg d5_emp_popwplus_tr (s5f_ln_autopats_mfg_US s5f_ln_nonautopats_mfg_US = s5f_ln_autopats_mfg_fgn s5f_ln_autopats_mfg_gov s5f_ln_autopats_mfg_res s5f_ln_nonautopats_mfg_fgn s5f_ln_nonautopats_mf …
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):xi:ivreg d5_emp_popwplus_tr (s5f_ln_autopats_mfg_US s5f_ln_nonautopats_mfg_US = s5f_ln_autopats_mfg_fgn s5f_ln_autopats_mfg_gov s5f_ln_autopats_mfg_res s5f_ln_nonautopats_mfg_fgn s5f_ln_nonautopats_mf …
- Credit Environment and Small Business Dynamics: Evidence from Establishment-Level Data
Review of Corporate Finance Studies 2023 · pkg 7317
-
written as
treat(13),treatment(5),treat2(3),treat1(2),treat3(2)all 49 packages →4 examples in the code
- Algorithmic Pricing and Competition: Empirical Evidence from the German Retail Gasoline Ma
Journal of Political Economy 2024 · pkg 7721
Stata_5_main_text_results.do:12 ·
treatquietly ivreghdfe mean_wh_margin postal_n_stations n_compet_adopt l_gdp pop_density med_age employed_share l_pop n_brand mean_temp sd_temp mean_precip sd_precip (treat = share_others_treated) if year …
- Impacts of a Large-Scale Parenting Program: Experimental Evidence from Chile
Journal of Political Economy 2024 · pkg 7756
xi: ivreg `var' $Xvar1 i.CENTRO_SALUD (treat2 treat3=group2 group3), cl(FOLIO_UC);
- Indoor Air Quality, Information, and Socioeconomic Status: Evidence from Delhi
AEA Papers and Proceedings 2021 · pkg 11113
IAQMs_Replication_Files/Do_Files/Appendix_A_tables.do:325 ·
sensor_treatmentivregress 2sls `i' `controls' i.round (sensor_treatment=group `controls'), vce(cluster clustercode)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivregress 2sls `i' car ac bl_wifi college age male size bl_child_senior family_owns_home market_value bl_primary_cook purifier bl_incense bl_mos_repel i.round (sensor_treatment=group car ac bl_wifi co …
- Uber versus Taxi: A Driver’s Eye View
American Economic Journal: Applied Economics 2021 · pkg 11225
TableA5-A6_FW.do:65 ·
took_treatmentivregress 2sls `o' (took_treatment = wave1 wave2) /// i.id i.strata_eligible if `bw', vce(cluster driver_uuid)
- Algorithmic Pricing and Competition: Empirical Evidence from the German Retail Gasoline Ma
Journal of Political Economy 2024 · pkg 7721
-
written as
ln_tariff(2),D0ln_tariff,D10ln_tariff,D1ln_tariff,D2ln_tariffall 36 packages →4 examples in the code
- The Environmental Bias of Trade Policy
Quarterly Journal of Economics 2021 · pkg 7645
xi: ivreg2 total_protection (`x' co2_rate_total = iv_`x' iv_co2_rate_direct) i.id, cluster(industry_code)
- Aid, China, and Growth: Evidence from a New Global Development Finance Dataset
American Economic Journal: Economic Policy 2021 · pkg 11278
AEJ Ec Policy Replication.do:2234 ·
l2.exports_china_lnxtivreg2 growth_pc (l2.exports_china_ln= l3.IV_reserves_OFn_all_1_ln l3.IV_factor1_OFn_all_1_ln) l2.OFn_all l.population_ln time* if code!="CHN", fe first savefprefix(first) cluster(code) endog(l2.exp …
- US exports and employment
Journal of International Economics 2019 · pkg 12201
replication_final/Table2_3.do:159 ·
d_import_uscheststo a2: ivreg2 dl_cbp_emp t1 t2 `sector_controls' `prod_controls' `pretrend_controls' (d_import_usch d_ROWimport d_CHNexport d_ROWexport = d_OTCHN1import d_TARCHN1import d_OTROW1import d_TARROW1imp …
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):eststo a2: ivreg2 dl_cbp_emp t1 t2 sector2 sector3 sector4 sector5 sector6 sector7 sector8 sector9 sector10 ind_prodwemp_1991 ind_lnavgw_1991 ind_capvadd_1991 ind_ci_1990 ind_htsh1_1990 d_ind_shemp_76 …
- Trade, pollution and mortality in China
Journal of International Economics 2020 · pkg 12363
replication package/Table_robust_IMR.do:79 ·
export_cusivreg2 d_All_mortality (shock_pca_cus export_cus=shock_pca_f_chn DD_f_chn) $controls_a $controls_b $controls_d poll_emp_pca_chn i.region_year if age_group==1 [aweight=weight], partial(i.region_year)cl …
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreg2 d_All_mortality (shock_pca_cus export_cus=shock_pca_f_chn DD_f_chn) lag_GDP_cap lag_All_mortality_overall lag_share_agriculture lag_pop_density capital d_highschool d_midschool d_sex_ratio d_Be …
- The Environmental Bias of Trade Policy
Quarterly Journal of Economics 2021 · pkg 7645
-
written as
log_income(2),(c.sh_poverty_status c.lnmn_inc_invst)#c.d_tradeusch_pw,A__inc,CRealM30_0_savings,DgOb_inc0305all 31 packages →4 examples in the code
- The Unequal Gains from Product Innovations: Evidence from the U.S. Retail Sector
Quarterly Journal of Economics 2019 · pkg 7579
code_4o_Table7.do:45 ·
lRMS_total_spending_QM_2006ivreg2 RMS_lces_price_index_win (lRMS_total_spending_QM_2006 = inst_raw_lvl) [aw=sqrt(RMS_avg_spending)] /// , first cluster(product_module_code)
- State-Dependent Effects of Monetary Policy: The Refinancing Channel
American Economic Review 2022 · pkg 11199
Code/CoreLogic_Tables.do:74 ·
CRealM30_0_savingsxtivreg flag_refi_1year CPI_?yr RGDP_?yr UNEMP_?yr wvg_Hequity wvg_Hequity_level savings_national L.savings_national ( CRealM30 CRealM30_0_savings = nshock1 nshock1_savings) if year<=2007 & year>= …
- In search of lost time aggregation
Economics Letters 2020 · pkg 12248
ivreg2 log_ndur (log_income = educ year )
- Structure of income inequality and household leverage: Cross-country causal evidence
European Economic Review 2021 · pkg 12330
xtivreg2 Household_Ratio GDPpercapita_LogReal BroadMoney_Ratio Creditmarketregulations (Gini = cum_totconv) yeard* if Palma!=. , first fe ro endog(Gini) savefirst savefprefix(First)
- The Unequal Gains from Product Innovations: Evidence from the U.S. Retail Sector
Quarterly Journal of Economics 2019 · pkg 7579
-
written as
CF4_ln_wage_wgt,DWage,Dwage_manuf,Dwage_services,c.wage_growth#i.high_agg_delta_rall 29 packages →4 examples in the code
- Industrial Policies in Production Networks
Quarterly Journal of Economics 2019 · pkg 7468
qui eststo: ivregress 2sls `outvar' mkoy mli mlnkinitf mexp (sv_`var'=antras) [aw=gva]
- Imports, Exports, and Earnings Inequality: Measures of Exposure and Estimates of Incidence
Quarterly Journal of Economics 2022 · pkg 7540
ivreghdfe `both_IV' `specification'
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivreghdfe lx_fn (lwage = exp_iv_f imp_iv_f) c.ee_f_t0#i.year c.ie_f_t0#i.year [aw=weight], a(id_f firm_year) cluster(id_f)
- Child Skill Production: Accounting for Parental and Market-Based Time and Goods Investment
Journal of Political Economy 2026 · pkg 7828
code_estimation_basics_rel_demand_5_demand_estimation_fin.do:401 ·
ln_wage_m_relivregress 2sls ln_tau_m_g_exp_ratio curr_married `Zm`zval'' (ln_wage_m_rel=i.state i.year)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):ivregress 2sls ln_tau_m_g_exp_ratio curr_married age med_scoll med_collplus m_age m_white num_0_5 num_child (ln_wage_m_rel=i.state i.year)
- Uber versus Taxi: A Driver’s Eye View
American Economic Journal: Applied Economics 2021 · pkg 11225
TableA10.do:41 ·
log_wageivregress 2sls log_hours (log_wage = live_old) live old high twentyfive, vce(cluster driver_uuid)
- Industrial Policies in Production Networks
Quarterly Journal of Economics 2019 · pkg 7468
-
written as
D_a8_pop,Lnpop,actual_delta_ln_mover_change_r1,c.(density)#i.(depVar_id),c.(density2010)#i.(depVar_id)all 25 packages →4 examples in the code
- The Mortgage Piggy Bank: Building Wealth Through Amortization
Quarterly Journal of Economics 2024 · pkg 7588
MortgagePiggyBank_Tables.do:169 ·
mtg_bal_repay_16_15_sample_moverivreghdfe wealth_16_15 (mtg_bal_repay_16_15 mtg_bal_repay_16_15_sample_mover = treated treated_sample_mover) if sample_15_16, absorb(dummy) cluster(household_id)
- Migration, Specialization, and Trade: Evidence from Brazil’s March to the West
Journal of Political Economy 2025 · pkg 7684
ivreghdfe l_c_income (l_p_pop = livnoss100p_pop), absorb(FE_jkt FE_ijt) cluster(FE_jkt FE_it)
- Migration And Economic Mobility In Tanzania: Evidence From A Tracking Survey
Review of Economics and Statistics 2011 · pkg 12835
xi: xtivreg2 $LHS $CONTROLS (moved1 = `x') , fe i(hhid1) first savefp(first)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):xi: xtivreg2 dlnconspc schooldmed schooldmedsq sex unmar sexXunmar bothdied bothdied15 mgrade1 fgrade1 clh?0_51 clh?6_101 clh?11_151 clh?16_201 clh?21p1 cle1 cle1Xkm age0 age1 age2 age3 age4 age5 age6 …
- Crime and Immigration: Evidence from Large Immigrant Waves
Review of Economics and Statistics 2013 · pkg 13218
BFM_Code.do:89 ·
D_a8_popivregress 2sls D.(viol_crime_rate lnpop benefit_claimants young_share) i.year (D_a8_pop=a8_iv) [aw=adult_pop] if year>2004, vce(cluster panel_id) first
- The Mortgage Piggy Bank: Building Wealth Through Amortization
Quarterly Journal of Economics 2024 · pkg 7588
-
written as
FS_count_loans_P1P2_per_est,FS_count_loans_P1_per_est,LCREDIT,approved,bnpl_approved_0all 17 packages →4 examples in the code
- Credit Markets, Property Rights, and the Commons
Journal of Political Economy 2024 · pkg 7719
h1 = feols(ffmsy ~ pr + gdp + gdp2 | stock_id + country + year |credit + credit:pr ~ credit_instrument + credit_instrument:pr , cluster = ~ country + year … - Assessing Human Information Processing in Lending Decisions: A Machine Learning Approach
Journal of Accounting Research 2022 · pkg 12630
model.do:125 ·
loan_size_signedivregress 2sls profit2 (loan_size_signed = officer_leniency), /// first vce(cluster audit_empname_num)
- Banks and Development: Jewish Communities in the Italian Renaissance and Current Economic
Review of Economics and Statistics 2016 · pkg 13208
Replicating_tables.do:134 ·
LCREDITivreg2 LGDP (LCREDIT= JEW) yd* if NORTH==1 , partial( yd*) ffirst
- Regional Banks, Aggregate Effects
Journal of Financial Economics 2026 · pkg 14269
RegionalBanks_Maingi_Replication_Package/RegionalBanks_Maingi_Replication_Package/code/Other Results/chs_shock.do:81 ·
dsmfirm_lendivreg dngdp (dsmfirm_lend=exante_lend)
- Credit Markets, Property Rights, and the Commons
Journal of Political Economy 2024 · pkg 7719
-
written as
DgOb_Debt0305,DgOb_debt,DgOb_incDebt,DgOb_incDebt0305,DgSp_debtall 16 packages →4 examples in the code
- The Mortgage Piggy Bank: Building Wealth Through Amortization
Quarterly Journal of Economics 2024 · pkg 7588
MortgagePiggyBank_Tables.do:178 ·
hi_LTV_mtg_bal_repay_15_14ivreghdfe wealth_15_14 (mtg_bal_repay_15_14 hi_LTV_mtg_bal_repay_15_14 = treated hi_LTV_treated) hi_LTV if sample_main, absorb(dummy) cluster(household_id)
- Does Enforcement of Intellectual Property Rights Matter in China? Evidence from Financing
Review of Economics and Statistics 2014 · pkg 13357
table_4.do:26 ·
ipp1newdebtxi: ivreg2 rdasset (L.ipp1 ipp1newdebt ipp1newexternal ipp1internal = L.christian L.british christiannewdebt britishnewdebt christiannewexternal britishnewexternal christiannewinternal britishnewint …
- Fiscal Stimulus and Consumer Debt
Review of Economics and Statistics 2019 · pkg 13781
Replication_DLMreplication.do:264 ·
DgSp_incDebtquietly ivreg2 Dinc (DgSp_inc DgSp_incDebt = DpredictNS_spendInc DpredictNS_spendIncDebt) d2i2006 empshare1-empshare19 whiteCBSA-urbanCBSA, cluster(state)
- CLO Performance
The Journal of Finance 2023 · pkg 15586
manager_analysis.do:489 ·
orig_leverage_weststo: ivreghdfe irr_eq_w (orig_leverage_w mean_coupon_debt_w mean_coupon_loans_w deal_turnover_w deal_par_build_w = i.manager_id), absorb(vintage_qtr) cluster(manager_id)
- The Mortgage Piggy Bank: Building Wealth Through Amortization
Quarterly Journal of Economics 2024 · pkg 7588
1522 packages name an endogenous regressor no group reads, e.g. m, inter, lx, m2, mainVar, x1.
Instrument types by field (share of the field's IV packages with an instrument list; greyed: fewer than 10 packages)
| type | finance (222) | economics (1509) |
|---|---|---|
| other names | 86% · 192 | 82% · 1237 |
| lagged values (L.x, lag_x) | 13% · 28 | 13% · 194 |
| named only as an instrument (iv, z, inst ...) | 8% · 18 | 9% · 133 |
| randomized assignment / lottery / offer | 4% · 8 | 7% · 106 |
| prices / costs / tariffs / exchange rates | 4% · 9 | 4% · 56 |
| distance / geography | 1% · 3 | 4% · 55 |
| simulated / predicted values | 2% · 4 | 3% · 51 |
| historical / colonial conditions | 0% | 3% · 46 |
| leave-out / peer averages | 2% · 4 | 3% · 40 |
| shift-share / Bartik exposure | 3% · 6 | 2% · 35 |
| eligibility / policy rule / cutoff | 2% · 4 | 2% · 35 |
| weather / natural shocks | 0% | 1% · 22 |
| judge / examiner / caseworker leniency | 0% | 1% · 14 |
| birth timing / sibling composition | 0% | 0% · 4 |
Commands (of the 1,799 packages running the dedicated estimator)
ivreg2646ivreghdfe622ivregress425ivreg193xtivreg2148xtivreg79feols41felm34
Inference (of the 1,799 packages running the dedicated estimator)
cluster1311default450robust417newey_west27bootstrap24hac9jackknife2conley1
Clustering variables (of the 1,799 packages running the dedicated estimator)
id76state33year33fips22county18statefip18date15gvkey13
Absorbed fixed effects (of the 1,799 packages running the dedicated estimator)
year179id46date16fips14state14age13month13gvkey11
Foundational works
What the papers whose code runs this estimator cite most (share of those papers citing each).
- Bartik Instruments: What, When, Why, and How — Paul Goldsmith-Pinkham; Isaac Sorkin; Henry Swift (2020), American Economic Review110 · 6%
- The China Syndrome: Local Labor Market Effects of Import Competition in the United States — David H Autor; David Dorn; Gordon H Hanson (2013), American Economic Review98 · 5%
- Quasi-Experimental Shift-Share Research Designs — Kirill Borusyak; Peter Hull; Xavier Jaravel (2022), Review of Economic Studies91 · 5%
- Identification and Estimation of Local Average Treatment Effects — Guido W. Imbens; Joshua D. Angrist (1994), Econometrica88 · 5%
- Testing for Weak Instruments in Linear IV Regression — Stock, James; Yogo, Motohiro (2002), National Bureau of Economic Research79 · 4%
- Who Benefits from State and Local Economic Development Policies? — Bartik, Timothy J. (1991), W.E. Upjohn Institute63 · 3%
- A Robust Test for Weak Instruments — José Luis Montiel Olea; Carolin Pflueger (2013), Journal of Business and Economic Statistics61 · 3%
- Technology, Geography, And Trade — Jonathan Eaton; Samuel Kortum (2002), Econometrica59 · 3%
- Unobservable Selection and Coefficient Stability: Theory and Evidence — Emily Oster (2019), Journal of Business and Economic Statistics58 · 3%
- The Impact Of Trade On Intra-Industry Reallocations And Aggregate Industry Productivity — Marc J. Melitz (2003), Econometrica56 · 3%
- Shift-Share Designs: Theory and Inference — Rodrigo Adão; Michal Kolesár; Eduardo Morales (2019), Quarterly Journal of Economics56 · 3%
- Automobile Prices in Market Equilibrium — Steven Berry; James Levinsohn; Ariel Pakes (1995), Econometrica54 · 3%
Recent examples, straight from the code
One model per package, from the most recent papers — each one shows the design itself (why is given beside it).
ivreg2 `var1' (treated=tstatus) $spec7_adm1 ,cluster(schoolid)
ivreg2 `var1' (treated=tstatus) female_adm age_adm grd_pre_ave_Total_cwinz grd_pre_ave_absence class_size District* SchoolCD ,cluster(schoolid)
ivreg2 `var' i.year_survey i.pro_id i.q8_projecttype ///
$controls ($endog = $instrument), cluster(q4_cddid)ivreg2 `var' i.year_survey i.pro_id i.q8_projecttype $controls (LATE_cdd_var = cdd_var_bi), cluster(q4_cddid)
xi: ivreg2 `depvar' (LCSG_altFULL SG_alt LC_alt = LCSG SG LC) ///
$extravars, cluster(calc_school_id) firstxi: ivreg2 `depvar' (LCSG_altFULL SG_alt LC_alt = LCSG SG LC) baseline age_corrected_BL q21_child_gender_BL i.grade_BL, cluster(calc_school_id) first
eststo: ivreghdfe futureborrower (existing_dep = old_mshare_deposit), absorb(i.muniid#i.agebingroup#i.salaryquarter#i.educ) // IV
eststo: ivreghdfe LNrweight (yield = IVme_alt6_95) LNtimetomat spread LNbv rating_num coupon_dec if type_new2==`i' [aw=aum_tot], a(date#fundid) clus(fundid) nocollin
ivreghdfe tsim4_wz (oddensity4l1_wz = c.z2#c.post2004 log_atl1 log_agel1 ) if year>=2000 & year<=2009 & tsim4_wz!=. & profitability_wz!=. & mkt_book_wz!=. & numpat2at_wz!=. & valpat2at_wz!=. & prodmktfluid_wz!=. , absorb(gvkey year ) cluster(sic_x_year gvkey) first
eststo second: ivreghdfe lloan (p2pqtrcapturing=scoredeltapost) post volloanv $control_0 if deltaqdummy, cl(siren) a(qdate siren)
eststo second: ivreghdfe lloan (p2pqtrcapturing=scoredeltapost) post volloanv `"*_0 dum_*"' if deltaqdummy, cl(siren) a(qdate siren)
xtivreg2 Fd3y (LD3_HH_RoTW_RD_GDP=LD3supply_GDP) LD3_HH_HH_RD_GDP LD3_HH_GG_RD_GDP LD3_B_L_NonFiInLoans_GDP LD3_CA_IFSorWEO_GDP ///
l(1/3).d.lrgdp, fe cluster(id) first
eststo: xi: ivregress 2sls risky_share_w1 (stockexp_post_avg_w1 = ib(6).drandom3) if (y_hat_wave1>=0.5), robust
eststo: ivreghdfe `v' (proceed = DAP) lnamount2raise lage ltam ltsm , a( locationregion) robust
ivreghdfe pchdadjshrout (pchdadjshrpass=ivshockadd ivshockflow),cluster(permno yq) a($fe) first savefirst
ivreghdfe pchdadjshrout (pchdadjshrpass=ivshockadd ivshockflow),cluster(permno yq) a(yq#ff49) first savefirst
eststo: ivreghdfe d_price_ln_t_tp1 (d_qix = r_1_to_2 r_2_to_1) $running_3 $controls if share_product_module==`i', a(year#prod_cat year#industry) clus(firm) nocollin noid
eststo: ivreghdfe d_price_ln_t_tp1 (d_qix = r_1_to_2 r_2_to_1) d_total_mv_ln d_total_mv_ln_sq d_total_mv_ln_cu d_ff_rus band band_d02 if share_product_module==`i', a(year#prod_cat year#industry) clus(firm) nocollin noid