Announcement

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

  • Sebastian Kripfganz
    replied
    Zainab Mariam
    1) If you are not using the teffects option, then you do have to include the time dummies explicitly in your regression model.
    2) Both codes are generally correct. In a strict sense, for a difference-GMM estimator you would use the second code (plus option nolevel). However, if the industry dummies are time-invariant, then you have to use the first code because they would otherwise be omitted.
    3) For option nolevel, please see my post #374 in this thread.
    4) Yes.
    5) If you combine teffects and nocons, the command will add an additional time dummy instead of the intercept. This changes the interpretation of the time dummies but leaves everything else unchanged.
    6) igmm specifies the iterated GMM estimator. Whether you include time effects or not is independent of this choice.
    7) There is nothing wrong with it.

    Hamid muili
    Please check whether you have the latest version of the command. If you type
    Code:
    which xtdpdgmm
    the command version should be 2.6.2. If it is not, please update the command. After the update, it is recommended to restart Stata. I hope this solves the problem.

    It is customary to report the test with the 2-step weighting matrix.

    Leave a comment:


  • Hamid muili
    replied
    After estimating my difference gmm using the xtdpdgmm I was only able to estimate the estat. overid but the estat serial gives error
    Non class found where class required..pls what the problem.. Also the Hansen test which one is to be interpreted.. The 2 step weighting matrix or 3 step weighting matrix

    Leave a comment:


  • Zainab Mariam
    replied
    Eagerly waiting for a response, please!

    Sorry for any inconvenience.

    Thank you in advance.

    Leave a comment:


  • Zainab Mariam
    replied
    Dear Professor Sebastian,

    Many thanks for your response. I still have the following questions, please!

    A) You kindly mention in your third point: “You would add the dummies as additional regressors”. Thus, my question is:

    1) Do you mean that I do have to or (do not have to) include the dummies in the baseline regression model?

    B) Also, you mention in your third point: “You would add the dummies as additional regressors and as instruments in an iv() option”. Indeed, I will include industry dummy variables in my regression model. Thus, my question is:

    2) Which of the following codes is correct and I can use to implement the Difference Gmm estimator?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10 i.ind, model(diff) collapse gmm(y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0))///
    > iv(i.ind, model(level)) teffects two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10 i.ind, model(diff) collapse gmm(y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0))///
    > iv(i.ind) teffects two vce(r)

    If none of the previous codes is correct, what is the correct code I have to use in order to implement the Difference GMM estimator, given that the regression model includes industry and time dummies?

    C) Moreover, you mention: “For time dummies, you can alternatively simply combine the two options teffects and nolevel”. Thus, my questions are:

    3) Here, what does ‘nolevel’ stand for? i.e., what does ‘nolevel’ serve here?

    4) For time dummies, do you mean that I can use the following code to implement the Difference GMM estimator?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons teffects nolevel two vce(r)

    D) In some of your slides, the option ‘teffects’ is accompanied with ‘igmm’ in the same code, but not accompanied with ‘nocons’ in the same code. Thus, my questions are:

    5) Does this mean it is wrong to use ‘teffects’ with ‘nocons’? i.e., is it better not to use ‘teffects’ with ‘nocons’?

    6) Is it better to use ‘teffects’ with ‘igmm? i.e., is it wrong not to use ‘teffects’ with ‘igmm’?

    7) Is it wrong to use the four options ‘nocons’ ‘teffects’ ‘nolevel’ ‘two’ in the same code?

    Your help, patience and cooperation are appreciated.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    1) For the difference-GMM estimator, the two versions are equivalent. In the first version, the "global" option model(diff) sets the default for all gmm() options.

    2) Similarly, the "global" option collapse sets the default for all gmm() options. Thus, the two versions are again equivalent.

    3) You would add the dummies as additional regressors and as instruments in an iv() option. For time dummies, you can alternatively simply combine the two options teffects and nolevel.

    Leave a comment:


  • Zainab Mariam
    replied
    Dear Professor Sebastian,

    Many thanks for your reply.

    1) To implement the Difference GMM estimator using your command ‘xtdpdgmm’, do I have to mention the option model(diff) only once (specifically, after mentioning the model’s variables)?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    Or do I have to mention the option model(diff) in each gmm brackets?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, collapse gmm(y, lag(2 4) model(diff)) gmm(L.x1, lag(2 4) model(diff)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3) model(diff)) gmm(x10, lag(0 0) model(diff)) ///
    > nocons two vce(r)

    2) To implement the Difference GMM estimator using your command ‘xtdpdgmm’, do I have to mention the option collapse only once (specifically, before the first gmm brackets)?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    Or do I have to mention the option collapse in each gmm brackets?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) gmm(y, lag(2 4) collapse) gmm(L.x1, lag(2 4) collapse) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3) collapse) gmm(x10, lag(0 0) collapse) ///
    > nocons two vce(r)


    3) To implement the Difference GMM estimator using your command ‘xtdpdgmm’, can I include dummies (such as industry, country and year dummies) in my regression model? If so, what do I have to include in the code?

    Your cooperation is highly appreciated.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    All three codes appear to be equivalent.

    gmm() is just an abbreviation of gmmiv(). iv() is a collapsed version of gmmiv(). The help file states:
    gmmiv(varlist, lagrange(#_1 #_2) collapse) is equivalent to iv(varlist, lagrange(#_1 #_2)).

    Leave a comment:


  • Zainab Mariam
    replied
    Dear Professor Sebastian,

    Thank you for your response.

    1) To implement the Difference GMM estimator using your command ‘xtdpdgmm’, I wonder whether the following codes are different or equivalent.

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(L.y, lag(1 3)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    . xtdpdgmm y L.y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    . xtdpdgmm y L.(y x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    Where:
    y is the dependent variable;
    L.y is the lagged dependent variable as a regressor;
    L.x1 is the independent variable;
    L.x2, L.x3, L.x4, L.x5, L.x6, L.x7, L.x8, L.x9, x10 are the control variables.

    2) Is there any difference between the options: gmmiv( ), gmm( ), and iv( )?

    I do appreciate your cooperation.
    Last edited by Zainab Mariam; 15 Aug 2022, 08:06.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Both codes are equivalent. You may choose whichever you find more intuitive.

    Leave a comment:


  • Zainab Mariam
    replied
    Dear Professor Sebastian,

    Thank you for your reply.

    In the first gmm brackets, do I have to put the dependent variable y itself?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    or do I have to put the lagged dependent variable L.y (the regressor)?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(L.y, lag(1 3)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    Your cooperation is highly appreciated.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    One would normally consider the lagged dependent variable as predetermined, not endogenous. In this case, all codes would be "correct", although the first two codes would be preferable because they already use the second lag of y (i.e. the first lag of L.y) as an instrument, which is stronger than only the second lag of L.y (i.e. the third lag of y). As far as I can see, the first two codes are equivalent.

    With the latest version of the xtdpdgmm package, you can use the xtdpdgmmfe command to specify predetermined and endogenous variables. It will also show you the appropriate xtdpdgmm code; see my post #450 above.

    As "contemporaneous value of the lagged control variable" L.x5, I would consider L.x5. x5 is the "contemporaneous value of the control variable" x5.

    Leave a comment:


  • Zainab Mariam
    replied
    Dear Professor Sebastian,

    I am using Stata 14. The data type of my research is panel data (unbalanced), the time period is 22 years, 5084 firms. My model includes 10 explanatory variables (L.x1, L.x2, L.x3, L.x4, L.x5, L.x6, L.x7, L.x8, L.x9, x10). The dependent variable y of my research is a limited dependent variable and truncated between zero and one.

    I have a dynamic model (my regression model includes the lagged dependent variable L.y as a regressor).

    1) I will apply the Difference GMM estimator using your command ‘xtdpdgmm’. I will consider the lagged dependent variable L.y as endogenous, the independent variable L.x1 as endogenous, while the variables L.x2, L.x3, L.x4, L.x5, L.x6, L.x7, L.x8, L.x9 as predetermined, and the variable x10 (firm age) as exogenous. Thus, my first question is: which of the following codes is/are correct and I can use to implement the Difference GMM estimator?


    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(y L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(L.y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(L.y L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(L.y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(. .)) ///
    > nocons two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(L.y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(1 3)) gmm(x10, lag(0 2)) ///
    > nocons two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(L.y, lag(2 4)) gmm(L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(0 2)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(L.y L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(0 2)) gmm(x10, lag(0 0)) ///
    > nocons two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(L.y L.x1, lag(2 4)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(0 2)) gmm(x10, lag(. .)) ///
    > nocons two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10, model(diff) collapse gmm(L.y, lag(2 .)) gmm(L.x1, lag(2 .)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9, lag(0 .)) gmm(x10, lag(. .)) ///
    > nocons two vce(r)


    2) If none of the previous codes is correct, what is the correct code I have to use in order to implement the Difference GMM estimator?

    3) What is the contemporaneous term of the lagged control variable? For instance, is x5 (i.e., the variable x5 at time 0) the contemporaneous value of the lagged control variable L.x5? or is L.x5 (i.e., the variable x5 at time t minus 1) the contemporaneous value of the lagged control variable L.x5?

    Sorry for the long message.
    Thank you in advance.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Thanks to Kit Baum, the latest version 2.6.2 of xtdpdgmm with all the updates from the recent weeks is now also available on SSC.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Nicu Sprincean
    This happens if the previous version of the command is still in memory when you perform the update. There are two solutions:
    (a) restart Stata, or (b) run the command clear mata.

    Joseph L. Staats
    1. If you were using all available lags for the FOD model, then additional lags (beyond the first lag) of instruments in levels are redundant. (Essentially, you would be introducing perfect collinearity among the instruments.) Technically, this is no longer the case when you restrict the maximum lag order for the FOD model. However, in the empirical practice there is hardly ever more than 1 lag used for the model in levels.
    2. It is quite common that you observe opposite signs for the coefficients of the contemporaneous and the lagged variables. This often indicates that a large initial effect is dampened (or sometimes entirely counteracted) in the following period. It is perfectly fine to have effects going in both directions. This is the very nature of simultaneity as a form of endogeneity. While you have constructed models with effects that go in opposite directions, you achieved identification using lags of the respective regressors as instruments.

    Leave a comment:


  • Nicu Sprincean
    replied
    Sebastian Kripfganz,
    There seems to be an error when trying to run the Jochmans portmanteau test: Here is the error:
    Code:
      xtdpdgmm_serial_pm():  3021  class compiled at different times
                     <istmt>:     -  function returned error
    r(3021);

    Leave a comment:

Working...
X