asreg is a Stata program, written by Dr. Attaullah Shah. The program is available for free and can be downloaded from SSC by typing the following on the Stata command window:
ssc install asreg
asreg was primarily written for rolling/moving / sliding window regressions. However, with the passage of time, several useful ideas were conceived by its creator and users. Therefore, more features were added to this program. The primary uses of asreg can be summarized under the following three headings:
- Rolling window regressions
- by-group regressions
- Fama-MacBeth (1973) regressions
is an order of magnitude faster than estimating rolling window regressions through conventional methods such as Stata loops or using the Stata’s official rolling
has the same speed efficiency as asrol
. All the rolling window calculations, estimation of regression parameters, and writing of results to Stata variables are done in the Mata language. Similarly, estimating Fama and Macbeth(1973) regression through asreg
is several times faster than other available options.
Questions / Answers
Question: How can I get similar results as produced by the Stata’s rolling command
Answer: See a detailed answer here in this post
How to cite?
If you have used asreg in your research, please cite it as follows:
In text : Regressions were estimated using the asreg package of Stata, written by Shah (2017).
Shah, Attaullah (2017) “ASREG: Stata module to estimate rolling window regressions, Fama-MacBeth and by(group) regressions,” Statistical Software Components S458339, Boston College Department of Economics, revised 04 Jul 2023.
Your support keeps these efforts alive