Announcement

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

  • How to save the predicted value of regressions

    Dear Statalists'
    Can any one help me how to save the predicted value of many regressions.
    I have to run 60 regression each year for 20 years.
    I tried this code
    Code:
    by(industry_id year): reg y x1 x2 x3
    then I use predict but I have no results.
    Last edited by Issa Almaharmeh; 20 May 2019, 05:49.

  • #2

    Code:
    ssc describe rangestat 
    ssc install rangestat 
    rangestat (reg) y x1 x2 x3, int(year 0 0) by(industry) 
    gen double predicted = b_cons + b_x1 * x1 + b_x2 * x2 + b_x3 * x3

    Comment


    • #3
      Many thanks for you. It works perfectly.

      Comment

      Working...
      X