Announcement

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

  • Reporting the First stage F-statistic in a 2SLS table (xtivreg) using esttab

    Hi,
    I am trying to export a 2SLS regression table that includes a scalar for the first-stage F-statistic.
    I am using the code below but Stata is failing to report the F-statistic value to the table.
    Am I doing anything wrong?
    Otherwise, eoes xtivreg store the first-stage F stat somewhere?

    Code:
            *First stage F-stat 
            xtreg X IV i.year, fe robust
            estadd local Fstat = `e(F)'
    
            *2SLS regression
            xtivreg y (X= IV) i.year, fe vce(robust) 
            estadd local Year "Yes"
            estadd local Firm "Yes"
            estadd local Industry "No"
       
             eststo D1
            
    
        *Print table
        esttab D1 using "$tables\iv_table.tex" , ///
        replace noobs b(%10.3f) se star(* 0.10 ** 0.05 *** 0.01)  ///
        scalars("Fstat IV First-stage F-stat" "N Number of Obsevations" "ar2 Adjusted R squared"  "Year Year Fixed Effects" "Firm Firm Fixed Effects" "Industry2 Industry (2dig) Fixed Effects") sfmt( %10.0f %10.3f)  ///
        align(cccc) nomtitles  label nogaps numbers nonotes keep(IPP_output1998)

  • #2
    #4 should help: https://www.statalist.org/forums/for...-stage-outcome. estout is from the Stata Journal/ SSC, as you are asked to explain (FAQ Advice #12).

    Comment

    Working...
    X