Announcement

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

  • xtabond using endogenous & twostep options: Coefficients changes depending on variable scaling.

    Dear all,

    Could you help me? I am using xtabond command in Stata 14.0.
    I am estimating a demand function of agricultural government expenditure using panel data. My code is:

    Code:
     . xtabond r_gp, endogenous(r_gdpag_pc r_gdpag_pc_r emp_ag) noconstant twostep artests(2)
    
    Arellano-Bond dynamic panel-data estimation     Number of obs     =         44
    Group variable: country                         Number of groups  =          4
    Time variable: year
                                                    Obs per group:
                                                                  min =         11
                                                                  avg =         11
                                                                  max =         11
    
    Number of instruments =     44                  Wald chi2(4)      =     976.66
                                                    Prob > chi2       =     0.0000
    Two-step results
    ------------------------------------------------------------------------------
            r_gp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            r_gp |
             L1. |  -.9924786   1.548533    -0.64   0.522    -4.027547     2.04259
                 |
      r_gdpag_pc |  -16.24451   10.98417    -1.48   0.139     -37.7731    5.284072
    r_gdpag_pc_r |   41.53995    28.2373     1.47   0.141    -13.80413    96.88404
          emp_ag |   .1012755   .1223274     0.83   0.408    -.1384818    .3410329
    ------------------------------------------------------------------------------
    After this, I simply type,

    Code:
     replace emp_ag = emp_ag / 1000
    Then I run the same code above, I got,

    Code:
     xtabond r_gp, endogenous(r_gdpag_pc r_gdpag_pc_r emp_ag) noconstant twostep artests(2)
    
    Arellano-Bond dynamic panel-data estimation     Number of obs     =         44
    Group variable: country                         Number of groups  =          4
    Time variable: year
                                                    Obs per group:
                                                                  min =         11
                                                                  avg =         11
                                                                  max =         11
    
    Number of instruments =     44                  Wald chi2(4)      =    1320.68
                                                    Prob > chi2       =     0.0000
    Two-step results
    ------------------------------------------------------------------------------
            r_gp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            r_gp |
             L1. |   -1.64613    1.62434    -1.01   0.311    -4.829778    1.537518
                 |
      r_gdpag_pc |  -12.40606   10.11577    -1.23   0.220    -32.23261    7.420486
    r_gdpag_pc_r |   25.01959    23.9783     1.04   0.297    -21.97701    72.01619
          emp_ag |   .0011247   .0012443     0.90   0.366    -.0013141    .0035635
    ------------------------------------------------------------------------------
    I think the difference between the two outcomes should be a digit-change of the coefficient of emp_ag.
    Why?
    Any comments are welcome.




  • #2
    I agree, you would expect only the coefficient of emp_ag to change by a factor of 1000. In fact, the coefficient should go up by this factor, not down.

    I cannot replicate your problem with another data set. The following example yields results as expected:
    Code:
    webuse abdata
    xtabond n, endogenous(w k) noconstant twostep artests(2)
    replace k = k / 1000
    xtabond n, endogenous(w k) noconstant twostep artests(2)
    We would need to see (an extract of) your data, to be able to say anything further; please see the Statalist FAQ about how to provide data extracts.
    https://www.kripfganz.de/stata/

    Comment


    • #3
      Dear Sebastian,

      Thank you so much for your prompt reply.
      My data are as follows.

      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input byte country int year float(r_gp r_gdpag_pc r_gdpag_pc_r emp_ag)
      1 2001 -.1444877  .0400034  .0608303     42.73
      1 2002  .0049242 -.1752827 -.2531517     40.17
      1 2003 -.0283487  .0766007  .1213379     36.69
      1 2004 -.0362767   .100442  .1744614     35.59
      1 2005  .0360913  .0888347  .1423917     35.27
      1 2006   .138225 -.0925616 -.1501752     34.42
      1 2007  .2576762 -.0745275 -.1251584     34.56
      1 2008  .0960079  .0467685  .0824415     34.47
      1 2009 -.1681789 -.0141542 -.0257789 34.850002
      1 2010  -.146495 -.0346162 -.0585688 35.510002
      1 2011   .055703  .0576928  .1068844     31.52
      1 2012 -.1204452 -.0414561 -.0737654     31.68
      1 2013  .0301453   .021363  .0383938     29.91
      2 2001 -.1253686  .0766438  .0250719    1553.4
      2 2002 -.1048163  .0500526  .0143522   1627.65
      2 2003   .098344  .0475999  .0149101   1656.82
      2 2004 -.0394306 -.0419416 -.0020721   1773.38
      2 2005  .1905875 -.0810288 -.0027224    1783.1
      2 2006  -.020539 -.0492334  .0016879    1726.4
      2 2007 -.1020363 -.0253836  .0006409   1657.89
      2 2008 -.1852871  .0047689  .0002831   1614.68
      2 2009  .4050665 -.0554648 -.0057988   1571.47
      2 2010   .049814 -.0087095 -.0013777   1519.84
      2 2011  .1501421  .0309288  .0052309   1468.21
      2 2012 -.1468011  .0197628  .0020399   1378.16
      2 2013 -.2041236  .0347863   .002821   1398.19
      3 2001 -.1337513  .0214425  .0327145 32.260002
      3 2002   .071421 -.0627728 -.0980292 32.370003
      3 2003  .1076111 -.0092118 -.0141251        33
      3 2004  .0123572  .0793024  .1301149      32.2
      3 2005  .0483691  .0217909  .0340109     34.21
      3 2006 -.0292862 -.0290477 -.0451637     34.63
      3 2007 -.0591441 -.0454192 -.0728612     33.55
      3 2008 -.1688979  .0426671   .070419     33.01
      3 2009  .0516445 -.0452219 -.0768165 32.690002
      3 2010  .0734954  .0109796  .0185603     30.66
      3 2011  .0711968  .0172557  .0291037     30.79
      3 2012  .0946514  .0094865  .0161569     30.57
      3 2013 -.1420028  -.011409 -.0197207      31.4
      4 2001 -.0562509 -.0281101 -.0508873     17.05
      4 2002  .0244495 -.0536286 -.0953309 16.779999
      4 2003 -.0234455 -.1124744 -.1922102     16.65
      4 2004  .1002026  .0014993  .0024996     15.31
      4 2005  .0173169    .02732  .0420163     15.41
      4 2006  .0324532  .0567378  .0853806     15.35
      4 2007 -.2141357 -.0468733 -.0775545     16.39
      4 2008  .0187368  .1402289  .2220217        14
      4 2009  .1766987  .0989537  .1559422     13.12
      4 2010 -.0111523 -.0033297 -.0054835     13.98
      4 2011 -.0418975  .0161475  .0264648     14.88
      4 2012  .0091616 -.0483146 -.0808161     15.23
      4 2013 -.0345852 -.0867606  -.142441     15.51
      end
      Thanking in advance for your trouble.
      I am looking forward to your reply.

      Comment


      • #4
        I think the problem is related to your small number of cross-sectional observations (just 4 countries) and the fact that the number of instruments equals the number of observations, in combination with using the two-step estimator. It is essentially impossible to obtain a reasonable estimate of the weighting matrix for the second step and the computation apparently becomes numerically unstable.
        https://www.kripfganz.de/stata/

        Comment


        • #5
          Dear Sebastian,

          Thank you very much for your reply.

          1: First of all, I would like to confirm whether you could replicate my problem using the data I uploaded in the last post.

          2: Actually, my original data contain 21 countries (n=273), but the estimation results fluctuate depending on the digit-change.

          3: I agree that the second step to estimate weighting matrix is unstable. Don't you know any methods to deal with this situation?
          Is there any way to control the iteration process like the initial value, convergence limit, the number of iteration, and so forth ?
          (If possible, could you tell me any materials which details this point?)

          4: Do you think I can obtain the stable estimate using another application? I need to manage this problem with in a few days.

          I deeply appreciate your kindness.
          Thanking in advance.

          Sincerely,


          Comment


          • #6
            1. Yes, I could replicate it.

            3./4. It is actually not really an iterative procedure. There are just two steps. I would probably only use the one-step estimator and make sure that the number of instruments is small. In that regard, I would probably use the user-written command xtabond2 that allows to "collapse" the instruments. With xtabond2 you can also change the initial weighting matrix but I doubt that this will solve your problem.
            https://www.kripfganz.de/stata/

            Comment


            • #7
              Dear Sebastian,

              Thank you very much for your reply.
              I thought that Stata minimized the GMM Criterion Function. I am not familiar with xtabond2, so I will make a comment after using it.

              Again, thank you so much for your cooperation.

              Comment


              • #8
                It does minimize the GMM criterion function but all the moment conditions are linear in the parameters such that closed-form solutions exist without the need of an iterative procedure.
                https://www.kripfganz.de/stata/

                Comment


                • #9
                  Dear Sebastian,

                  Thank you for your lecture. I had better re-study it again.
                  But, since we can have the closed form solutions, isn't it weird that we have such a unstable estimate?
                  What does Stata do for linear calculation?

                  I am more than happy if you could teach me when you are available.

                  Sincerely,

                  Comment


                  • #10
                    It is a closed-form solution for a given weighting matrix. But for two-step GMM estimation, this weighting matrix needs to be estimated, which is a symmetric 44x44 matrix in your case with 44 instruments. Given that you also only have 44 observations, this becomes essentially impossible.
                    https://www.kripfganz.de/stata/

                    Comment

                    Working...
                    X