Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exracting variables from many regressions

    Hello

    ​I am a running a series of regressions (total of 60) like below:

    regress ABEV3 RmRf SMB HML RMW CMA
    regress BTOW3 RmRf SMB HML RMW CMA
    regress BRSR6 RmRf SMB HML RMW CMA
    regress BVMF3 RmRf SMB HML RMW CMA
    regress BRML3 RmRf SMB HML RMW CMA
    regress BRPR3 RmRf SMB HML RMW CMA
    regress BBDC4 RmRf SMB HML RMW CMA
    etc.

    As you can see, only the first variable changes. For each of these regressions, I need to export to Excel the coef. and the t for the _cons of each of the 60 regressions.
    Any suggestions on how to program this?

    Thank you very much!









  • #2
    Welcome to Statalist, Leo! You have mistakenly posted this question in the wrong forum. Please use the general forum. As for the answer to your question, please consider the -outreg2- or -estout- commands (both are available from SSC). If you want an inbuilt solution, try -help est store- and -help est tab-. On a separate note, in case you weren't aware, you could write your code concisely by using loops. Please see -help foreach-.

    Comment


    • #3
      Thank you very much!
      ​Estout worked nicely

      Sorry about confusing the forum

      Comment

      Working...
      X