Announcement

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

  • Importantly, gmm(ln_output, lag(1 1) model(level)) does not automatically create differences of the instruments for the level model. You also need to add the difference suboption: gmm(ln_output, lag(1 1) diff model(level))

    It is surprising that your model still seems to pass all of the overidentification tests because it clearly should not. Using levels of the lagged dependent variable as instruments for the level model violates the underlying assumptions (unless there are actually no unobserved unit-specific effects present).

    In principle, you could use a "level GMM" estimator that only uses first differences as instruments for the level model. But if those instruments are valid, then typically those for the first-differenced model should be valid as well and normally they would help with the identification. However, it could be that the instruments for the first-differenced model are quite weak, in which case it might indeed make sense to drop them.

    If the model is underidentified, then all other statistics based on that model need to be interpreted with caution. They may not be reliable.
    https://twitter.com/Kripfganz

    Comment


    • Hello Dr. Kripfganz,
      I really appreciate all your work.

      I am currently having trouble with my dynamic model. N = 299. T = 5.

      I tried to use the postestimation command " estat hausman " to carry out the generalized Hausman test. Here are my codes.

      HTML Code:
      xtdpdgmm L(0/1).surplus3 L.debt CL.debt#CL.debt#CL.debt GSF BCF TOR g  invest poprate , model(fod)  ///  
      gmm(surplus3, lag(1 2) ) gmm(L.debt CL.debt#CL.debt#CL.debt ,lag(1 2) collapse) ///
      gmm(GSF,lag(1 2) )  gmm(BCF,lag(0 .) collapse) gmm(TOR,lag(0 .)) gmm(g,lag(1 .) collapse) ///
      gmm(invest,lag(1 2) collapse)  gmm(poprate,lag(0 2) collapse)  ///
      gmm(BCF TOR poprate,lag(0 0) model(md)) ///
      gmm(surplus3, lag(1 1) diff model(level)) ///
      gmm(L.debt CL.debt#CL.debt#CL.debt GSF BCF TOR g invest poprate, lag(0 0) diff model(level)) ///
      teffects two vce(r)  nl(iid) 
      
      estimates store iid
      
      xtdpdgmm L(0/1).surplus3 L.debt CL.debt#CL.debt#CL.debt GSF BCF TOR g  invest poprate , model(fod)  ///  
      gmm(surplus3, lag(1 2) ) gmm(L.debt CL.debt#CL.debt#CL.debt ,lag(1 2) collapse) ///
      gmm(GSF,lag(1 2) )  gmm(BCF,lag(0 .) collapse) gmm(TOR,lag(0 .)) gmm(g,lag(1 .) collapse) ///
      gmm(invest,lag(1 2) collapse)  gmm(poprate,lag(0 2) collapse)  ///
      gmm(BCF TOR poprate,lag(0 0) model(md)) ///
      gmm(surplus3, lag(1 1) diff model(level)) ///
      gmm(L.debt CL.debt#CL.debt#CL.debt GSF BCF TOR g invest poprate, lag(0 0) diff model(level)) ///
      teffects two vce(r)  nl(noserial) 
      
      estat hausman iid
      However, it appears following mistakes: " conformability error: A matrix, vector, or scalar has the wrong number of rows and/or columns for what is required. Adding a 2 x 3 matrix to a 1 x 4 would result in this error."
      Then I modify my code as:
      HTML Code:
      xtdpdgmm L(0/1).surplus3 L.debt CL.debt#CL.debt#CL.debt GSF BCF TOR g  invest poprate , model(fod)  collapse ///  
      gmm(surplus3, lag(1 2) ) gmm(L.debt CL.debt#CL.debt#CL.debt ,lag(1 2) ) ///
      gmm(GSF,lag(1 2) )  gmm(BCF,lag(0 .) ) gmm(TOR,lag(0 .)) gmm(g,lag(1 .) ) ///
      gmm(invest,lag(1 2) )  gmm(poprate,lag(0 2) )  ///
      gmm(BCF TOR poprate,lag(0 0) model(md)) ///
      gmm(surplus3, lag(1 1) diff model(level)) ///
      gmm(L.debt CL.debt#CL.debt#CL.debt GSF BCF TOR g invest poprate, lag(0 0) diff model(level)) ///
      teffects two vce(r)  nl(iid) 
      
      estimates store iid
      
      xtdpdgmm L(0/1).surplus3 L.debt CL.debt#CL.debt#CL.debt GSF BCF TOR g  invest poprate , model(fod)  collapse ///  
      gmm(surplus3, lag(1 2) ) gmm(L.debt CL.debt#CL.debt#CL.debt ,lag(1 2) ) ///
      gmm(GSF,lag(1 2) )  gmm(BCF,lag(0 .) ) gmm(TOR,lag(0 .)) gmm(g,lag(1 .) ) ///
      gmm(invest,lag(1 2) )  gmm(poprate,lag(0 2) )  ///
      gmm(BCF TOR poprate,lag(0 0) model(md)) ///
      gmm(surplus3, lag(1 1) diff model(level)) ///
      gmm(L.debt CL.debt#CL.debt#CL.debt GSF BCF TOR g invest poprate, lag(0 0) diff model(level)) ///
      teffects two vce(r)  nl(noserial)
      It showed that the error disappears when taking all instruments "collapse". So I have two queries.
      First, why is this a problem? Is it " nl(noserial)" should cooperated with "collapse"?
      Second, is there any obvious error in my code?
      Again I really appreciate all your work, thank you in advance.

      Comment


      • Chen ly
        The error message about the conformability error sounds like a bug in the code of xtdpdgmm, although I cannot replicate it with other data sets. Whether you use collapse or not, you should not see this error message. May I ask if you are using the latest version of the command (2.3.8)? (Type which xtdpdgmm to see the version you are using.)
        If you are using the latest version, would it be possible to share your data set with me by e-mail so that I can investigate the problem?
        https://twitter.com/Kripfganz

        Comment


        • Thank you so much, professor Kripfganz. I have already sent the e-mail to you, please check it. I am looking forward to hearing from you.

          Comment


          • The problem reported by Chen ly had been fixed with the recent update to version 2.3.8. This version is now also available on SSC.
            https://twitter.com/Kripfganz

            Comment


            • Dear Prof. Kripfganz

              I am new to Panel Data regression and to the xtdpdgmm syntax.

              In my research, I am using a subset of 58 country-specific data over 14 years .

              The following is the model which I used for larger number of countries (around 190) but wanted to check the same for the subset of country groupings. I am getting some errors:

              xtdpdgmm LFPR_FEM_TOT l.LFPR_FEM_TOT LnGDP_2017 Sq_LnGDP_2017 Ln_Rail_Norm Fertility_Rate Indv_Internet_PerPop urbn_pop_tot Trade_Per_GDP if Year>2009, twostep vce(cluster CCode) teffects gmmiv(l.LFPR_FEM_TOT, lag(0 5) collapse model(fodev)) gmmiv(LnGDP_2017, lag(1 5) collapse model(fodev)) gmmiv(Ln_Rail_Norm Fertility_Rate Indv_Internet_PerPop urbn_pop_tot Trade_Per_GDP, lag(1 2) collapse model(level)) nofootnote

              Click image for larger version

Name:	Screenshot 2021-09-02 at 2.16.53 AM.png
Views:	1
Size:	133.5 KB
ID:	1625864



              Kindly guide me about the mistakes I am making and the errors in model specification. How can I improve upon them and in building the model?
              Last edited by Vaibhav Puri; 01 Sep 2021, 16:01.

              Comment


              • I am not sure to what "errors" you are referring. Clearly, it is troubling that so many coefficients are omitted. The main problem appears to be with your data: You only have 7 groups which is way too few for this type of estimation. I am afraid the kind of subset analysis you would like to do is infeasible. You might want to introduce some interaction effects (country group dummies with regressors of particular interest) into the estimation on the whole sample instead.
                https://twitter.com/Kripfganz

                Comment


                • I have fixed a minor bug in xtdpdgmm that could result in an incorrect error message in rare instances when using option vce(cluster) on a subsample of the data. The new version 2.3.9 is available on my website:
                  Code:
                  net install xtdpdgmm, from(http://www.kripfganz.de/stata/) replace
                  https://twitter.com/Kripfganz

                  Comment


                  • Hi Dr. Kripfganz,

                    Thank you for the effort on this package which does help researchers a lot. I have a small question regarding the constraint on coeffcients. Let's say if I wish to set a predetermined variable's coefficient to 1 as an additional constraint, does xtdpdgmm support the following kind of coding currently

                    Code:
                    constraint 1 x1 = 1
                    Or maybe this type:

                    Code:
                    test _b1 = 1
                    Thank you!

                    Comment


                    • xtdpdgmm does not support constrained estimation, but testing linear restrictions after the estimation is possible:
                      Code:
                      test _b[x1] = 1
                      or
                      Code:
                      test x1 = 1
                      https://twitter.com/Kripfganz

                      Comment


                      • Dear Sebastian Kripfganz,

                        I have 2 questions related with xtdpdgmm:

                        1) In your London Stata Conference slides there is a sentence: "These nonlinear moment conditions are redundant when added to the sys-GMM moment conditions (Blundell and Bond, 1998) but improve efficiency when added to the diff-GMM moment conditions" related with nonlinear moment conditions. Does this mean that using noserial option with system GMM is meaningless? In other words, while applying system GMM there is no need for adding nonlinear moment conditions. Am I correct?

                        2) As I understand from the xtdpdgmm syntax, when you add differenced instruments for level form to the difference GMM syntax it becomes system GMM. And inside xtdpdgmm syntax, you have to categorize all variables that exist in main model as instruments (endogenous, predetermined and exogenous). For example:

                        e endogen
                        p predetermined
                        s strictly exogenous

                        xtdpdgmm L(0/1).depvar e p s, model(diff) collapse gmm(depvar, lag(2 .)) gmm(e, lag(2 .)) gmm(p, lag(1 .)) gmm(s, lag(0 .)) two vce(r) teffects nofooter

                        Now my questions is: when you add differenced instruments for level form to go for system GMM, should we categorize all variables as instruments for level form? Or we can use some of them? In other words, can we add only lets say gmm(depvar e p, lag(1 1) m(l) diff) to the abovementioned syntax to make it system GMM or we have to add all variables like gmm(depvar e p, lag(1 1) m(l) diff) gmm(s, lag(0 0) m(l) diff) ?
                        Just to make sure I am asking my question in a right way I put it in another way: Should we categorize all variables as differenced instruments for level form? or some of them will be enough in terms of syntaxing for system GMM?

                        Thank you in advance

                        Comment


                        • 1. The nonlinear moment conditions that are added with option nl(noserial) are redundant if gmm(depvar, lag(2 .) model(diff)) and gmm(depvar, diff lag(1 1) model(level)) are also specified; see Blundell and Bond (1998, Journal of Econometrics, page 124). Strictly speaking, this redundancy only holds if there is no curtailing and no collapsing of the instruments, although I probably would not use this as an argument to add nonlinear moment conditions to a system GMM estimator. So, yes, in general there is no need for adding nonlinear moment conditions to a system GMM estimator that has lagged levels of the dependent variable as instruments for the first-differenced model and the first-differenced lagged dependent variable as an instrument for the level model.

                          2. You do not necessarily have to add all of these instruments for the level model if you believe that some of them are not needed or not valid. You can still call it a "system GMM" estimator as long as you include some of them.
                          https://twitter.com/Kripfganz

                          Comment


                          • Thank you very much dear Sebastian.

                            Have a nice day.

                            Comment


                            • Dear Sebastian,

                              I have a question related with how to apply interaction term in xtdpdgmm syntax. In xtabond2, when I want to interact var1 with var2, I have to write it like c.var1##c.var2 inside the syntax. What about xtdpdgmm? I tried same kind but it didn't work. I will appreciate if you provide an answer for me.

                              Thanks in advance.

                              Have a nice day.

                              Comment


                              • It should work in the same way with xtdpdgmm. Could you be more specific about what did not work, ideally by providing code and Stata output?
                                https://twitter.com/Kripfganz

                                Comment

                                Working...
                                X