Announcement

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

  • GMM warning, what does this mean?

    Dear Statalis Members,

    when i get my GMM results, it shows that "Warning: Two-step estimated covariance matrix of moments is singular."

    any thoughts on this? what problems it might cause to the robustness of the results?

    thank you in advance.

  • #2
    anyone? help

    Comment


    • #3
      Advice on bumping is given at http://www.statalist.org/forums/help#adviceextras #1

      Your bump is classified there as "crude".

      I don't know why no-one answered. I don't use GMM, but note that a warning is not an error. You could try giving more information. There might be other diagnostics that people versed in GMM could comment on.

      http://www.statalist.org/forums/help#adviceextras #3 also applies to you: consider also comments in http://www.statalist.org/forums/foru...a-with-large-t

      Comment


      • #4
        Try using the one-step estimator and see if it gives very different results? Singular covariance matrices tend to be causes by highly collinear variables. A quick google search shows that one of the consequences is that your regression becomes highly unstable - if you were to take a slightly different sample from the same population, everything (coefficients, R2, ...) could change dramatically.

        PS: http://lmgtfy.com/?q=singular+covariance+matrix+problem
        Last edited by Jesse Wursten; 23 Sep 2016, 03:35.

        Comment


        • #5
          Originally posted by Jesse Wursten View Post
          Try using the one-step estimator and see if it gives very different results? Singular covariance matrices tend to be causes by highly collinear variables. A quick google search shows that one of the consequences is that your regression becomes highly unstable - if you were to take a slightly different sample from the same population, everything (coefficients, R2, ...) could change dramatically.

          PS: http://lmgtfy.com/?q=singular+covariance+matrix+problem
          thank you for your reply.

          i used the one-step estimator and it shows similar results with the same warning.

          i think there is no collinearity problem with the data except the Y and its first lag (which is dynamic). However, the data is unstable to some extent, for example minor changes in lags of GMM instruments would show very different results. This could be GMM itself. as far as i know, it is highly sensitive. if you change one variable, the results can be very different.

          any other issues that i should pay attention to? or other reasons that i may get this warning? thank you

          Comment


          • #6
            Originally posted by Nick Cox View Post
            Advice on bumping is given at http://www.statalist.org/forums/help#adviceextras #1

            Your bump is classified there as "crude".

            I don't know why no-one answered. I don't use GMM, but note that a warning is not an error. You could try giving more information. There might be other diagnostics that people versed in GMM could comment on.

            http://www.statalist.org/forums/help#adviceextras #3 also applies to you: consider also comments in http://www.statalist.org/forums/foru...a-with-large-t
            thank you for your reply, i realised that warning is not an error. thats why im asking for help on the forum. my friend also gets this warning when he runs GMM.

            if you have colleagues or friends who used GMM before, please forward the question to them if possible.

            thank you

            Comment


            • #7
              My personal advice? Don't use GMM. Even though in theory it's a great estimator, in practice I've found that it is so sensitive to specification choices that you can really show anything you want with it.

              Comment


              • #8
                Originally posted by Jesse Wursten View Post
                My personal advice? Don't use GMM. Even though in theory it's a great estimator, in practice I've found that it is so sensitive to specification choices that you can really show anything you want with it.
                This statement is probably a bit too harsh. While I agree that GMM can be very sensititive to its specification, in particular with small sample sizes and weak instruments, it still has its justification if you know what you are doing and you are aware of the potential pitfalls. On the other side, if you are just pushing a button in Stata (or any other software) without a reasonable justification for your choice of instruments etc., GMM quickly becomes a black box to the inexperienced user and as such can be very dangerous as it might inspire people to tweak the specification until the desired results pop up.

                The open question is of course that about the alternatives and the answer again requires that the user understands which are reasonable model assumptions for a given application. There is no general answer to this. I might just use this occasion to do a bit of house advertising here by promoting a maximum likelihood estimator for dynamic panel models as a potential alternative to GMM (but requiring some strong assumptions) that I have implemented for Stata:
                XTDPDQML: new Stata command for quasi-maximum likelihood estimation of linear dynamic panel models
                Last edited by Sebastian Kripfganz; 06 Oct 2016, 04:23.
                https://www.kripfganz.de/stata/

                Comment


                • #9
                  my results are as follows:
                  xtabond2 cd l.cd l.rep cc l.cc adje lnsales et sst gear rona1 ptbt depsss, gmm(l5.(l.cd rep l.rep cc l.cc ptbr l.depsss), collapse) iv (et lnsales adje gear sst) small noconst robust


                  Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                  Warning: Two-step estimated covariance matrix of moments is singular.
                  Using a generalized inverse to calculate optimal weighting matrix for two-step estimation.
                  Difference-in-Sargan/Hansen statistics may be negative.

                  Dynamic panel-data estimation, one-step system GMM
                  ------------------------------------------------------------------------------
                  Group variable: company Number of obs = 11942
                  Time variable : year Number of groups = 1196
                  Number of instruments = 136 Obs per group: min = 1
                  F(12, 1196) = 98.41 avg = 9.98
                  Prob > F = 0.000 max = 24
                  ------------------------------------------------------------------------------
                  | Robust
                  cd | Coef. Std. Err. t P>|t| [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                  cd |
                  L1. | .7967979 .1289567 6.18 0.000 .5437913 1.049804
                  |
                  rep |
                  L1. | -.1541422 .0765489 -2.01 0.044 -.3043273 -.0039571
                  |
                  cc |
                  --. | .0238792 .0138061 1.73 0.084 -.0032077 .0509662
                  L1. | .0081732 .0325932 0.25 0.802 -.055773 .0721195
                  |
                  adje | .0034303 .0057874 0.59 0.553 -.0079242 .0147849
                  lnsales | 75.56616 44.47633 1.70 0.090 -11.69416 162.8265
                  et | -1.90784 1.748058 -1.09 0.275 -5.337442 1.521762
                  sst | -.0758263 .0612462 -1.24 0.216 -.1959882 .0443357
                  gear | -.2171489 .1022159 -2.12 0.034 -.4176913 -.0166064
                  rona1 | -.0315559 .0171621 -1.84 0.066 -.0652271 .0021152
                  ptbr | 8.03514 5.52628 1.45 0.146 -2.807141 18.87742
                  depsss | 2.786649 2.679001 1.04 0.298 -2.469415 8.042713
                  ------------------------------------------------------------------------------
                  Instruments for first differences equation
                  Standard
                  D.(et lnsales adje gear sst)
                  GMM-type (missing=0, separate instruments for each period unless collapsed)
                  L(1/24).(L6.cd L5.rep L6.rep L5.wc L6.wc L5.ptb L6.deps) collapsed
                  Instruments for levels equation
                  Standard
                  roe lnsales adje gear stinv
                  GMM-type (missing=0, separate instruments for each period unless collapsed)
                  D.(L6.cd L5.rep L6.rep L5.cc L6.cc L5.ptbr L6.depsss) collapsed
                  ------------------------------------------------------------------------------
                  Arellano-Bond test for AR(1) in first differences: z = -1.22 Pr > z = 0.221
                  Arellano-Bond test for AR(2) in first differences: z = -0.01 Pr > z = 0.995
                  ------------------------------------------------------------------------------
                  Sargan test of overid. restrictions: chi2(124) = 0.53 Prob > chi2 = 1.000
                  (Not robust, but not weakened by many instruments.)
                  Hansen test of overid. restrictions: chi2(124) = 131.59 Prob > chi2 = 0.303
                  (Robust, but weakened by many instruments.)

                  Difference-in-Hansen tests of exogeneity of instrument subsets:
                  GMM instruments for levels
                  Hansen test excluding group: chi2(117) = 124.91 Prob > chi2 = 0.291
                  Difference (null H = exogenous): chi2(7) = 6.68 Prob > chi2 = 0.463
                  iv(sst lnsales adje gear et)
                  Hansen test excluding group: chi2(119) = 125.59 Prob > chi2 = 0.322
                  Difference (null H = exogenous): chi2(5) = 6.00 Prob > chi2 = 0.306
                  Last edited by shifting mt; 09 Oct 2016, 16:49.

                  Comment


                  • #10
                    If you look at your GMM-type instruments listed below the regression table, L(1/24).(L6.cd L5.rep L6.rep L5.wc L6.wc L5.ptb L6.deps), you can see that, for example, L(1/24).L5.rep and L(1/24).L6.rep is creating a lot of identical instruments. The two sets of instruments differ only in L1.L5.rep from the first set and L24.L6.rep from the second set. All other lags appear in both of these two sets. That creates perfect collinearity among your instruments and therefore the covariance matrix of moments is singular.

                    By the way: Why are you starting only with the 5th/6th lag? I would expect such high lags not to be very strong instruments.
                    https://www.kripfganz.de/stata/

                    Comment


                    • #11
                      Originally posted by Sebastian Kripfganz View Post
                      If you look at your GMM-type instruments listed below the regression table, L(1/24).(L6.cd L5.rep L6.rep L5.wc L6.wc L5.ptb L6.deps), you can see that, for example, L(1/24).L5.rep and L(1/24).L6.rep is creating a lot of identical instruments. The two sets of instruments differ only in L1.L5.rep from the first set and L24.L6.rep from the second set. All other lags appear in both of these two sets. That creates perfect collinearity among your instruments and therefore the covariance matrix of moments is singular.

                      By the way: Why are you starting only with the 5th/6th lag? I would expect such high lags not to be very strong instruments.

                      thanks so much for the reply.

                      i tried the lag (2 2) command, but it still shows this warning (whether onestep or twostep; system or difference gmm)

                      Comment


                      • #12
                        Do you have time-invariant variables in your model? These would create columns of zeros in the instruments matrix when they are first-differenced.

                        Otherwise, there is not much else that I can say about it.
                        https://www.kripfganz.de/stata/

                        Comment


                        • #13
                          Hi Sebastian
                          I am getting similar problem with warning Warning: Two-step estimated covariance matrix of moments is singular. as shown below. How should I correct this warning ?

                          xtabond2 ROA l.ROA d.LOGSIZEIN LEVTLTA MENIETA NIMLN LIQCSTA AQLNTA GDPG d.HHIDP , gmm (l.ROA, lag(1 2))iv( d.LOGSIZEIN LEVTLTA MENIETA N
                          > IMLN LIQCSTA AQLNTA GDPG d.HHIDP ) nodiffsargan robust small
                          Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                          Warning: Two-step estimated covariance matrix of moments is singular.
                          Using a generalized inverse to calculate robust weighting matrix for Hansen test.

                          Dynamic panel-data estimation, one-step system GMM

                          Group variable: CUID Number of obs = 342
                          Time variable : YEAR Number of groups = 38
                          Number of instruments = 32 Obs per group: min = 9
                          F(9, 37) = 212.62 avg = 9.00
                          Prob > F = 0.000 max = 9

                          Robust
                          ROA Coef. Std. Err. t P>t [95% Conf. Interval]

                          ROA
                          L1. .0395801 .0307721 1.29 0.206 -.02277 .1019302

                          LOGSIZEIN
                          D1. .0258899 .0075086 3.45 0.001 .010676 .0411038

                          LEVTLTA -.0277375 .008373 -3.31 0.002 -.0447027 -.0107722
                          MENIETA -.8939302 .0434832 -20.56 0.000 -.9820356 -.8058248
                          NIMLN .5079331 .0400014 12.70 0.000 .4268824 .5889837
                          LIQCSTA .0198096 .0098966 2.00 0.053 -.0002429 .039862
                          AQLNTA .0784161 .0125584 6.24 0.000 .0529705 .1038618
                          GDPG .000173 .0002033 0.85 0.400 -.0002389 .0005849

                          HHIDP
                          D1. -.0421214 .0468366 -0.90 0.374 -.1370214 .0527785

                          _cons -.0210836 .0123776 -1.70 0.097 -.046163 .0039958

                          Instruments for first differences equation
                          Standard
                          D.(D.LOGSIZEIN LEVTLTA MENIETA NIMLN LIQCSTA AQLNTA GDPG D.HHIDP)
                          GMM-type (missing=0, separate instruments for each period unless collapsed)
                          L(1/2).L.ROA
                          Instruments for levels equation
                          Standard
                          D.LOGSIZEIN LEVTLTA MENIETA NIMLN LIQCSTA AQLNTA GDPG D.HHIDP
                          _cons
                          GMM-type (missing=0, separate instruments for each period unless collapsed)
                          D.L.ROA

                          Arellano-Bond test for AR(1) in first differences: z = -2.59 Pr > z = 0.009
                          Arellano-Bond test for AR(2) in first differences: z = -0.19 Pr > z = 0.849

                          Sargan test of overid. restrictions: chi2(22) = 66.11 Prob > chi2 = 0.000
                          (Not robust, but not weakened by many instruments.)
                          Hansen test of overid. restrictions: chi2(22) = 26.02 Prob > chi2 = 0.251
                          (Robust, but weakened by many instruments.)





                          .

                          Comment


                          • #14
                            You just have 38 groups in your estimation sample, which is very small and is likely to lead to a poor estimation of the weighting matrix. You may consider not to use a system GMM estimator but a first-difference estimator only; option noleveleq. If that is not an option for you and you cannot significantly reduce the number of instruments, I would suggest to simply use the one-step estimator which avoids estimation of the weighting matrix. While the two-step estimator is asymptotically efficient, with 38 groups you are very far away from a situation where the asymptotic properties kick in.

                            As a further remark: Be aware that the option
                            Code:
                            iv( d.LOGSIZEIN LEVTLTA MENIETA NIMLN LIQCSTA AQLNTA GDPG d.HHIDP )
                            is not the same as
                            Code:
                            iv( d.LOGSIZEIN LEVTLTA MENIETA NIMLN LIQCSTA AQLNTA GDPG d.HHIDP , eq(diff)) iv( d.LOGSIZEIN LEVTLTA MENIETA NIMLN LIQCSTA AQLNTA GDPG d.HHIDP , eq(level))
                            If you are unsure what the first specification does, do not use it.

                            More information on the GMM estimation of linear dynamic panel data models in Stata:
                            https://www.kripfganz.de/stata/

                            Comment


                            • #15
                              Sebastian

                              When I tried the first difference option I got the following.

                              xtabond2 ROA l.ROA CATETA d.LOGSIZETA MENIETA MESCNIE LIQCSD AQLNTA GDPG LEVDTEQ d.HHIDP ,gmm (l.ROA, lag(1 2))iv(CATETA d.LOGSIZETA MENI
                              > ETA MESCNIE LIQCSD AQLNTA GDPG LEVDTEQ d.HHIDP ) nolevel nodiffsargan robust
                              Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                              Warning: Two-step estimated covariance matrix of moments is singular.
                              Using a generalized inverse to calculate robust weighting matrix for Hansen test.

                              Dynamic panel-data estimation, one-step difference GMM

                              Group variable: CUID Number of obs = 304
                              Time variable : YEAR Number of groups = 38
                              Number of instruments = 24 Obs per group: min = 8
                              Wald chi2(10) = 4589.15 avg = 8.00
                              Prob > chi2 = 0.000 max = 8

                              Robust
                              ROA Coef. Std. Err. z P>z [95% Conf. Interval]

                              ROA
                              L1. .0656065 .0546938 1.20 0.230 -.0415913 .1728043

                              CATETA .1035225 .0292198 3.54 0.000 .0462527 .1607923

                              LOGSIZETA
                              D1. -.0234816 .0119365 -1.97 0.049 -.0468766 -.0000865

                              MENIETA -.9471743 .0295756 -32.03 0.000 -1.005141 -.8892072
                              MESCNIE -.0126882 .0116163 -1.09 0.275 -.0354558 .0100794
                              LIQCSD -.0148515 .0112092 -1.32 0.185 -.0368212 .0071182
                              AQLNTA .0222578 .0172838 1.29 0.198 -.0116178 .0561333
                              GDPG .0002972 .0002634 1.13 0.259 -.0002191 .0008135
                              LEVDTEQ 7.04e-06 4.49e-06 1.57 0.117 -1.76e-06 .0000158

                              HHIDP
                              D1. -.0234543 .0607433 -0.39 0.699 -.1425091 .0956004

                              Instruments for first differences equation
                              Standard
                              D.(CATETA D.LOGSIZETA MENIETA MESCNIE LIQCSD AQLNTA GDPG LEVDTEQ D.HHIDP)
                              GMM-type (missing=0, separate instruments for each period unless collapsed)
                              L(1/2).L.ROA

                              Arellano-Bond test for AR(1) in first differences: z = -2.65 Pr > z = 0.008
                              Arellano-Bond test for AR(2) in first differences: z = 0.27 Pr > z = 0.788

                              Sargan test of overid. restrictions: chi2(14) = 20.96 Prob > chi2 = 0.103
                              (Not robust, but not weakened by many instruments.)
                              Hansen test of overid. restrictions: chi2(14) = 16.64 Prob > chi2 = 0.276
                              (Robust, but weakened by many instruments.)

                              when I tried the one step system GMM I am still getting the same message as follows

                              xtabond2 ROA l.ROA CATETA d.LOGSIZETA MENIETA MESCNIE LIQCSD AQLNTA GDPG LEVDTEQ d.HHIDP , gmm (l.ROA, lag(1 2))iv(CATETA d.LOGSIZETA MEN
                              > IETA MESCNIE LIQCSD AQLNTA GDPG LEVDTEQ d.HHIDP ) nodiffsargan robust small
                              Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                              Warning: Two-step estimated covariance matrix of moments is singular.
                              Using a generalized inverse to calculate robust weighting matrix for Hansen test.

                              Dynamic panel-data estimation, one-step system GMM
                              ------------------------------------------------------------------------------
                              Group variable: CUID Number of obs = 342
                              Time variable : YEAR Number of groups = 38
                              Number of instruments = 33 Obs per group: min = 9
                              F(10, 37) = 36.53 avg = 9.00
                              Prob > F = 0.000 max = 9
                              ------------------------------------------------------------------------------
                              | Robust
                              ROA | Coef. Std. Err. t P>|t| [95% Conf. Interval]
                              -------------+----------------------------------------------------------------
                              ROA |
                              L1. | .1252962 .0616056 2.03 0.049 .0004713 .2501211
                              |
                              CATETA | .056109 .0099369 5.65 0.000 .035975 .0762431
                              |
                              LOGSIZETA |
                              D1. | .0058789 .0121618 0.48 0.632 -.0187633 .0305212
                              |
                              MENIETA | -.6853067 .0746462 -9.18 0.000 -.8365542 -.5340592
                              MESCNIE | .0186701 .0096278 1.94 0.060 -.0008376 .0381778
                              LIQCSD | .0182827 .0113357 1.61 0.115 -.0046856 .041251
                              AQLNTA | .0423515 .0184765 2.29 0.028 .0049145 .0797884
                              GDPG | .0001109 .0002658 0.42 0.679 -.0004276 .0006494
                              LEVDTEQ | 8.01e-06 6.49e-06 1.23 0.225 -5.15e-06 .0000212
                              |
                              HHIDP |
                              D1. | -.1714125 .0819793 -2.09 0.043 -.3375183 -.0053068
                              |
                              _cons | -.0053594 .0115412 -0.46 0.645 -.028744 .0180253
                              ------------------------------------------------------------------------------
                              Instruments for first differences equation
                              Standard
                              D.(CATETA D.LOGSIZETA MENIETA MESCNIE LIQCSD AQLNTA GDPG LEVDTEQ D.HHIDP)
                              GMM-type (missing=0, separate instruments for each period unless collapsed)
                              L(1/2).L.ROA
                              Instruments for levels equation
                              Standard
                              CATETA D.LOGSIZETA MENIETA MESCNIE LIQCSD AQLNTA GDPG LEVDTEQ D.HHIDP
                              _cons
                              GMM-type (missing=0, separate instruments for each period unless collapsed)
                              D.L.ROA
                              ------------------------------------------------------------------------------
                              Arellano-Bond test for AR(1) in first differences: z = -2.80 Pr > z = 0.005
                              Arellano-Bond test for AR(2) in first differences: z = 0.42 Pr > z = 0.678
                              ------------------------------------------------------------------------------
                              Sargan test of overid. restrictions: chi2(22) = 59.52 Prob > chi2 = 0.000
                              (Not robust, but not weakened by many instruments.)
                              Hansen test of overid. restrictions: chi2(22) = 28.71 Prob > chi2 = 0.153
                              (Robust, but weakened by many instruments.)

                              Will the collapsed command make a difference?

                              regards

                              .


                              Comment

                              Working...
                              X