Announcement

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

  • Export table firststage when using T2LS

    Good morning one and all,
    I want to export my table results from a TSLS regression to Word. I want to export my first-stage results. However, when I used outreg2, I just obtained TSLS final results.

    I tried doing it by hand, running the first stage and then a second stage and exporting both tables separately. However, I am using three endogenous variables and four IVs, so doing this by hand is not possible (or I do not know how to do it) because reg only considers one dependent variable, and I have three.

    Can you advise me on how I can get first-stage results in a Word document?

    I appreciate any help you can provide.
    Diego


  • #2
    Find some example in the manual and provide a reproducible example. Or with your data. There are several implementations in the forum with one endogenous variable, but I will need to experiment with more than one.

    Comment


    • #3
      Here's a sketch of something that works.

      Code:
      sysuse auto, clear
      
      capture program drop res2doc
      program res2doc
      eststo second  //store the second-stage results
      eststo first: reg `e(endog)' `e(exog)'  //run and store the first-stage
      outreg2 [first second] using myresults, word replace see 
      end
      
      ivregress 2sls price weight headroom (mpg = foreign) , first
      res2doc


      Comment

      Working...
      X