Announcement

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

  • Sebastian Kripfganz
    replied
    Please feel free to include my name in your acknowledgement section. Please also consider directly citing my xtdpdgmm package, e.g. as follows:
    1) Including the second lag of the dependent variable as a regressor can be useful when there are still signs of autocorrelation (e.g. second-order first-difference correlation with the Arellano-Bond test) after including only the first lag. Alternatively, just include the second lag and check the statistical significance of its coefficient.

    2) Any lag of the dependent variable would be treated as predetermined. Effectively, you do not need to do anything about it because the instruments for the first lag already take care of the second lag as well.

    3) You do not have to necessarily use the forward-orthogonal deviations with unbalanced panel data. It is just generally more efficient in this case and therefore recommended.

    4.1) You would use the model in forward-orthogonal deviations instead of the model in first differences (not usually in combination). This can be for the "difference GMM" estimator (which effectively becomes a FOD estimator) and for the "system GMM" estimator.

    4.2) Basically, yes.

    4.3) As with the "difference part", you can have alternatively a "FOD part" of "system GMM".

    4.4) Generally, yes.

    4.5) You do not have the change the level model at all when you use the system GMM estimator with the FOD part.

    4.6) I would probably not include the diff suboption for iv() when using model(fod), but there is nothing wrong about it. For strictly exogenous variables and for dummy variables, I would personally use model(mdev) instead of model(fod), but note that this is not yet standard practice.
    For dummy variables, one would normally assume that they are uncorrelated with the unobserved group-specific effects. In this case, the first of your two system GMM specifications would be more appropriate.

    4.7) As said just above, model(mdev) is appropriate for strictly exogenous variables or dummy variables. For an estimation without a level equation, I would recommend the following instruments:
    Code:
    gmm(x10, model(md) lag(0 0)) gmm(x10, model(fod) lag(0 2)) iv(i.ind, model(md)) iv(i.fc, model(md)) iv(i.mn, model(md))
    For an estimation with a level equation, I would recommend the following instruments:
    Code:
    gmm(x10, model(md) lag(0 0)) gmm(x10, model(fod) lag(0 2)) iv(i.ind, model(level)) iv(i.fc, model(level)) iv(i.mn, model(level))
    Note that I have combined for the strictly exogenous regressor x10 instruments for model(md) and model(fod). The latter are the same as those for predetermined regressors. The former comes additionally for strictly exogenous regressors.

    5) For the traditional "difference GMM" estimator, you should not include the nl(noserial) option. With this option, you can implement the Ahn-Schmidt GMM estimator with nonlinear moment conditions, which can be an alternative to the system GMM estimator.

    6) There is nothing wrong about not using the collapse option with nl(noserial). The logic behind the collapse option in this context is the same as with other instruments, to avoid having too many moment conditions/instruments.

    7) quietly just suppresses all the output. All postestimation commands still work normally.

    8) You might want to include the small option for a small-sample degrees of freedom correction of the standard errors.

    9) The options after the comma can be specified in any order. It does not matter.

    10) This would be the traditional approach, yes. estat overid, difference could still be useful to check some other assumptions, e.g. the correct classification of variables as endogenous, predetermined, or exogenous. Please see the model selection section of my 2019 London Stata Conference presentation for an illustration.

    Leave a comment:


  • Zainab Mariam
    replied
    Dear Professor Sebastian,

    Thank you very much for your swift valuable response. I do not know how to thank you, Professor!

    Can I have your permission to include your name in the acknowledgement section of my PhD thesis? Your help is much more than my supervisors’.

    I still have the following questions, please!

    1) How to decide whether I have to include the second lag of the dependent variable L2.y as a regressor in my regression model?

    2) Do I have to consider the second lag of the dependent variable L2.y as predetermined or exogenous?

    3) I have unbalance panel data. Thus, to implement the Difference GMM estimator using your command ‘xtdpdgmm’, do I have to (can I) include the option “orthogonal” in the code of your ‘xtdpdgmm’ command? If no, what to include instead of “orthogonal” to deal with unbalance panel data in order to implement the Difference GMM estimator using your command ‘xtdpdgmm’?

    4) Regarding forward-orthogonal deviations (FOD). I have the following questions:

    4.1) Is ‘FOD’ applicable for the Difference-GMM estimator? or applicable for the System-GMM estimator? or applicable for both? or is ‘FOD’ applied separately from the Difference-GMM and the System-GMM estimators?

    4.2) Is ‘FOD’ a substitute for (alternative to) the Difference-GMM estimator?

    4.3) Is ‘FOD’ a part of the System-GMM estimator?

    4.4) What I know is that ‘FOD’ is better than the Difference-GMM estimator when the panel data is unbalanced. Am I right?

    4.5) Can I use ‘FOD’ when I am applying the System-GMM estimator? If so, is there any specific option/expression that should be used in the level model (accompanied/compatible with ‘FOD’)?

    4.6) Is the following code correct to use ‘FOD’ in order to implement the Difference-GMM estimator?


    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10 i.ind i.fc i.mn, model(fod) collapse gmm(y, lag(1 3)) gmm(L.x1, lag(1 3)) 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))///
    > iv(i.ind, diff) iv(i.fc,diff) iv(i.mn, diff) two vce(r)

    Where:
    y is the dependent variable;
    L.y is the lagged dependent variable as a regressor (L.y is predetermined);
    L.x1 is the independent variable (L.x1 is endogenous);
    The control variables L.x2, L.x3, L.x4, L.x5, L.x6, L.x7, L.x8, L.x9 are predetermined.
    The control variable x10 (firm age) is exogenous.
    ind, mn are industry and country dummies, respectively.
    cf is a dummy variable that takes the value of 1 for the 3 years 2008, 2009, and 2010.


    4.6) Which is the correct code of the following to use ‘FOD’ in order to implement the System-GMM estimator?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10 i.ind i.fc i.mn, model(fod) collapse gmm(y, lag(1 3)) gmm(L.x1, lag(1 3)) 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))///
    > gmm(y, lag(1 1) diff model(level)) gmm(L.x1, lag(1 1) diff model(level)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9 x10, lag(0 0) diff model(level)) iv(i.ind, model(level)) iv(i.fc, model(level)) iv(i.mn, model(level)) two vce(r)

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10 i.ind i.fc i.mn, model(fod) collapse gmm(y, lag(1 3)) gmm(L.x1, lag(1 3)) 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))///
    > gmm(y, lag(1 1) diff model(level)) gmm(L.x1, lag(1 1) diff model(level)) gmm(L.x2 L.x3 L.x4 L.x5 L.x6 L.x7 L.x8 L.x9 x10, lag(0 0) diff model(level)) iv(i.ind, diff model(level)) iv(i.fc, diff model(level)) iv(i.mn, diff model(level)) two vce(r)


    If none of the previous codes is correct, what is the correct code that I have to use in order to implement the System GMM estimator using (FOD), given that the regression model includes the dummy variable (fc), the country dummies (mn), and the industry dummies (ind)?

    4.7) In some of your slides, you used ‘model(md)’ ‘model(mdev)’. Thus, my questions are: is ‘model(md)’ applicable for the Difference-GMM estimator, or for the System-GMM estimator, or for both?

    How many times do I have to mention ‘model(md)’ in the code for the Difference-GMM estimator and for the System-GMM estimator?

    Where to place ‘model(md)’ in the code for the Difference-GMM estimator and for the System-GMM estimator?

    What to use with ‘model(md)’ in the differenced model? What to use with ‘model(md)’ in the level model?

    To use ‘model(md)’, is it required to use ‘FOD’ i.e., is ‘model(md)’ accompanied with/conditional to using ‘FOD’? Or can I use ‘model(md)’ to implement the Difference-GMM estimator and the System-GMM estimator without using ‘FOD’?

    5) To implement the Difference-GMM estimator, do I have to include the option ‘nl(noserial)’? if so, does it matter where to place it in the code?

    6) Moreover, one of your slides shows the option ‘nl(noserial)’ with ‘collapse’ as follows: nl(noserial, collapse). Thus, is it wrong not to use ‘collapse’ with the option ‘nl(noserial)’?

    7) Some of your slides show ‘quietly’ before your command ‘xtdpdgmm’. Does ‘quietly’ change anything? i.e., is it better to use or not to use ‘quietly’?

    8) In addition to the options ‘teffects’ ‘two’ ‘vce(robust)’, are there any other specific options I have to include in the code to implement the Difference-GMM estimator using your command ‘xtdpdgmm’? if so, are there any conditions to include them in the code?

    9) Is it necessary/important to have a specific order of the code’s components and options? i.e., does the order of the code’s components and options matter?

    10) Please, correct me if I am wrong regarding the order/steps of applying the Difference GMM estimator.

    10.1) I should first run the regression of the Difference GMM estimator. Second, I should apply ‘estat serial, ar(1/3)’ in order to test for serial correlation of residuals. Third, I should apply ‘estat overid’ that performs the Sargan-Hansen test of the overidentifying restrictions in order to test whether the instruments (used for the differenced model) are valid.

    10.2) Also, do I have to change, amend, or add anything to those steps in order to implement the Difference GMM estimator using your command 'xtdpdgmm'?

    10.3) To apply the Difference GMM estimator, there is
    no need to apply ‘estat overid, difference’ that performs the Sargan-Hansen difference test of the overidentifying restrictions in order to test whether the additional instruments employed in the System GMM (used for the level model) are valid. Am I right?

    Your help, patience and cooperation are appreciated.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    1) Correct.

    2) You would usually treat the interaction with an endogenous variable also as endogenous.

    3) For the Difference-GMM estimator, you would normally choose specification 3.1.

    4) If you have time dummies, the effect of the fc dummy is not separately identifiable due to perfect multicollinearity. You will notice that either this dummy or one of the time dummies (or the constant) will be omitted.

    5) Correct.

    6) The overid option has no effect on the estimation of the model. It allows for the computation of additional "difference-in-Hansen" test statistics with estat overid.

    7) You always need to instrument the exogenous regressors (typically by themselves).

    8) This suggestion carries over to dynamic panel models, yes.

    Leave a comment:


  • Zainab Mariam
    replied
    Dear Professor Sebastian,

    Many thanks for your reply. I am very grateful to you for all your help. I still have the following questions, please! Sorry!

    1) I will apply the Difference-GMM estimator. Please correct me if I am wrong. For time dummies, there is no need to create (generate) them manually as additional regressors and as instruments in an iv() option, that is because your command ‘xtdpdgmm’ with the option ‘teffects’ do all that. But for other dummies (such as industry and country dummies), I need to create (generate) them manually.

    2) L.x1 is the independent variable of my regression model, this independent variable (L.x1) is endogenous. My regression model includes a dummy variable (fc, this dummy variable takes the value of 1 for the 3 years 2008, 2009, and 2010). Also, my regression model includes interaction between the endogenous variable (L.x1) with the dummy variable (fc). Thus, do I have to consider this interaction between the endogenous variable (L.x1) and the dummy variable (fc) as predetermined, exogenous, or endogenous?

    3) Also, my regression model includes a dummy variable (mn for country dummies). Which is the correct code of the following in order to implement the Difference-GMM estimator, given that the regression model includes the dummy variable (fc), country dummies (mn), and industry dummies (ind)?


    3.1) Do I have to put ‘diff’ in iv() option for dummies as follows?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10 i.ind i.fc i.mn, 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, diff) iv(i.fc, diff) iv(i.mn, diff) two vce(r)


    3.2) Or do I have to put ‘diff model(level)’ in iv() option for dummies as follows:

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10 i.ind i.fc i.mn, 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, diff model(level)) iv(i.fc, diff model(level)) iv(i.mn, diff model(level)) two vce(r)


    3.3) Or do I have to put ‘model(level)’ in iv() option for dummies as follows?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10i.ind i.fc i.mn, 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)) iv(i.fc, model(level)) iv(i.mn, model(level)) two vce(r)


    3.4) Or do I have not to put anything in iv() option for dummies as follows?

    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10 i.ind i.fc i.mn, 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) iv(i.fc) iv(i.mn) two vce(r)


    If none of the previous codes is correct, what is the correct code that I have to use in order to implement the Difference GMM estimator, given that the regression model includes the dummy variable (fc), the country dummies (mn), and the industry dummies (ind)?

    4) The dummy variable (fc) takes the value of 1 for the 3 years 2008, 2009, and 2010. Thus, my question is: Is it correct to include the dummy variable (fc) and the time dummies in the same regression model (in the same code) as follows?


    . xtdpdgmm L.(0/1) y L.(x1 x2 x3 x4 x5 x6 x7 x8 x9) x10 i.fc, 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.fc, diff) teffects two vce(r)


    5) Please correct me if I am wrong. L.x7 is a control variable.

    5.A) L.x7 is the lag 0 of the control variable L.x7.

    5.B) L2.x7 is the first lag (lag 1) of the control variable L.x7.

    6) To implement the Difference GMM estimator, is it required/necessary to specify the ‘overid’ option in the same line of your command ‘xtdpdgmm’? if so, what is the notion behind that, and what are the outcomes? Is it a substitute for ‘estat overid’? i.e., when the ‘overid’ option is specified in the ‘xtdpdgmm’ command line, does it mean that there is no need to apply ‘estat overid’?

    7) When I apply the Difference GMM estimator, do I have to instrument all the variables included in the regression model? Or do I have to instrument only the endogenous and predetermined variables (i.e., no need to instrument the exogenous)?

    8) According to your post #440
    Then you assume that X1 is endogenous and you want to instrument it in the typical GMM style:
    Code:

    xtdpdgmm Y X1 X2 X3, model(mdev) iv(X2 X3, norescale) gmm(X1, lag(2 8) collapse model(diff)) twostep small vce(robust, dc)

    Notice that I have left the instruments for X2 X3 in the same format as for the traditional fixed-effects regression. This way, you can best compare the results.Thus, my question is: can I replicate your suggestion for dynamic panel data (unbalanced)?

    I am so sorry for the long message, but I do need your help, Professor.

    Your help, patience and cooperation are highly appreciated.

    Leave a comment:


  • 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:

Working...
X