← Methods
Hazard / survival
135
packages run it, of 7,459 whose models we parsed
135
papers
1,279
estimation commands
Adoption over time
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.
Commands (of the 135 packages running the dedicated estimator)
stcox105streg31coxph8survfit7ltable3xtstreg2stcrreg1
Inference (of the 135 packages running the dedicated estimator)
cluster66default59robust26bootstrap1
Clustering variables (of the 135 packages running the dedicated estimator)
id3state3date2wficn2accountnumber1base_id1cg_loc1classid1
Absorbed fixed effects (of the 135 packages running the dedicated estimator)
- none recorded
Foundational works
What the papers whose code runs this estimator cite most (share of those papers citing each).
- Regression Models and Life-Tables — D. R. Cox (1972), Journal of the Royal Statistical Society Series B (Statistical Methodology)20 · 15%
- Difference-in-differences with variation in treatment timing — Andrew Goodman-Bacon (2021), Journal of Econometrics15 · 11%
- Difference-in-Differences with multiple time periods — Brantly Callaway; Pedro H.C. Sant’Anna (2021), Journal of Econometrics14 · 10%
- Estimating dynamic treatment effects in event studies with heterogeneous treatment effects — Liyang Sun; Sarah Abraham (2021), Journal of Econometrics12 · 9%
- How Much Should We Trust Differences-In-Differences Estimates? — Marianne Bertrand; Esther Duflo; Sendhil Mullainathan (2004), Quarterly Journal of Economics10 · 7%
- Two-Way Fixed Effects Estimators with Heterogeneous Treatment Effects — Clément de Chaisemartin; Xavier D’Haultfœuille (2020), American Economic Review10 · 7%
- Revisiting Event-Study Designs: Robust and Efficient Estimation — Kirill Borusyak; Xavier Jaravel; Jann Spiess (2024), Review of Economic Studies9 · 7%
- Unobservable Selection and Coefficient Stability: Theory and Evidence — Emily Oster (2019), Journal of Business and Economic Statistics8 · 6%
- How much should we trust staggered difference-in-differences estimates? — Andrew C. Baker; David F. Larcker; Charles C.Y. Wang (2022), Journal of Financial Economics7 · 5%
- Econometric Analysis of Cross Section and Panel Data — Jeffrey M. Wooldridge (2002), MIT Press6 · 4%
- Enjoying the Quiet Life? Corporate Governance and Managerial Preferences — Marianne Bertrand; Sendhil Mullainathan (2003), Journal of Political Economy6 · 4%
- Are Investors Reluctant to Realize Their Losses? — Terrance Odean (1998), The Journal of Finance6 · 4%
Recent examples, straight from the code
Establishment of National Public Audit Oversight Boards: Descriptive Evidence and Implications for Audit Quality Journal of Accounting Research 2026 · Hazard analysis.do:282 · pkg 12746
stcox RuleLaw lnMCtoGDP GDPGrowth i.LegalTradition lnScaledNews if News_Sample==1 & Country!="UNITED STATES" & year>=2000 & Establishment>2000, nohr vce(robust)
The Unintended Consequences of Infrastructure Development Review of Economics and Statistics 2026 · Code_6_appendix.do:960 · pkg 13680
stcox $xlist_geo $censo $muni if treat_y0==1, nohr
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):
stcox geo_slope2_perc geo_slope3_perc geo_slope4_perc geo_elev_251500perc geo_elev_5011000perc geo_elev_1001perc geo_area river_leng geo_region1 geo_region2 inei_pop geo_pop_dens05 dis_piped dis_hh_sewer dis_hh_onsite dis_hh_od dis_educ_secp dis_elecp renamu_pia renamu_int renamu_atform renamu_dhealth if treat_y0==1, nohr
Social Capital and the Boundary of the Firm: Evidence from Relationship-Specific Investments Journal of Financial and Quantitative Analysis 2026 · Code.do:382 · pkg 14154
stcox $indep1 $cotrl1 $cotrl2 $cotrl3 y_*
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):
stcox cust_sc_bf sup_cust_sale sup_size sup_lev sup_mtb sup_roa sup_xrd sup_hhi cust_lev cust_roa y_*
Community health teams and health utilization in El Salvador Journal of Health Economics 2026 · 3. SM2019_Appendix.do:1979 · pkg 14517
stcox $pop_pov $outcomes, nohr
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):
stcox pop_total pop_rur_pctg pov_abs con_t_prev con_t_curatCDs con_t_curatNCDs acscCDs acscNCDs, nohr
Deposit Inflows and Outflows in Failing Banks: The Role of Deposit Insurance The Journal of Finance 2026 · replication_code.do:505 · pkg 15605
stcox $covariates $ckcovariates if cd==0
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):
stcox $covariates ck approxdirectdeposit pastyeartransactions pastyeartransactions_sq inst_any if cd==0
Specialization in Banking The Journal of Finance 2026 · Appendix_7_PartE.do:14 · pkg 15623
eststo: stcox specialization_adjusted_t_y14
Do the Long-term Unemployed Benefit from Automated Occupational Advice during Online Job Search? The Economic Journal 2026 · 06a_duration_models_FUNCTION.do:14 · pkg 18939
eststo cox_end_earn: stcox treatment $controls
Sotto Voce: The Impacts of Technology to Enhance Worker Voice The Economic Journal 2026 · all_analysis.do:65 · pkg 19004
eststo x`restrict'`fe'`control': stcox c.treatment $controls $fe if ${r_`restrict'}, vce(cluster empcode)As we read it — macros filled in / loop expanded (an interpretation, not the file's text):
eststo x`restrict'`fe'`control': stcox c.treatment ${c_`control'} ${fe_`fe'} if ${r_`restrict'}, vce(cluster empcode)
Contract Terms, Employment Shocks, and Default in Credit Cards Review of Economic Studies 2026 · FigureOA12.do:49 · pkg 19036
streg tasa_num 2.pct##group_mp_ATE if segmento !=0, distribution(weibull) nohr
Behind the Veil of Cultural Persistence: Marriage and Divorce in a Migrant Community The Economic Journal 2026 · admintablesfigures.do:466 · pkg 19039
eststo div2: stcox expo_don85##sex##c.dob_sif_don85 i.ar G2 Gmere Gpere if year_birth<=2018-28 , nohr cluster(year_birth)
To Own or to Rent? The Effects of Transaction Taxes on Housing Markets Review of Economic Studies 2026 · 04_table2_hazard.do:321 · pkg 19077
qui streg `depvar' `main_indep_vars' `control' if `sample'==1 & abs(distance)<`min_dist' `cond' `cond_hp_3km' , dist(w) vce(cluster zipcode) nohr
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):
qui streg log_val post toronto LTT i.TO_3m distance X_heating X_basement X_family X_fire X_beds X_baths X_kitch X_rooms X_lot toronto##c.yearmonth0 i.PropertyType i.com if $sample_number==1 & abs(distance)<2000 `cond' & (PropertyType==1 | PropertyType==2) & (PropertyType==1 | PropertyType==2) & (PropertyType==1 | PropertyType==2) & (PropertyType==1 | PropertyType==2) & (PropertyType==1 | PropertyT
On the doorstep of adulthood: Entrepreneurship and fertility of young women in Tanzania The Economic Journal 2026 · 23_TableA16_duration.do:36 · pkg 19351
eststo: stcox $T $cov, vce(cluster school)
As we read it — macros filled in / loop expanded (an interpretation, not the file's text):
eststo: stcox t_health t_entr t_cross het1 het2 het3 het4 cov_ngirls cov_head cov_bus, vce(cluster school)