-
Categories
- Data (8)
- Learning Resources (11)
- Python (8)
- SAS (13)
- Stata (27)
Archives
- June 2024 (1)
- January 2024 (1)
- September 2023 (1)
- August 2023 (1)
- May 2023 (1)
- February 2022 (2)
- January 2022 (1)
- August 2021 (1)
- September 2019 (1)
- August 2019 (2)
- July 2019 (2)
- May 2019 (1)
- April 2019 (1)
- March 2019 (1)
- August 2018 (3)
- July 2018 (4)
- December 2017 (1)
- November 2017 (1)
- October 2017 (1)
- September 2017 (1)
- April 2017 (2)
- September 2016 (1)
- April 2016 (1)
- December 2015 (1)
- November 2015 (1)
- September 2015 (4)
- August 2015 (5)
- June 2015 (3)
- March 2015 (7)
- February 2015 (2)
Category Archives: Stata
Rolling-window computation in SAS and Stata
SASers often find proc expand plus transformout very useful for rolling-window (or moving-window) computation. Stataers may wonder if there is a counter party in Stata. The answer is “yes”. The command in Stata is rolling. See the manual below: http://www.stata.com/manuals13/tsrolling.pdf The … Continue reading
Posted in Learning Resources, SAS, Stata
Leave a comment
How to remove duplicate GVKEY-DATADATE when using Compustat Annual (FUNDA) and Quarterly (FUNDQ) data?
The annual data (FUNDA) is easy to deal with; we just need to apply the following conditions: indfmt==”INDL” & datafmt==”STD” & popsrc==”D” & consol==”C” If we have converted FUNDA to Stata format, the uniqueness of GVKEY–DATADATE can be verified using … Continue reading
Regression with a large dummy-variable set (e.g., firm and year fixed effects) in Stata
I run a regression in Stata with a Compustat dataset that contains fyear and gvkey. I want to add firm and year fixed effects, so I type the following command: regress DV IV i.fyear i.gvkey But Stata returns the error … Continue reading
Posted in Stata
Leave a comment
Stata command to create Fama-French industry classifications based on SIC codes
[Update on January 18, 2023] I was advised that the installation command in the original post didn’t work anymore. The author now instructed users, on his website, to find packages here. You can download a package, as well as its help … Continue reading
Posted in Stata
30 Comments
Fuzzy match in Stata
Nice article. http://ebp-projects.isr.umich.edu/NCRN/papers/wasi_flaaen_statarecordlinkageutilities.pdf Author’s website: http://www-personal.umich.edu/~nwasi/programs.html For installation, type the following command in Stata: net from http://www-personal.umich.edu/~nwasi/programs net install stnd_compname.pkg Update on August 30, 2018—The foregoing URLs seem broken. Please use the following command to install the package: net from http://www.stata-journal.com/software/sj15-3 net … Continue reading
Posted in Stata
2 Comments
Calculate CFO tenure with Execucomp in Stata
Nice article and nice blog! Happy to find that someone built a similar blog. https://robsonglasscock.wordpress.com/2014/04/01/determining-cfo-tenure-with-execucomp-data/
Which is better for archival accounting research, SAS or Stata?
The short answer is: we need both. When we do archival accounting research, we often need to merge data across various databases, such as COMPUSTAT, CRSP, and EXECUCOMP. Stata can by no means beat SAS in this regard. SAS supports … Continue reading
Posted in Learning Resources, SAS, Stata
2 Comments