Since your window is 15, you should use the option min(15) to suppress the regression coefficients arising out of less than 15 observations.
You can explore more about asreg here https://fintechprofessor.com/2017/12...ions-in-stata/
Code:
. webuse grunfeld, clear . bys company: asreg invest mvalue kstock, wind(year 10) min(10) +--------------------------------------------------------------------+ | _Nobs _R2 _adjR2 _b_mvalue _b_kstock _b_cons | |--------------------------------------------------------------------| 1. | . . . . . . | 2. | . . . . . . | 3. | . . . . . . | 4. | . . . . . . | 5. | . . . . . . | |--------------------------------------------------------------------| 6. | . . . . . . | 7. | . . . . . . | 8. | . . . . . . | 9. | . . . . . . | 10. | 10 .46011588 .30586328 .05693085 .46800615 96.771625 | |--------------------------------------------------------------------| 11. | 10 .5614129 .4361023 .08887698 .88729908 -126.96142 | 12. | 10 .78380282 .72203219 .08872388 1.2292866 -214.23699 | 13. | 10 .71488429 .63342265 .12516278 .42876425 -160.50868 | 14. | 10 .45098464 .29412311 .11227122 .29657166 -65.906213 | 15. | 10 .52009389 .38297786 .0912647 .16681578 85.23875 | |--------------------------------------------------------------------| 16. | 10 .72287646 .6436983 .10511862 .17118093 38.538037 | 17. | 10 .88167177 .8478637 .11069522 .16073767 27.814834 | 18. | 10 .91376003 .88912004 .13377585 .20041587 -91.965695 | 19. | 10 .95105686 .9370731 .1749349 .25069983 -299.34944 | 20. | 10 .94840015 .93365733 .17671561 .34521899 -390.57569 | +--------------------------------------------------------------------+
Comment