Announcement

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

  • Export AB and Hansen test from xtdpdgmm

    Hello all, once again I am asking for your help.
    I would like to know if there is an easy way to export the Arellano-Bond test for autocorrelation in the residuals and the Hansen overidentification test that xtdpdgmm provides as postestimation.
    I should export them in excel format possibily with estout/esttab.

    THank you very much in advance

  • #2
    estat serial and estat overid after xtdpdgmm store the test results in scalar functions r(); see return list.

    To produce a table with estout, you could proceed along the following lines by first creating a matrix that contains the results of interest:
    Code:
    webuse abdata
    xtdpdgmm L(0/1).n w k, gmm(L.n, l(1 4) c) iv(w k, d) m(d) nocons
    estat serial
    matrix AB = r(z_1), r(p_1) \ r(z_2), r(p_2)
    estout matrix(AB)
    and then customize the estout command as desired.
    https://www.kripfganz.de/stata/

    Comment


    • #3
      Thank you very much.
      I have used your code and I start to understand how to properly export things.

      thank you.

      Comment

      Working...
      X