Announcement

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

  • Getting stats wihout dublication using outreg2

    Hi. I am struggling to export my nested results to Excel using outreg2. I want to export some stats using the below command; however, the output contains the same stats even though they are different. In estimations hansenp, ar1p, ar2p and chi2p are different but the outcome shows all the same with the first estimation results. The coefficients are okay, they seem as they are. Output is shown like this:

    (1) (2) (3) (4) (5)
    F_2_3_2_2 F_2_3_2_3 F_2_3_3_2 F_2_3_3_3 F_3_2_2_2
    VARIABLES log_return log_return log_return log_return log_return
    L.log_return -0.00576 -0.0115 -0.0103 -0.0128 -0.0166
    (0.0543) (0.0533) (0.0510) (0.0495) (3.908)
    Hansenp 0.00428 0.00428 0.00428 0.00428 0.00428
    ar2p 9.73e-08 9.73e-08 9.73e-08 9.73e-08 9.73e-08
    ar1p 0 0 0 0 0
    chi2p 1 1 1 1 1
    I used the below code to store estimates, and then the far below one with outreg2 to export the results.

    forvalues xx = 2/6 {
    forvalues yy = 2/6 {
    forvalues zz = 2/6 {
    forvalues ww = 2/6 {
    local name F_`xx'_`yy'_`zz'_`ww'
    quietly xtabond2 log_return l.log_return ab_log_return log_relative_volume sub pol i.y i.c, gmm(l.log_return, lag(2 `xx') collapse) gmm(l.ab_log_return, lag(2 `yy') collapse) gmm(l.log_relative_volume, lag(2 `zz') collapse) gmm(l.pol, lag(2 `ww') collapse) iv(sub i.y i.c) orthogonal twostep robust
    estimates store `name'
    }
    }
    }
    }


    outreg2[*] using myfile, replace excel addstat(Hansenp, e(hansenp), ar2p, e(ar2p), ar1p, e(ar1p), chi2p, e(chi2p))

    Thank you so much in advance.
Working...
X