Announcement

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

  • Regression Table with fixed effects

    I have been tasked with recreating the table below, I have all the data and have run the necessary's regressions. The only thing that I can't figure out and there seem to be no clear steps online is how to use the outreg2 command to put the findings the the table. It will only show me the y variables.
    Attached Files

  • #2
    Isabel:
    see -table- suite available from Stata 17 onwards.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Isabel,

      I also think, that -table- might work well. Here is an example with 2 OLS regressions.

      Code:
      clear
      webuse auto7.dta, clear
      
      collect clear
      
      * OLS models
      collect: regress price weight length
      collect: regress rep78 weight length
      
      * table
      collect layout (colname[weight length]#result result[N]) (cmdset)
      
      * format the table
      collect style showbase off
      collect style autolevels result _r_b _r_se
      collect label levels cmdset 1 "Model 1" 2 "Model 2"
      
      collect style header result, level(hide)
      collect style header result[N], level(value)
      
      collect style cell border_block, border(right, pattern(nil))
      collect style cell result, nformat (%8.2f)
      collect style cell result[N], nformat (%8.0f)
      
      collect style cell result[_r_se], sformat("(%s)")
      
      * table
      collect preview
      Code:
      -----------------------------
                    Model 1 Model 2
      -----------------------------
      Weight (lbs.)    4.70   -0.00
                     (1.12)  (0.00)
      Length (in.)   -97.96    0.01
                    (39.17)  (0.02)
      N                  74      69
      -----------------------------

      Comment

      Working...
      X