Announcement

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

  • First Stage F Statistics

    how to change this command to report the First stage F-Statistics for 2SLS please


    outreg2 using TABLE2_first_stage, addstat("F-statistic", e(F)) adjr2 keep(Z) nocons ctitle("Model 3, Rural") adec(4) addtext("Controls, YES, Region Fixed Effects, YES") excel append addnote("Note: Standard-errors clustered at the region level.")



  • #2
    HTML Code:
    https://www.statalist.org/forums/forum/general-stata-discussion/general/1723649-export-the-output-of-first-stage-in-the-excel
    Code:
     sysuse auto, clear  
    capture program drop res2doc
    program res2doc
    eststo second  //store the second-stage results
    local add: di %5.3f `e(widstat)'
    di `add'
    eststo first: reghdfe `e(instd)' `e(exexog)' `e(inexog)' , absorb(`e(absvars)') cluster(`e(absvars)') //run and store the first-stage
    outreg2 [first second] using myresults, addtext(Ftest IV = `add') word replace see  
    end  
    ivreghdfe price weight headroom (mpg = foreign) , absorb(rep78) cluster(rep78) first
    res2doc
    Last edited by George Ford; 16 Oct 2023, 15:09.

    Comment

    Working...
    X