Announcement

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

  • GMM with xtabond2. Am I doing this right?

    Hi everyone,
    I am trying to run GMM in Stata. I found the xtabond2 function but I am not entirely sure whether I am calling the function in the right way. I am pretty new to stata.
    So, I have an dependent varaible let's say y, an independent variable lets say ind and a global list of some control variables lets say controls = FSize, ROA etc...
    Now initially I am making a strong assumption and lets say that all variables are endogenous so I use
    xi: xtabond2 y L.y z_ind $z_controls, gmm(y z_ind z_controls, lag(2 .) collapse) twostep robust
    Is this correct? Please note that z_controls are the centered control variables.
    Also if I assume that the control variables are exogenous then is the following correct?
    xi: xtabond2 y L.y z_ind $z_controls, gmm(y z_ind, lag(2 .) collapse) iv($z_controls, eq(level)) twostep robust
    Please let me know if the above call to xtabond2 is correct or I should something else or use another package.
    Thank you in advance.

    Last edited by Antonis Elric; 05 May 2025, 09:39. Reason: GMM, xtabond2, help

  • #2
    Cross-posted at https://www.reddit.com/r/stata/comme...ng_this_right/

    Please note that it is a request here and a rule on Reddit to tell people about cross-posting.

    xtabond2 is a command (strictly, not a function) from SSC. I don't have any experience of using it, but I have just one specific comment. You use the xi: prefix command on which see the advisory message in the official help for xi:. Can you say why? I can't see any reason to use xi: here, but someone with more experience may be able to overturn that doubt.


    Comment


    • #3
      Dear Nick,

      You are right about xi: is not needed.
      I was having also year fixed effects so I was using i.Year that why I used xi but in the post I decided to keep it simple but I forgot to remove it.

      Comment

      Working...
      X