Announcement

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

  • How to use outreg2 after xtoverid command

    Dear all,

    I am writing to ask about what options should I put in order to export the Sargan-Hansen statistic to the word document ?

    Kind Regards,
    Siu

  • #2
    outreg2 and xtoverid are from SSC.

    Code:
    webuse grunfeld
    xtreg invest mvalue kstock, re
    xtoverid
    return list
    outreg2 using myfile.rtf, addstat("Sargan-Hansen statistic", `r(j)')
    Res.:

    Code:
    . xtoverid
    
    Test of overidentifying restrictions: fixed vs random effects
    Cross-section time-series model: xtreg re   
    Sargan-Hansen statistic   2.131  Chi-sq(2)    P-value = 0.3445
    
    . return list
    
    scalars:
                    r(jdf) =  2
                     r(jp) =  .3444924618801534
                      r(j) =  2.131366140205294
    
    
    
    
      
    (1)
    VARIABLES invest
    mvalue 0.110***
    (0.0105)
    kstock 0.308***
    (0.0172)
    Constant -57.83**
    (28.90)
    Observations 200
    Number of company 10
    Sargan-Hansen statistic 2.131

    Comment

    Working...
    X