How samples are built
The decisions a paper rarely spells out in full — read from the code of the 10,383 replication packages with a page (linked to a paper by a confirmed link — the same packages as the home page). Counts are packages.
Winsorizing and trimming — cut points (percentiles)
1,635 packages cap or cut outliers. The two are different treatments and are counted apart:
winsorizing replaces a value beyond the cut with the cut and keeps the observation; trimming removes it (sets it missing or drops the row), so it changes the sample.
“none” = that tail is left alone (cuts(0 99), p(.01) high and a top-only cap are the same thing). winsor2 with no cuts() is its default 1/99; DescTools Winsorize() with no probs is its default 5/95.
A package using several cuts counts once under each.
Winsorize (cap, keep the row) — 1,496 packages, 305 written by hand
- 1/99933
- none/99253
- 5/95230
- none/9586
- 2.5/97.580
- 0.5/99.580
- 2/9849
- 10/9037
- 5/9935
- 0.1/99.932
Cut computed within groups — 235 packages
The percentile is taken inside each group (by(year)), not over the pooled sample.
- within period (year, month, date)136
- within another group107
- within period × another group20
- within industry3
- within industry × period3
cut × grouping
- 1/99 within period (year, month, date)107
- 1/99 within another group64
- 5/95 within another group24
- 5/95 within period (year, month, date)16
- 2.5/97.5 within period (year, month, date)12
- none/99 within another group11
Trim (remove beyond the cut) — 253 packages, 78 written by hand
- 1/99166
- 5/9538
- 0.5/99.520
- none/9918
- 2.5/97.515
- none/9510
- 2/989
- none/99.95
- 5/995
- 1/953
Cut computed within groups — 36 packages
The percentile is taken inside each group (by(year)), not over the pooled sample.
- within another group20
- within period (year, month, date)14
- within period × another group6
- within industry2
cut × grouping
- 1/99 within another group12
- 1/99 within period (year, month, date)8
- 1/99 within period × another group5
- none/99 within another group4
- none/99 within period (year, month, date)3
- 0.5/99.5 within another group2
Cut not a percentile, or still not known — 114 packages
Recovered at build time from the call and the package's other files: psych::winsor's trim argument (the share cut in each tail) (8); the file's own Python function, read with the call's arguments (5); read from the call (probs=, .quantile() bounds, limits=, p() / cuts() arithmetic) (1); the winsorize() of the library the package loads, read by that library's arguments (1).
- the call could not be read52
xtemp=winsorize(x,point);make_fmbwin.m:14xt=winsorize(xt,winth);TianWucode_FunDailyORSestimation.m:48prtchar=winsorize(prtchar,1);Moore-Velikov-main_Functions_._Scripts_prt_char.m:16
- an R winsorize() that is neither DescTools nor readable from the package24
bal_highprin_w=winsorize_x(bal_highprin,cut_l=0.0,cut_u=winsor),RFSDelivery_Code_R_Clarity4_Section_7_Inquiries_and_Transactions_Main_Analysis.R:555cat("Applying winsorization (1%-99%)...")03_Table_8_11_12_13.R:247estimate_label :="Winsorized (Top 0.1%)"ggmn_replication_code_4-analyses_06-make-figure-B-1.R:251
- bounds computed earlier into variables19
data_c["q"]=data_c["q"].clip(0,q-1)RFSDelivery_Code_Python_2_American_Community_Survey_ACS2_FTP_TractControls.py:169.(Winsorize(capex,probs=c(pct,1-pct),na.rm=T),build.R:1240processed_df["logret"]=processed_df["logret_raw"].clip(lower=lower_bound,upper=upper_bound)data_cleaning.py:222
- cut set by a macro the package never defines as a number12
winsor2 `v',cuts(`winsorlevels') suffix("_winsor")event_study_othassets.do:117winsor2 `y',replace cuts(`WinsorisationLevel' 100 - (`WinsorisationLevel'))35 Table outlier analysis.do:18capture: winsor `var',gen(`var'_WH`cutoff') p(`cutoff'/100) highonlyISKK_religiosity_municipality_panel_data_clean.do:104
- Cox's winsor h(#): a number of extreme values, not a percentile6
winsor std_diff,gen(w_std_diff) h(`i') highonlydo_file_v2.do:173winsor trad_ass,g(w_trad_ass) h(1) lowdata_assemble_2_jf.do:17winsor assets if fyear==`jj'+1998,gen(assets`jj') h(10)Robustness.do:37
- an R winsorize() from a library the package does not include (not DescTools, datawizard, statar, robustHD)3
bk[,log_propertyvalue_w:=winsorize(log_propertyvalue,fraction=0.01,na.rm=T)]4. Regression discontinuities.R:60panel_daily[,abmedia :=winsorize(100*(mediacount/normmedia - 1))]generate_figures.R:80fun<- function(x) winsorize(ifelse(x>0,x,NA),pmin=0,pmax=0.995)data_source_crsptaq_202112_ctm_mth.R:85
- the package's own winsorizing program, cut set by its argument1
cap winsor `var' 1main.do:712
Not counted at all: 12 packages whose only “winsorizing” is a clip at fixed values
(.clip(upper=1), Winsorize(x, minval=0, maxval=1)) — a bound on the variable, not a cut at a percentile.
Which industries are screened out
263 packages restrict by industry. Each condition is read into the set of codes it selects,
so sic>=6000 & sic<=6999, substr(sic,1,1)=="6", inrange(sic2,60,69) and keep if (df.siccd<6000)|(df.siccd>6999)
are one row — exclude SIC 6000–6999 — with the ways it is written listed under it (spellings differing only in spaces, quotes or case are merged).
A named screen covers whole conventional sectors; 6000–6799 leaves out SIC 68–69, which hold no firms, so it is the same screen in practice and is shown as its own row.
exclude financials 95 (91 direct, +4 via a flag)
exclude SIC 6000–6999 76 pkg · 47 spellings
variables:sic,sic2,sic4,siccd,sic1,sic3drop if sic>=6000 & sic<=6999×22drop if sic>=6000 & sic<7000×8drop if inrange(sic,6000,6999)×4drop if substr(sic,1,1)=="6"×4drop if sic1==6×3drop if sic2>=60 & sic2<=69×3drop if sic4>=6000 & sic4<=6999×3drop if sic_2d>=60 & sic_2d<=69×3drop if sic2<=69 & sic2>=60×2drop if sic>5999 & sic<7000×2drop if 6000<=sic & sic<7000×1drop if financial==1 ← financial=inrange(sic_n,6000,6999)×1
Packages (40 of 76, most rows first): Kermani & Ma 2023 · Fich et al. 2023 · Wang 2026 · Li et al. 2024 · Huang & Sacchetto 2026 · Gallemore et al. 2025 · Adelino et al. 2023 · Lu & Wu 2026 · Ersahin et al. 2024 · Pankratz & Schiller 2024 · Geelen et al. 2024 · Friberg et al. 2024 · Lian & Ma 2021 · Bilokha et al. 2026 · Le et al. 2024 · Bordalo et al. 2026 · MA 2019 · Griffin et al. 2026 · Lohmeier & Mohrschladt 2026 · MAO et al. 2025 · Cohn et al. 2022 · Jungherr & Schott 2022 · Lamoreaux et al. 2026 · Baqaee & Farhi 2020 · Cabezon & Hoberg 2026 · Ridder 2024 · Avenancio-León et al. 2025 · Boustanifar & Kang 2025 · Rodnyansky et al. 2026 · Jungherr & Schott 2021 · Xu & Zwick 2024 · Dupont & Freeman 2026 · Ottonello & Song 2025 · Celentano & Rempel 2026 · Balsmeier et al. 2024 · Cho et al. 2026 · He & Whited 2026 · Jeenas 2026 · Monacelli et al. 2023 · Ersahin et al. 2024exclude SIC 6000–6799 13 pkg · 10 spellings
variables:sic,siclag,sich,sic_ndrop if sic>=6000 & sic<=6799×4drop if 6000<=siclag & siclag<=6799×1drop if finance==1 ← finance=sic>=6000 & sic<6800×1drop if inrange(sic,6000,6799)×1drop if sic<=6799 & sic>=6000×1drop if sic>=6000 & sic<6800×1drop if sic_n>=6000 & sic_n<=6799×1keep if !(6000<=sich & sich<=6799)×1keep if fin==0 ← fin=(sic_int>=6000 & sic_int<6800)×1keep if sic<6000 | sic>6799×1
exclude NAICS 52 9 pkg · 6 spellings
variables:naics2,naics2_int,naics2017,naicsdrop if naics2==52×4drop if naics2=="52"×3drop if substr(naics,1,2)=="52"×1drop if substr(naics2017,1,2)=="52"×1keep if cs["naics2_int"]!=52×1keep if naics2!=52×1
Packages (40 of 95, most rows first): Kermani & Ma 2023 · Ottonello & Song 2025 · Fich et al. 2023 · Wang 2026 · Li et al. 2024 · Huang & Sacchetto 2026 · Gallemore et al. 2025 · Adelino et al. 2023 · Kundu & Vats 2026 · Lu & Wu 2026 · Ersahin et al. 2024 · Hartman-Glaser et al. 2019 · Pankratz & Schiller 2024 · Geelen et al. 2024 · Shao 2025 · Kacperczyk & Peydró 2026 · Friberg et al. 2024 · Lian & Ma 2021 · Bilokha et al. 2026 · Le et al. 2024 · Bordalo et al. 2026 · Gürkaynak et al. 2022 · MA 2019 · Griffin et al. 2026 · Lohmeier & Mohrschladt 2026 · MAO et al. 2025 · Cohn et al. 2022 · Jungherr & Schott 2022 · Hubmer & Restrepo 2026 · Chu et al. 2026 · Lamoreaux et al. 2026 · Baqaee & Farhi 2020 · Cabezon & Hoberg 2026 · Ridder 2024 · Avenancio-León et al. 2025 · Boustanifar & Kang 2025 · Rodnyansky et al. 2026 · Jungherr & Schott 2021 · Drozd et al. 2026 · Albuquerque 2024exclude utilities 48 (47 direct, +1 via a flag)
exclude SIC 4900–4999 46 pkg · 28 spellings
variables:sic,sic4,sic2,siccd,sic2s,sic3drop if sic>=4900 & sic<=4999×14drop if sic2==49×5drop if inrange(sic,4900,4999)×3drop if sic>=4900 & sic<5000×3drop if sic4>=4900 & sic4<=4999×2drop if sic>4899 & sic<5000×2drop if substr(sic,1,2)=="49"×2drop if 4900<=sic & sic<5000×1drop if inrange(sic2,49,49)×1drop if sic2=="49"×1drop if sic2s==49×1drop if sic3>=490 & sic3<500×1
Packages (40 of 46, most rows first): Fich et al. 2023 · Huang & Sacchetto 2026 · Lu & Wu 2026 · Ersahin et al. 2024 · Geelen et al. 2024 · Wang 2026 · Bilokha et al. 2026 · Le et al. 2024 · Bordalo et al. 2026 · Lamoreaux et al. 2026 · Baqaee & Farhi 2020 · Cohn et al. 2022 · Avenancio-León et al. 2025 · Jungherr & Schott 2021 · Celentano & Rempel 2026 · Jeenas 2026 · Monacelli et al. 2023 · Ersahin et al. 2024 · Hegde et al. 2023 · Choi et al. 2025 · Choi et al. 2025 · Jha et al. 2026 · Boustanifar & Kang 2025 · Dupont & Freeman 2026 · Colombo et al. 2026 · Ivanov et al. 2026 · Gnewuch & Zhang 2025 · Asriyan et al. 2025 · Vlokhoven 2024 · Corbae & D’Erasmo 2021 · Anderson & Cesa-Bianchi 2024 · Almeida et al. 2024 · Ewens et al. 2024 · Pazarbaşı 2026 · Friberg et al. 2024 · Crouzet & Eberly 2021 · Kim et al. 2026 · Cremers et al. 2025 · GIBBONS 2024 · Bourveau et al. 2020exclude NAICS 22 4 pkg · 3 spellings
variables:naics2,naicsq2,naics2017drop if naics2==22×2drop if naicsq2==22×1drop if substr(naics2017,1,2)=="22"×1
Packages (40 of 48, most rows first): Fich et al. 2023 · Huang & Sacchetto 2026 · Lu & Wu 2026 · Ersahin et al. 2024 · Geelen et al. 2024 · Wang 2026 · Bilokha et al. 2026 · Le et al. 2024 · Bordalo et al. 2026 · Hubmer & Restrepo 2026 · Lamoreaux et al. 2026 · Baqaee & Farhi 2020 · Cohn et al. 2022 · Avenancio-León et al. 2025 · Jungherr & Schott 2021 · Ivanov et al. 2026 · Celentano & Rempel 2026 · Vlokhoven 2024 · Jeenas 2026 · Monacelli et al. 2023 · Ersahin et al. 2024 · Hegde et al. 2023 · Choi et al. 2025 · Choi et al. 2025 · Jha et al. 2026 · Boustanifar & Kang 2025 · Dupont & Freeman 2026 · Colombo et al. 2026 · Gnewuch & Zhang 2025 · Asriyan et al. 2025 · Corbae & D’Erasmo 2021 · Anderson & Cesa-Bianchi 2024 · Almeida et al. 2024 · Ewens et al. 2024 · Pazarbaşı 2026 · Friberg et al. 2024 · Crouzet & Eberly 2021 · Kim et al. 2026 · Cremers et al. 2025 · Meier & Reinelt 2024exclude public administration / unclassified 36 (36 direct)
exclude SIC 9000–9999 25 pkg · 11 spellings
variables:sic,sic2,sic4,sic1,sic_2ddrop if sic>=9000×10drop if sic1==9×2drop if sic2<=99 & sic2>=90×2drop if sic2>=90×2drop if sic>=9000 & sic<=9999×2drop if sic_2d>=90 & sic_2d<=99×2drop if substr(sic,1,1)=="9"×2drop if sic2>=90 & sic2<=99×1drop if sic4>8999×1drop if sic4>=9000 & sic4<=9999×1keep if (FirmSample["sic"]<9000) | (FirmSample["sic"]>9999)×1
Packages: Fich et al. 2023 · Adelino et al. 2023 · Geelen et al. 2024 · Lerch 2025 · Kermani & Ma 2023 · Shao 2025 · Baqaee & Farhi 2020 · Jungherr & Schott 2021 · Celentano & Rempel 2026 · Herrera-Caicedo et al. 2026 · Choi et al. 2025 · Choi et al. 2025 · Kılıç & Tüzel 2026 · Jha et al. 2026 · HEISE et al. 2022 · Colombo et al. 2026 · Ivanov et al. 2026 · Corbae & D’Erasmo 2021 · Anderson & Cesa-Bianchi 2024 · Crouzet & Eberly 2023 · Kim et al. 2026 · LJUNGQVIST et al. 2017 · Guo 2024 · Crouzet et al. 2022 · Lian & Ma 2021exclude NAICS 92 8 pkg · 8 spellings
variables:naics,naics2,naics_2dig,naics2_orig,naics2017drop if naics2==92×2drop if naics==92×2drop if naics2=="92"×1drop if naics2=="92" | naics2_orig=="92"×1drop if naics=="92"×1drop if naics_2dig=="92"×1drop if substr(naics,1,2)=="92"×1drop if substr(naics2017,1,2)=="92"×1
exclude NAICS 90–99 3 pkg · 4 spellings
variables:naics3,naicsdrop if substr(naics,1,1)=="9"×2drop if naics3>=900×1drop if naics=="." | substr(naics,1,1)=="9"×1drop if substr(naics,1,1)=="." | substr(naics,1,1)=="9"×1
exclude NAICS 82–99 2 pkg · 2 spellings
variables:naics_2dig,naics4drop if NAICS_2dig>81×1drop if naics4>8199×1
Packages: Eeckhout et al. 2026 · Haltiwanger et al. 2024exclude NAICS 92–99 1 pkg · 1 spelling
variables:naics3drop if naics3>=920×1
Packages: Eeckhout et al. 2026exclude NAICS 91–99 1 pkg · 1 spelling
variables:naics2drop if naics2>90×1
Packages: Hiraiwa et al. 2024
Packages: Eeckhout et al. 2026 · Fich et al. 2023 · Chetty et al. 2024 · Borusyak & Jaravel 2024 · Replication data for: The Effect of Work 2025 · Adelino et al. 2023 · Geelen et al. 2024 · Barrot & Nanda 2020 · Lerch 2025 · Kermani & Ma 2023 · Shao 2025 · Hiraiwa et al. 2024 · Baqaee & Farhi 2020 · Jungherr & Schott 2021 · Ivanov et al. 2026 · Celentano & Rempel 2026 · Baek et al. 2021 · Herrera-Caicedo et al. 2026 · Levinson & O’Brien 2019 · Choi et al. 2025 · Choi et al. 2025 · Haltiwanger et al. 2024 · Kılıç & Tüzel 2026 · Jha et al. 2026 · HEISE et al. 2022 · Colombo et al. 2026 · Corbae & D’Erasmo 2021 · Anderson & Cesa-Bianchi 2024 · Crouzet & Eberly 2023 · Kim et al. 2026 · LJUNGQVIST et al. 2017 · Davis & Dingel 2020 · Guo 2024 · Crouzet et al. 2022 · Lian & Ma 2021 · Sanati & Beyhaghi 2025keep only manufacturing 33 (31 direct, +2 via a flag)
keep only SIC 2000–3999 17 pkg · 17 spellings
variables:sic87dd,sic,sic4,sic2,sic3,sic_3keep if sic>=2000 & sic<=3999×6keep if sic>=2000 & sic<4000×3drop if sic<2000 | sic>3999×2keep if sic2>=20 & sic2<=39×2keep if sic4>=2000 & sic4<=3999×2keep if sic87dd>=2000 & sic87dd<=3999×2drop if keep_ind==0 ← keep_ind=sic2>=20 & sic2<=39×1drop if sic2<20 | sic2>39×1keep if (CCM_annual_v["sic"]>=2000) & (CCM_annual_v["sic"]<4000)×1keep if (sic_df["SIC_3"]>=200) & (sic_df["SIC_3"]<400)×1keep if (substr(sic,1,1)=="2" | substr(sic,1,1)=="3")×1keep if SIC2_1997>=20 & SIC2_1997<=39×1
Packages: Kim 2026 · Choi et al. 2025 · Borusyak et al. 2022 · Choi 2025 · Fornino & Manera 2022 · Acemoğlu & Restrepo 2019 · Oberfield et al. 2024 · Knesl 2023 · Giroud et al. 2024 · Barrot et al. 2019 · Alessandria et al. 2021 · Buera & Jaef 2025 · Ahlquist & Downey 2023 · HEISE et al. 2022 · Lerch 2025 · Anderson & Cesa-Bianchi 2024 · Mann & Püttmann 2023keep only NAICS 30–39 15 pkg · 18 spellings
variables:naics,naics_code,naics1,naics4,naics_str,naics_sourcekeep if substr(naics,1,1)=="3"×4drop if substr(naics_code,1,1)~="3"×2drop if naics1!="3"×1drop if naics<300000 | naics>=400000×1drop if substr(naics,1,1)!="3"×1keep if manuf ← manuf=(substr(naics97,1,1)=="3")×1keep if mfg_sample==1 ← mfg_sample=substr(naics_code,1,1)=="3"×1keep if naics1=="3"×1keep if naics4>2999 & naics4<4000×1keep if naics>=300000 & naics<400000×1keep if naics_merge==3×1keep if naicsone==3×1
Packages: Flaaen & Pierce 2026 · HEISE et al. 2022 · Boehm et al. 2019 · Boehm & Pandalai-Nayar 2022 · Curtis 2018 · Schoefer & Ziv 2024 · Lake & Liu 2025 · D’Lima et al. 2025 · Ahlquist & Downey 2023 · Levinson 2023 · Kovak & Morrow 2025 · Amiti & Heise 2025 · Cavenaile et al. 2023 · Kwon et al. 2024 · Acemoğlu & Restrepo 2019keep only NAICS 31–33 5 pkg · 6 spellings
variables:naics2,naics,naics_old,naics_2g,naics6,naics_sectkeep if naics2=="31" | naics2=="32" | naics2=="33"×2keep if naics>=310000 & naics<340000×1keep if naics_2g=="31" | naics_2g=="32" | naics_2g=="33"×1keep if naics_sect=="31" | naics_sect=="32" | naics_sect=="33"×1keep if substr(naics6,1,2)=="31" | substr(naics6,1,2)=="32" | substr(naics6,1,2)=="33"×1keep if substr(naics_old,1,2)=="31" | substr(naics_old,1,2)=="32" | substr(naics_old,1,2)=="33"×1
Packages: Amiti & Heise 2025 · Blaum et al. 2026 · Shapiro 2025 · Acemoglu 2023 · Berger et al. 2022keep only NAICS 30–33 1 pkg · 2 spellings
variables:naicskeep if (SIC1987_NAICS2002["NAICS"]>=300000) & (SIC1987_NAICS2002["NAICS"]<340000)×1keep if (mfp_NAICS4_data["NAICS"]>=3000) & (mfp_NAICS4_data["NAICS"]<3400)×1
Packages: Knesl 2023
Packages: Flaaen & Pierce 2026 · Kim 2026 · Choi et al. 2025 · Amiti & Heise 2025 · HEISE et al. 2022 · Borusyak et al. 2022 · Boehm et al. 2019 · Boehm & Pandalai-Nayar 2022 · Curtis 2018 · Acemoğlu & Restrepo 2019 · Choi 2025 · Knesl 2023 · Fornino & Manera 2022 · Schoefer & Ziv 2024 · Oberfield et al. 2024 · Ahlquist & Downey 2023 · Blaum et al. 2026 · Giroud et al. 2024 · Barrot et al. 2019 · Alessandria et al. 2021 · Lake & Liu 2025 · D’Lima et al. 2025 · Buera & Jaef 2025 · Levinson 2023 · Shapiro 2025 · Kovak & Morrow 2025 · Cavenaile et al. 2023 · Lerch 2025 · Anderson & Cesa-Bianchi 2024 · Kwon et al. 2024 · Acemoglu 2023 · Mann & Püttmann 2023 · Berger et al. 2022exclude financials + utilities 9 (9 direct)
exclude SIC 4900–4999, 6000–6999 8 pkg · 5 spellings
variables:sic,sic_interlock,sic1,sic2drop if (sic>=4900 & sic<=4999) | (sic>=6000 & sic<=6999)×3drop if (sic>=6000 & sic<=6999) | (sic>=4900 & sic<=4999)×2drop if (sic>="6000" & sic<="6999") | (sic>="4900" & sic<="4999")×1drop if (sic_interlock>=60 & sic_interlock<70) | sic_interlock==49×1keep if (usa_data.SIC1!="6") & (usa_data.SIC2!="49")×1
Packages: Dou et al. 2021 · Liu 2025 · Romer et al. 2025 · Bali et al. 2026 · Liu & Shivdasani 2026 · Gopalan et al. 2026 · Zhang 2019 · Kim 2021exclude NAICS 22, 52 1 pkg · 1 spelling
variables:naics_2drop if naics_2==22 | naics_2==52×1
Packages: Cirelli & Gertler 2025
Packages: Dou et al. 2021 · Liu 2025 · Romer et al. 2025 · Cirelli & Gertler 2025 · Bali et al. 2026 · Liu & Shivdasani 2026 · Gopalan et al. 2026 · Zhang 2019 · Kim 2021keep only financials 7 (5 direct, +2 via a flag)
keep only SIC 6000–6799 4 pkg · 4 spellings
variables:sic2,siccd,sickeep if (CRSP_monthly["SICCD"]>=6000) & (CRSP_monthly["SICCD"]<=6799)×1keep if fin==1 ← fin=(sic_int>=6000 & sic_int<6800)×1keep if sic2>=60 & sic2<=67×1keep if sic>=6000 & sic<=6799×1
keep only NAICS 52 2 pkg · 2 spellings
variables:naics,naics2keep if naics2==52×1keep if substr(naics,1,2)=="52"×1
Packages: HEISE et al. 2022 · Ottonello & Song 2025keep only SIC 6000–6999 1 pkg · 1 spelling
variables:keep if Fin==1 ← Fin=(sich>=6000) & (sich<=6999)×1
Packages: Corhay & Tong 2026
exclude manufacturing 4 (4 direct)
exclude SIC 2000–3999 2 pkg · 2 spellings
variables:sic3,sic_3drop if sic3>=200 & sic3<400×1keep if (sic_df["SIC_3"]<200) | (sic_df["SIC_3"]>=400)×1
Packages: Knesl 2023 · Mann & Püttmann 2023exclude NAICS 30–39 2 pkg · 2 spellings
variables:naics_code,naics_strdrop if substr(naics_str,1,1)=="3"×1keep if substr(naics_code,1,1)~="3"×1
Packages: Flaaen & Pierce 2026 · HEISE et al. 2022
exclude financials + utilities + public administration / unclassified 2 (2 direct)
exclude SIC 4900–4999, 6000–6999, 9000–9999 2 pkg · 2 spellings
variables:sic,sic2,sic1drop if (sic>=9000) | ((sic>=4900) & (sic<=4999)) | ((sic>=6000) & (sic<=6999))×1drop if sic2==49 | sic1==6 | sic1==9×1
Packages: Geelen et al. 2022 · Binsbergen et al. 2025
Packages: Geelen et al. 2022 · Binsbergen et al. 2025keep only utilities 1 (1 direct)
keep only NAICS 22 1 pkg · 1 spelling
variables:naicskeep if substr(naics,1,2)=="22"×1
Packages: HEISE et al. 2022
Packages: HEISE et al. 2022keep only public administration / unclassified 1 (1 direct)
keep only SIC 9000–9999 1 pkg · 1 spelling
variables:siccdkeep if (CRSP_monthly["SICCD"]>=9000)×1
Packages: Knesl 2023
Packages: Knesl 2023exclude financials + public administration / unclassified 1 (1 direct)
exclude NAICS 52, 92 1 pkg · 1 spelling
variables:naics2drop if inlist(naics2,52,92)×1
Packages: Song & Stern 2025
Packages: Song & Stern 2025
Every readable screen, named or not (top 25 code sets)
sic2 == `l'), a text label, or a non-industry term, and are left out rather than guessed.
Classification used: SIC 285, NAICS 241, GICS 12, FF 11.
A further 238 packages drop rows whose industry code is missing — a data-completeness step, not an industry screen, and not counted above.
98 more packages test an industry code in a way no code set is read from (a loop macro,
code 0 or a code in no sector — a total or "unknown" row, not an industry) and are not counted either.
A variable is read as an industry code only when its name is the code itself: naics_length, naics_level, naics_type or
naics_sic_cat describe a code (its digits, level or category), and are not industry screens.exclude SIC 6000–6999 76 pkg · 47 spellings
variables:sic,sic2,sic4,siccd,sic1,sic3drop if sic>=6000 & sic<=6999×22drop if sic>=6000 & sic<7000×8drop if inrange(sic,6000,6999)×4drop if substr(sic,1,1)=="6"×4drop if sic1==6×3drop if sic2>=60 & sic2<=69×3drop if sic4>=6000 & sic4<=6999×3drop if sic_2d>=60 & sic_2d<=69×3drop if sic2<=69 & sic2>=60×2drop if sic>5999 & sic<7000×2drop if 6000<=sic & sic<7000×1drop if financial==1 ← financial=inrange(sic_n,6000,6999)×1
Packages (40 of 76, most rows first): Kermani & Ma 2023 · Fich et al. 2023 · Wang 2026 · Li et al. 2024 · Huang & Sacchetto 2026 · Gallemore et al. 2025 · Adelino et al. 2023 · Lu & Wu 2026 · Ersahin et al. 2024 · Pankratz & Schiller 2024 · Geelen et al. 2024 · Friberg et al. 2024 · Lian & Ma 2021 · Bilokha et al. 2026 · Le et al. 2024 · Bordalo et al. 2026 · MA 2019 · Griffin et al. 2026 · Lohmeier & Mohrschladt 2026 · MAO et al. 2025 · Cohn et al. 2022 · Jungherr & Schott 2022 · Lamoreaux et al. 2026 · Baqaee & Farhi 2020 · Cabezon & Hoberg 2026 · Ridder 2024 · Avenancio-León et al. 2025 · Boustanifar & Kang 2025 · Rodnyansky et al. 2026 · Jungherr & Schott 2021 · Xu & Zwick 2024 · Dupont & Freeman 2026 · Ottonello & Song 2025 · Celentano & Rempel 2026 · Balsmeier et al. 2024 · Cho et al. 2026 · He & Whited 2026 · Jeenas 2026 · Monacelli et al. 2023 · Ersahin et al. 2024exclude SIC 4900–4999 46 pkg · 28 spellings
variables:sic,sic4,sic2,siccd,sic2s,sic3drop if sic>=4900 & sic<=4999×14drop if sic2==49×5drop if inrange(sic,4900,4999)×3drop if sic>=4900 & sic<5000×3drop if sic4>=4900 & sic4<=4999×2drop if sic>4899 & sic<5000×2drop if substr(sic,1,2)=="49"×2drop if 4900<=sic & sic<5000×1drop if inrange(sic2,49,49)×1drop if sic2=="49"×1drop if sic2s==49×1drop if sic3>=490 & sic3<500×1
Packages (40 of 46, most rows first): Fich et al. 2023 · Huang & Sacchetto 2026 · Lu & Wu 2026 · Ersahin et al. 2024 · Geelen et al. 2024 · Wang 2026 · Bilokha et al. 2026 · Le et al. 2024 · Bordalo et al. 2026 · Lamoreaux et al. 2026 · Baqaee & Farhi 2020 · Cohn et al. 2022 · Avenancio-León et al. 2025 · Jungherr & Schott 2021 · Celentano & Rempel 2026 · Jeenas 2026 · Monacelli et al. 2023 · Ersahin et al. 2024 · Hegde et al. 2023 · Choi et al. 2025 · Choi et al. 2025 · Jha et al. 2026 · Boustanifar & Kang 2025 · Dupont & Freeman 2026 · Colombo et al. 2026 · Ivanov et al. 2026 · Gnewuch & Zhang 2025 · Asriyan et al. 2025 · Vlokhoven 2024 · Corbae & D’Erasmo 2021 · Anderson & Cesa-Bianchi 2024 · Almeida et al. 2024 · Ewens et al. 2024 · Pazarbaşı 2026 · Friberg et al. 2024 · Crouzet & Eberly 2021 · Kim et al. 2026 · Cremers et al. 2025 · GIBBONS 2024 · Bourveau et al. 2020exclude SIC 9000–9999 25 pkg · 11 spellings
variables:sic,sic2,sic4,sic1,sic_2ddrop if sic>=9000×10drop if sic1==9×2drop if sic2<=99 & sic2>=90×2drop if sic2>=90×2drop if sic>=9000 & sic<=9999×2drop if sic_2d>=90 & sic_2d<=99×2drop if substr(sic,1,1)=="9"×2drop if sic2>=90 & sic2<=99×1drop if sic4>8999×1drop if sic4>=9000 & sic4<=9999×1keep if (FirmSample["sic"]<9000) | (FirmSample["sic"]>9999)×1
Packages: Fich et al. 2023 · Adelino et al. 2023 · Geelen et al. 2024 · Lerch 2025 · Kermani & Ma 2023 · Shao 2025 · Baqaee & Farhi 2020 · Jungherr & Schott 2021 · Celentano & Rempel 2026 · Herrera-Caicedo et al. 2026 · Choi et al. 2025 · Choi et al. 2025 · Kılıç & Tüzel 2026 · Jha et al. 2026 · HEISE et al. 2022 · Colombo et al. 2026 · Ivanov et al. 2026 · Corbae & D’Erasmo 2021 · Anderson & Cesa-Bianchi 2024 · Crouzet & Eberly 2023 · Kim et al. 2026 · LJUNGQVIST et al. 2017 · Guo 2024 · Crouzet et al. 2022 · Lian & Ma 2021keep only SIC 2000–3999 17 pkg · 17 spellings
variables:sic87dd,sic,sic4,sic2,sic3,sic_3keep if sic>=2000 & sic<=3999×6keep if sic>=2000 & sic<4000×3drop if sic<2000 | sic>3999×2keep if sic2>=20 & sic2<=39×2keep if sic4>=2000 & sic4<=3999×2keep if sic87dd>=2000 & sic87dd<=3999×2drop if keep_ind==0 ← keep_ind=sic2>=20 & sic2<=39×1drop if sic2<20 | sic2>39×1keep if (CCM_annual_v["sic"]>=2000) & (CCM_annual_v["sic"]<4000)×1keep if (sic_df["SIC_3"]>=200) & (sic_df["SIC_3"]<400)×1keep if (substr(sic,1,1)=="2" | substr(sic,1,1)=="3")×1keep if SIC2_1997>=20 & SIC2_1997<=39×1
Packages: Kim 2026 · Choi et al. 2025 · Borusyak et al. 2022 · Choi 2025 · Fornino & Manera 2022 · Acemoğlu & Restrepo 2019 · Oberfield et al. 2024 · Knesl 2023 · Giroud et al. 2024 · Barrot et al. 2019 · Alessandria et al. 2021 · Buera & Jaef 2025 · Ahlquist & Downey 2023 · HEISE et al. 2022 · Lerch 2025 · Anderson & Cesa-Bianchi 2024 · Mann & Püttmann 2023keep only NAICS 30–39 15 pkg · 18 spellings
variables:naics,naics_code,naics1,naics4,naics_str,naics_sourcekeep if substr(naics,1,1)=="3"×4drop if substr(naics_code,1,1)~="3"×2drop if naics1!="3"×1drop if naics<300000 | naics>=400000×1drop if substr(naics,1,1)!="3"×1keep if manuf ← manuf=(substr(naics97,1,1)=="3")×1keep if mfg_sample==1 ← mfg_sample=substr(naics_code,1,1)=="3"×1keep if naics1=="3"×1keep if naics4>2999 & naics4<4000×1keep if naics>=300000 & naics<400000×1keep if naics_merge==3×1keep if naicsone==3×1
Packages: Flaaen & Pierce 2026 · HEISE et al. 2022 · Boehm et al. 2019 · Boehm & Pandalai-Nayar 2022 · Curtis 2018 · Schoefer & Ziv 2024 · Lake & Liu 2025 · D’Lima et al. 2025 · Ahlquist & Downey 2023 · Levinson 2023 · Kovak & Morrow 2025 · Amiti & Heise 2025 · Cavenaile et al. 2023 · Kwon et al. 2024 · Acemoğlu & Restrepo 2019exclude SIC 6000–6799 13 pkg · 10 spellings
variables:sic,siclag,sich,sic_ndrop if sic>=6000 & sic<=6799×4drop if 6000<=siclag & siclag<=6799×1drop if finance==1 ← finance=sic>=6000 & sic<6800×1drop if inrange(sic,6000,6799)×1drop if sic<=6799 & sic>=6000×1drop if sic>=6000 & sic<6800×1drop if sic_n>=6000 & sic_n<=6799×1keep if !(6000<=sich & sich<=6799)×1keep if fin==0 ← fin=(sic_int>=6000 & sic_int<6800)×1keep if sic<6000 | sic>6799×1
exclude NAICS 52 9 pkg · 6 spellings
variables:naics2,naics2_int,naics2017,naicsdrop if naics2==52×4drop if naics2=="52"×3drop if substr(naics,1,2)=="52"×1drop if substr(naics2017,1,2)=="52"×1keep if cs["naics2_int"]!=52×1keep if naics2!=52×1
exclude NAICS 99 9 pkg · 6 spellings
variables:naics2,naics,naics_2,naicsq2drop if naics2==99×3drop if naics==99×2drop if naics2=="99"×1drop if naics=="99"×1drop if naics_2==99×1drop if naicsq2==99×1
exclude SIC 4900–4949 9 pkg · 7 spellings
variables:sic,sich,siclagdrop if sic>=4900 & sic<=4949×3drop if (sic>=4900 & sic<=4949)×1drop if 4900<=siclag & siclag<=4949×1drop if sic>"4899" & sic<"4950"×1keep if !(4900<=sich & sich<=4949)×1keep if flag_fu==0 ← flag_fu=4900<=sich_num & sich_num<=4949×1keep if sic<4900 | sic>4949×1
exclude NAICS 92 8 pkg · 8 spellings
variables:naics,naics2,naics_2dig,naics2_orig,naics2017drop if naics2==92×2drop if naics==92×2drop if naics2=="92"×1drop if naics2=="92" | naics2_orig=="92"×1drop if naics=="92"×1drop if naics_2dig=="92"×1drop if substr(naics,1,2)=="92"×1drop if substr(naics2017,1,2)=="92"×1
exclude SIC 4900–4999, 6000–6999 8 pkg · 5 spellings
variables:sic,sic_interlock,sic1,sic2drop if (sic>=4900 & sic<=4999) | (sic>=6000 & sic<=6999)×3drop if (sic>=6000 & sic<=6999) | (sic>=4900 & sic<=4999)×2drop if (sic>="6000" & sic<="6999") | (sic>="4900" & sic<="4999")×1drop if (sic_interlock>=60 & sic_interlock<70) | sic_interlock==49×1keep if (usa_data.SIC1!="6") & (usa_data.SIC2!="49")×1
Packages: Dou et al. 2021 · Liu 2025 · Romer et al. 2025 · Bali et al. 2026 · Liu & Shivdasani 2026 · Gopalan et al. 2026 · Zhang 2019 · Kim 2021keep only NAICS 31–33 5 pkg · 6 spellings
variables:naics2,naics,naics_old,naics_2g,naics6,naics_sectkeep if naics2=="31" | naics2=="32" | naics2=="33"×2keep if naics>=310000 & naics<340000×1keep if naics_2g=="31" | naics_2g=="32" | naics_2g=="33"×1keep if naics_sect=="31" | naics_sect=="32" | naics_sect=="33"×1keep if substr(naics6,1,2)=="31" | substr(naics6,1,2)=="32" | substr(naics6,1,2)=="33"×1keep if substr(naics_old,1,2)=="31" | substr(naics_old,1,2)=="32" | substr(naics_old,1,2)=="33"×1
Packages: Amiti & Heise 2025 · Blaum et al. 2026 · Shapiro 2025 · Acemoglu 2023 · Berger et al. 2022exclude NAICS 40–99 4 pkg · 5 spellings
variables:naics4,naics,naics6drop if naics>=400000×2drop if NAICS4>3999×1drop if NAICS4>=4000×1drop if naics6>=400000×1drop if naics>399999×1
exclude NAICS 11 4 pkg · 3 spellings
variables:naics,naics_2dig,naics2drop if naics2==11×2drop if naics==11×1drop if naics_2dig=="11"×1
keep only SIC 6000–6799 4 pkg · 4 spellings
variables:sic2,siccd,sickeep if (CRSP_monthly["SICCD"]>=6000) & (CRSP_monthly["SICCD"]<=6799)×1keep if fin==1 ← fin=(sic_int>=6000 & sic_int<6800)×1keep if sic2>=60 & sic2<=67×1keep if sic>=6000 & sic<=6799×1
exclude SIC 0000–1999 4 pkg · 4 spellings
variables:sic_ext,siccd,sic_seg_main,sic87dddrop if sic87dd<2000×1drop if sic_ext<2000×1drop if sic_seg_main<2000×1drop if siccd<2000×1
exclude SIC 4000–9999 4 pkg · 3 spellings
variables:siccd,sicn,sic4drop if sicn>3999×2drop if sic4>=4000×1drop if siccd>=4000×1
exclude NAICS 22 4 pkg · 3 spellings
variables:naics2,naicsq2,naics2017drop if naics2==22×2drop if naicsq2==22×1drop if substr(naics2017,1,2)=="22"×1
keep only NAICS 7225 4 pkg · 4 spellings
variables:naics,naics_short,naics4dkeep if naics4d==7225×1keep if naics==7225×1keep if naics_short==7225×1keep if substr(naics,1,4)=="7225"×1
exclude NAICS 999 4 pkg · 2 spellings
variables:naics_for_crosswalk,naics3drop if naics3==999×2drop if naics_for_crosswalk==999×2
exclude NAICS 00–29 3 pkg · 2 spellings
variables:naics4,naicsdrop if naics<300000×2drop if NAICS4<3000×1
keep only NAICS 44–45 3 pkg · 3 spellings
variables:naics,naics2,naics_twokeep if naics2==44 | naics2==45×1keep if naics_two %in% c(44,45)×1keep if substr(naics,1,2)=="44" | substr(naics,1,2)=="45"×1
exclude NAICS 52–53 3 pkg · 4 spellings
variables:naics2,naicsq2,naicsdrop if (naicsq2==52 | naicsq2==53)×1drop if inlist(naics,"52","53")×1drop if inlist(naics2,52,53)×1drop if naics2==52 | naics2==53×1
exclude SIC 1000–1499 3 pkg · 3 spellings
variables:sic2,sicdrop if (sic2>=10 & sic2<=14)×1drop if sic2>=10 & sic2<=14×1drop if sic>=1000 & sic<1500×1
exclude NAICS 90–99 3 pkg · 4 spellings
variables:naics3,naicsdrop if substr(naics,1,1)=="9"×2drop if naics3>=900×1drop if naics=="." | substr(naics,1,1)=="9"×1drop if substr(naics,1,1)=="." | substr(naics,1,1)=="9"×1
Keep / drop conditions, by what they test
7,206 of the 10,383 packages keep or drop rows by a condition.
Each row is a kind of condition, counted in packages (% of the 10,383); a package using several kinds counts under each.
Drops right after a merge (drop if _merge==2) are bookkeeping and are left out. Open a row for examples with file:line and the packages.
Missing data
6,609 of the 10,383 packages handle missing values in code. A zero or a value put in a missing cell is split by what it is for: an imputation (the value is unknown and something stands in), or building a variable (a dummy that is 0 when nothing happened).
Sorting into groups
1,564 packages sort a variable into quantile groups (xtile, nq(), pd.qcut) — for portfolios, binned scatters, heterogeneity splits.
- deciles446
- quartiles377
- quintiles345
- percentiles273
- terciles263
- halves262
- 20 bins (vigintiles)148
- 50 groups44
- 1000 groups31
- 200 groups21
Aggregating to a coarser unit
The statistic used when rows are collapsed (collapse (mean) …), by packages.
- mean4146
- sum3135
- max907
- count708
- min388
- first369
- median348
- sd238
Panel frequency declared
- annual2007
- monthly595
- quarterly482
- daily204
- weekly65
- halfyearly17
- hourly2
Units of analysis
- geography2830
- firm1176
- industry862
- demographic858
- person718
- treatment group545
- product387
- household286
- strata213
- bank174
- school154
- fund121
- occupation119
- loan86