Announcement

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

  • r(2000) no observations when running xtabond2

    I am running Stata 14.2. I have panel data on 49 countries between 1990-2013, with the data averaged into three years so there are eight time periods. I am looking at the effect of foreign aid (ODA) on measures of poverty (he1, he2 as the dependent variable). I am using xtabond2 to overcome the endogeneity of aid, following Roodman (2007) - attached - as a guide.

    xtset id year
    panel variable: id (strongly balanced)
    time variable: year, 1990 to 2011, but with gaps
    delta: 1 unit

    My code is:

    xtabond2 he1 L.he1 oda gdp gin opn fin inf dem, gmm(he1 oda, lag(2 2)) iv(L.gdp gin opn fin inf dem) nolevel small
    No observations.
    r(2000);

    The data is not in string, and there are 392 observations per variable (balanced).

    ctry str24 %24s Ctry
    year int %ty
    oda float %9.0g
    opn float %9.0g
    fin float %9.0g
    ind float %9.0g
    gdp float %9.0g
    gin float %9.0g
    inf float %9.0g
    age float %9.0g
    agr float %9.0g
    edu float %9.0g
    dem float %9.0g
    he1 float %9.0g
    po1 float %9.0g
    sq1 float %9.0g
    he2 float %9.0g
    po2 float %9.0g
    sq2 float %9.0g
    id byte %8.0g

    I have attached a screenshot of the first lines of my data. Any help would be much appreciated.
    Attached Files

  • #2
    You haven't followed advice in the FAQ http://www.statalist.org/forums/help#stata.

    Screenshots are deprecated and we explain why; we ask for explicit data examples instead.

    But the main problem is clear-cut: delta(1) is quite wrong for your data as in no instance are there data for the previous year. delta(3) would at least give you some results. Whether 3 year averaging is the best basis for what you want is naturally a larger economic and econometric question on which I am no expert.

    Comment


    • #3
      Than Nick Cox, I had a similar problem and I changed the time value using this syntax: xtset panelvar timevar , delta() and it worked.

      Comment


      • #4
        Hi!
        I met the same problem, I solve it by generate a new "year", which has no gaps:
        bys id: gen newy=_n
        then:
        xtset id newy
        and the same code as before for xtabond.
        For me, this r(2000) problem solved, and I think it is because xtabond method go to find the lagged var from the "previous" year, but with gaps ,it could not find any value.

        Comment


        • #5
          This solution at best fixes a constant gap that isn’t 1 and at worst blatantly ignores irregular spacing.

          Comment


          • #6
            Hello Nick Cox I am addressing the same issue here with performing the GMM
            I get an erorr message saying no observations
            here is the example of my data
            HTML Code:
            [CODE]
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input float AFEES byte scr float(modfem fem) byte(bdsize big4 SEGMG SEGMP) float(FZ leverage ROA Dumloss inv_rec TURN)
            16.069035 61   16.983 .333  9 1  1 3 14.523582 58.76   3.52 0   .1897125 1.25
            16.257158 57       15   .3 10 1  1 3 14.631162 57.36   3.89 0   .2164637 1.24
            16.524616 36     25.5   .5  8 0  5 6 13.488402 19.96    .18 0  .24503957  .39
             16.52336 36       25   .5  8 0  5 6  13.52405 14.15  11.31 0  .21048835  .37
             16.52336 57       25   .5  8 0  5 7 13.457916 16.34  -4.03 1   .1527589  .17
            16.567764 59     24.5   .5  8 0  5 7 13.551737  20.5   -.53 0  .15474772  .15
            13.698977 63        0    0  9 1  1 2 15.299287 21.26    2.9 0   .1586506  .93
            13.079456 63        0    0  9 1  1 2 15.351187 21.43   2.88 0   .1611846  .94
            15.672585 57    6.375 .125  8 1  1 2 15.598283 53.21   1.77 0  .12007897  .68
            13.017003 60        0    0  8 1  1 2 15.555017 49.05   2.92 0  .12636071  .64
            18.085693 48    7.722 .143  7 1  6 1 16.868908 43.94   9.39 0  .04571544  .46
            18.353807 45    7.436 .143  7 1  6 1 16.686718  6.82  11.83 0 .064616434   .6
            17.977764 45    7.293 .143  7 1  6 1 17.012709 52.68   1.64 0  .05916455  .48
             14.82274 51        0    0  6 1  6 1 16.754139 69.54 -20.67 1  .07637832  .17
            17.739449 51    8.517 .167  6 1  6 1 16.775156 70.91 -12.45 1  .05304005   .1
            15.690326 63    7.722 .143  7 1  3 1 15.283504 19.86   2.78 0  .12180027 1.05
             15.93524 60    7.436 .143  7 1  3 1 15.190698 17.37  -6.59 1 .032978766 1.16
            16.033657 59    7.293 .143  7 1  3 1 16.073816 65.49  -5.01 0   .0490743  .44
            16.033657 51    7.293 .143  7 1  3 1  14.72869 70.91  -7.48 1  .06571499  .33
             15.04676 64    8.517 .167  6 1  1 3 13.676661 17.38 -15.29 1   .2430836  .19
             14.62549 64    8.517 .167  6 0  1 3  13.33568 19.78 -21.42 1  .17560823  .15
             14.57789 61 8.349999 .167  6 0  1 3  13.36804 19.22  -11.8 1   .3391897  .48
             14.62488 61 8.349999 .167  6 0  1 3 13.068743 22.24  -20.4 1   .3246197  .54
            15.063843 60        6 .125  8 1  7 4  13.27892 29.32   1.92 0   .4953321  .78
            15.105514 59 9.400001   .2 10 1  7 4  13.41178 30.21   7.23 0  .52570057  .79
             15.18475 56    18.75 .375  8 1  1 1 13.038677  1.73  10.69 0   .4165398 2.51
            15.207535 57   17.625 .375  8 1  1 1 13.113902  1.91   7.77 0   .3487788 2.92
            13.696727 48        0    0  7 0  9 7   13.7465 38.27    .94 0   .4596418 1.58
             13.75044 50        0    0  7 0  9 7  13.85758 32.76    3.1 0   .5228128 1.48
            15.631022 62    5.328 .111  9 1  2 3 14.584972 44.93  -2.67 1  .52178675  .88
            15.305033 51    5.217 .111  9 0  2 3  14.75045 42.06   11.5 0   .6157444  .94
            16.306332 60      5.3   .1 10 1  7 6 14.418482   5.5   -.46 0  .28414208  .61
             16.29878 61    5.439 .111  9 1  7 6 14.417815  5.25   -.57 0   .3519421  .67
            14.928196 56     20.4   .4  5 1  5 1 13.422827  4.46   8.99 0  .27299103  .52
             15.13925 56    16.65 .333  6 1  5 1  13.45449  4.41   5.46 0  .21452583  .42
            15.510654 55     24.5   .5  4 0  5 2 13.551122  4.29   6.42 0   .1925789  .34
            15.369183 53   14.014 .286  7 1  1 5  14.52887 22.67   3.95 0  .11767934  .09
             15.38551 54   14.586 .286  7 1  1 5  14.52625 23.97    .58 0  .12974092  .05
            17.852121 52     15.3   .3 10 1  1 4 15.631363 55.41   11.8 0  .09561487  .91
            17.991152 56       13  .25  8 1  1 4 15.723718 58.82  14.28 0  .08054158  .82
            18.274427 55     11.1 .222  9 1  1 4  15.62969 58.19   9.82 0  .09687816  .89
            18.025778 57     12.5  .25  8 1  1 4 15.618825 58.02  13.59 0 .072991066  .81
             17.95359 60    12.25  .25  8 1  1 4 15.547287  59.9  11.62 0  .05538411  .77
             14.08248 56        0    0 10 1  1 5 13.788545 18.06    .99 0  .28061914  .86
            13.913545 57        0    0 10 1  1 5 13.581895 17.05  -2.25 1   .2661198  .49
             21.04199 59        5   .1 10 1  6 3 18.058863 29.59    2.5 0  .04433647  .35
             21.02488 57     14.1   .3 10 1  6 3  17.96289 35.13  -5.66 1  .05500057  .38
            21.200447 57   10.878 .222  9 1  6 3 18.008337 38.77   3.95 0  .05317141  .37
             20.98823 59     9.99 .222  9 1  6 3 18.029879 40.46   1.88 0  .04487839  .36
             20.95146 57      9.2   .2 10 1  6 3  18.09484 40.48   2.34 0  .05037672  .36
            12.700867 72    6.625 .125  8 0  1 1 13.220304 40.87 -29.53 1   .2157788  .56
            12.700867 70    7.436 .143  7 0  1 1 13.063672 40.84   -9.4 1  .12574576  .52
            15.362424 57    7.293 .143  7 0  1 1 12.473363 70.91 -29.53 1  .28069073  .91
            14.745184 58    7.436 .143  7 0  1 1  12.62381 64.19  10.66 0   .3976207  .73
             14.51417 59 7.150001 .143  7 0  1 1 12.342795 70.91  24.95 0  .27319866  .46
             16.56534 42    8.851 .167  6 1 11 4 16.839735 24.02   3.64 0  .22218145 1.05
            16.614082 41    8.851 .167  6 1 11 4 16.811749  23.9   2.99 0   .2229046  .95
             16.55069 52    8.517 .167  6 1 11 4 16.877693 32.86   2.46 0   .2089399  .75
            16.549461 59    8.684 .167  6 0 11 4 16.904572 32.24   2.79 0  .19497457  .73
            16.813292 46        6 .125  8 0 11 4 17.200521 33.16   5.29 0   .2110021   .7
             13.92332 51   14.872 .286  7 0  1 3 14.082598 28.62   1.79 0   .8919017  .19
            13.934238 54   20.592 .429  7 0  1 3 14.001394 27.32   2.31 0   .8953202  .17
             15.46189 65     10.8   .2  5 0  1 3 13.993465  17.4   1.49 0    .684691  .22
             15.51004 65     10.4   .2  5 0  1 3 14.034945 17.78     .8 0   .7213558  .09
             15.96578 62     10.2   .2  5 0  1 3  13.64387 14.28   -.93 1   .8368005  .11
            15.458916 54     10.4   .2  5 0  1 3 13.560487 13.21  -7.65 1   .8415159  .21
              15.4935 56       10   .2  5 0  1 3 13.498375  14.3  -3.32 1   .8601599   .1
            15.226013 54   21.879 .429  7 1  4 3 15.000445 23.41  -1.46 1  .06938747  .08
            15.258807 57    16.65 .333  6 1  4 3 14.973723 23.18  -1.61 1 .071392566  .06
            12.739637 60        0    0  6 1  2 1  15.06944 23.92   1.65 0  .06387094   .1
            15.240922 60    7.293 .143  7 1  2 1  15.09127    24   1.06 0  .06213321  .09
            15.080686 83     12.5  .25  8 1  2 1 15.068545 23.16   -.28 0  .06426907  .09
            15.113676 78    12.75  .25  8 1  2 1 15.000445 23.41  -1.46 1  .06938747  .08
            14.647287 71   14.586 .286  7 1  2 1 14.973723 23.18  -1.61 1 .071392566  .06
            18.966526 47     21.6   .4 10 1  2 7 16.881489 32.96    1.4 0  .19148003  .43
            18.953163 49     26.5   .5 10 1  2 7  16.84854 32.06   -.03 0  .16424696  .42
            19.060518 51       26   .5 10 1  2 7 16.796793 32.02    .23 0   .1590937  .43
            18.330624 54       26   .5 10 1  2 7 16.873337  36.9   1.25 0  .17272472  .33
            18.476845 56   32.793 .643 14 1  2 7 16.812649 36.81   -.59 0  .16997813  .37
            15.093163 58   16.317 .333  6 1  2 1 14.018892 17.29   9.87 0   .6324934 1.43
            15.332412 51   15.651 .333  6 1  2 1 14.098457 20.71  11.21 0   .3075669 1.72
            17.289942 36     12.5  .25  8 1 11 5 16.386583  28.4   3.17 0  .18905817  .49
            17.367014 41    16.65 .333  6 1 11 5  16.36952 26.59    .03 0  .15841764  .49
            17.412188 48   10.878 .222  9 1 11 5 16.299932 24.86    2.2 0  .14200334  .52
            17.265142 57    12.25  .25  8 1 11 5 16.435959  33.8   1.04 0  .18248276  .38
            16.150602 58   15.651 .333  6 1 11 5 16.369215 31.97   -.41 0   .1669789  .42
            15.196198 44    5.328 .111  9 1  3 4   14.7579 44.57  10.44 0   .3331638 2.23
            15.352632 44    8.016 .167  6 1  3 4 14.771077  44.6   10.1 0   .3276065 2.18
               15.408 42    7.849 .167  6 1  3 4    14.786 42.56    8.6 0   .3359735 2.14
            15.499883 51    7.849 .167  6 1  3 4  14.87543 51.39   6.16 0   .3315304 1.61
            19.132776 55    5.328 .111  9 1  3 4 14.862652 48.21   7.75 0  .26413402 1.69
            17.745817 65       13  .25 12 1  2 2  14.88459 53.35   5.95 0  .03118521  .24
            17.779812 74    13.65 .273 11 1  2 2 14.904067 51.53    5.6 0 .026077244  .24
            17.618124 63   13.923 .273 11 1  2 2 14.878246 49.64   4.59 0   .0227694  .25
             17.72384 64     15.3   .3 10 1  2 2 14.850436 45.57  14.65 0  .03048566  .26
             14.57128 48    6.125 .125  8 0  4 4 12.139538  6.57 -21.33 1  .18941247  .19
            14.741317 50    6.864 .143  7 0  4 4 12.289784  6.69   -.36 1   .1971232  .44
            14.751333 47      5.3   .1 10 0  2 3 12.645308  2.38   7.48 0  .44621405  .74
             14.91795 53      4.9   .1 10 0  2 3  12.79476  1.44   6.77 0   .3974701  .66
            13.034624 52        0    0 10 0  3 3 13.470918 20.16   5.61 0   .3322654  .87
            end
            [/CODE]
            I have no missing values
            Do you think that the problem is number of years in my dataset or what
            Further, here is the outcome of txest commend
            HTML Code:
            xtset id year
                   panel variable:  id (weakly balanced)
                    time variable:  year, 2017 to 2021
                            delta:  1 unit
            I read a comment belongs to you some where mentioning cut delta(1)
            I did not understand the meaning of this process
            please help.

            Best,

            Comment


            • #7
              Despite my participation in this thread, I have never used xtabond2 (from the Stata Journal and then SSC) and can only comment generally.

              The data example in #6 doesn't include either id or year, but this kind of problem usually means that there are too many gaps to do what xtabond2 is being asked to do (you don't show your command either).

              txest presumably means xtset.

              A plot

              Code:
              scatter year id
              may reveal the problem.

              If you have many different identifiers, you may need to select some.

              Comment


              • #8
                Originally posted by Nick Cox View Post
                Despite my participation in this thread, I have never used xtabond2 (from the Stata Journal and then SSC) and can only comment generally.

                The data example in #6 doesn't include either id or year, but this kind of problem usually means that there are too many gaps to do what xtabond2 is being asked to do (you don't show your command either).

                txest presumably means xtset.

                A plot

                Code:
                scatter year id
                may reveal the problem.

                If you have many different identifiers, you may need to select some.
                Thank you very much
                I have run this command,please have a look on the plot i got..

                Again here is the sample of my data with id and year
                HTML Code:
                [CODE]
                * Example generated by -dataex-. To install: ssc install dataex
                clear
                input int(id year) float AFEES byte scr float(modfem fem) byte(bdsize big4 SEGMG SEGMP) float(FZ leverage ROA Dumloss inv_rec TURN)
                  1 2020 16.069035 61   16.983 .333  9 1  1 3 14.523582 58.76   3.52 0   .1897125 1.25
                  2 2021 16.257158 57       15   .3 10 1  1 3 14.631162 57.36   3.89 0   .2164637 1.24
                  3 2018 16.524616 36     25.5   .5  8 0  5 6 13.488402 19.96    .18 0  .24503957  .39
                  4 2019  16.52336 36       25   .5  8 0  5 6  13.52405 14.15  11.31 0  .21048835  .37
                  5 2020  16.52336 57       25   .5  8 0  5 7 13.457916 16.34  -4.03 1   .1527589  .17
                  6 2021 16.567764 59     24.5   .5  8 0  5 7 13.551737  20.5   -.53 0  .15474772  .15
                  7 2017 13.698977 63        0    0  9 1  1 2 15.299287 21.26    2.9 0   .1586506  .93
                  8 2018 13.079456 63        0    0  9 1  1 2 15.351187 21.43   2.88 0   .1611846  .94
                  9 2020 15.672585 57    6.375 .125  8 1  1 2 15.598283 53.21   1.77 0  .12007897  .68
                 10 2021 13.017003 60        0    0  8 1  1 2 15.555017 49.05   2.92 0  .12636071  .64
                 11 2017 18.085693 48    7.722 .143  7 1  6 1 16.868908 43.94   9.39 0  .04571544  .46
                 12 2018 18.353807 45    7.436 .143  7 1  6 1 16.686718  6.82  11.83 0 .064616434   .6
                 13 2019 17.977764 45    7.293 .143  7 1  6 1 17.012709 52.68   1.64 0  .05916455  .48
                 14 2020  14.82274 51        0    0  6 1  6 1 16.754139 69.54 -20.67 1  .07637832  .17
                 15 2021 17.739449 51    8.517 .167  6 1  6 1 16.775156 70.91 -12.45 1  .05304005   .1
                 16 2017 15.690326 63    7.722 .143  7 1  3 1 15.283504 19.86   2.78 0  .12180027 1.05
                 17 2018  15.93524 60    7.436 .143  7 1  3 1 15.190698 17.37  -6.59 1 .032978766 1.16
                 18 2019 16.033657 59    7.293 .143  7 1  3 1 16.073816 65.49  -5.01 0   .0490743  .44
                 19 2021 16.033657 51    7.293 .143  7 1  3 1  14.72869 70.91  -7.48 1  .06571499  .33
                 20 2017  15.04676 64    8.517 .167  6 1  1 3 13.676661 17.38 -15.29 1   .2430836  .19
                 21 2018  14.62549 64    8.517 .167  6 0  1 3  13.33568 19.78 -21.42 1  .17560823  .15
                 22 2019  14.57789 61 8.349999 .167  6 0  1 3  13.36804 19.22  -11.8 1   .3391897  .48
                 23 2020  14.62488 61 8.349999 .167  6 0  1 3 13.068743 22.24  -20.4 1   .3246197  .54
                 24 2020 15.063843 60        6 .125  8 1  7 4  13.27892 29.32   1.92 0   .4953321  .78
                 25 2021 15.105514 59 9.400001   .2 10 1  7 4  13.41178 30.21   7.23 0  .52570057  .79
                 26 2020  15.18475 56    18.75 .375  8 1  1 1 13.038677  1.73  10.69 0   .4165398 2.51
                 27 2021 15.207535 57   17.625 .375  8 1  1 1 13.113902  1.91   7.77 0   .3487788 2.92
                 28 2020 13.696727 48        0    0  7 0  9 7   13.7465 38.27    .94 0   .4596418 1.58
                 29 2021  13.75044 50        0    0  7 0  9 7  13.85758 32.76    3.1 0   .5228128 1.48
                 30 2020 15.631022 62    5.328 .111  9 1  2 3 14.584972 44.93  -2.67 1  .52178675  .88
                 31 2021 15.305033 51    5.217 .111  9 0  2 3  14.75045 42.06   11.5 0   .6157444  .94
                 32 2020 16.306332 60      5.3   .1 10 1  7 6 14.418482   5.5   -.46 0  .28414208  .61
                 33 2021  16.29878 61    5.439 .111  9 1  7 6 14.417815  5.25   -.57 0   .3519421  .67
                 34 2018 14.928196 56     20.4   .4  5 1  5 1 13.422827  4.46   8.99 0  .27299103  .52
                 35 2020  15.13925 56    16.65 .333  6 1  5 1  13.45449  4.41   5.46 0  .21452583  .42
                 36 2021 15.510654 55     24.5   .5  4 0  5 2 13.551122  4.29   6.42 0   .1925789  .34
                 37 2020 15.369183 53   14.014 .286  7 1  1 5  14.52887 22.67   3.95 0  .11767934  .09
                 38 2021  15.38551 54   14.586 .286  7 1  1 5  14.52625 23.97    .58 0  .12974092  .05
                 39 2017 17.852121 52     15.3   .3 10 1  1 4 15.631363 55.41   11.8 0  .09561487  .91
                 40 2018 17.991152 56       13  .25  8 1  1 4 15.723718 58.82  14.28 0  .08054158  .82
                 41 2019 18.274427 55     11.1 .222  9 1  1 4  15.62969 58.19   9.82 0  .09687816  .89
                 42 2020 18.025778 57     12.5  .25  8 1  1 4 15.618825 58.02  13.59 0 .072991066  .81
                 43 2021  17.95359 60    12.25  .25  8 1  1 4 15.547287  59.9  11.62 0  .05538411  .77
                 44 2020  14.08248 56        0    0 10 1  1 5 13.788545 18.06    .99 0  .28061914  .86
                 45 2021 13.913545 57        0    0 10 1  1 5 13.581895 17.05  -2.25 1   .2661198  .49
                 46 2017  21.04199 59        5   .1 10 1  6 3 18.058863 29.59    2.5 0  .04433647  .35
                 47 2018  21.02488 57     14.1   .3 10 1  6 3  17.96289 35.13  -5.66 1  .05500057  .38
                 48 2019 21.200447 57   10.878 .222  9 1  6 3 18.008337 38.77   3.95 0  .05317141  .37
                 49 2020  20.98823 59     9.99 .222  9 1  6 3 18.029879 40.46   1.88 0  .04487839  .36
                 50 2021  20.95146 57      9.2   .2 10 1  6 3  18.09484 40.48   2.34 0  .05037672  .36
                 51 2017 12.700867 72    6.625 .125  8 0  1 1 13.220304 40.87 -29.53 1   .2157788  .56
                 52 2018 12.700867 70    7.436 .143  7 0  1 1 13.063672 40.84   -9.4 1  .12574576  .52
                 53 2019 15.362424 57    7.293 .143  7 0  1 1 12.473363 70.91 -29.53 1  .28069073  .91
                 54 2020 14.745184 58    7.436 .143  7 0  1 1  12.62381 64.19  10.66 0   .3976207  .73
                 55 2021  14.51417 59 7.150001 .143  7 0  1 1 12.342795 70.91  24.95 0  .27319866  .46
                 56 2017  16.56534 42    8.851 .167  6 1 11 4 16.839735 24.02   3.64 0  .22218145 1.05
                 57 2018 16.614082 41    8.851 .167  6 1 11 4 16.811749  23.9   2.99 0   .2229046  .95
                 58 2019  16.55069 52    8.517 .167  6 1 11 4 16.877693 32.86   2.46 0   .2089399  .75
                 59 2020 16.549461 59    8.684 .167  6 0 11 4 16.904572 32.24   2.79 0  .19497457  .73
                 60 2021 16.813292 46        6 .125  8 0 11 4 17.200521 33.16   5.29 0   .2110021   .7
                 61 2020  13.92332 51   14.872 .286  7 0  1 3 14.082598 28.62   1.79 0   .8919017  .19
                 62 2021 13.934238 54   20.592 .429  7 0  1 3 14.001394 27.32   2.31 0   .8953202  .17
                 63 2017  15.46189 65     10.8   .2  5 0  1 3 13.993465  17.4   1.49 0    .684691  .22
                 64 2018  15.51004 65     10.4   .2  5 0  1 3 14.034945 17.78     .8 0   .7213558  .09
                 65 2019  15.96578 62     10.2   .2  5 0  1 3  13.64387 14.28   -.93 1   .8368005  .11
                 66 2020 15.458916 54     10.4   .2  5 0  1 3 13.560487 13.21  -7.65 1   .8415159  .21
                 67 2021   15.4935 56       10   .2  5 0  1 3 13.498375  14.3  -3.32 1   .8601599   .1
                 68 2020 15.226013 54   21.879 .429  7 1  4 3 15.000445 23.41  -1.46 1  .06938747  .08
                 69 2021 15.258807 57    16.65 .333  6 1  4 3 14.973723 23.18  -1.61 1 .071392566  .06
                 70 2017 12.739637 60        0    0  6 1  2 1  15.06944 23.92   1.65 0  .06387094   .1
                 71 2018 15.240922 60    7.293 .143  7 1  2 1  15.09127    24   1.06 0  .06213321  .09
                 72 2019 15.080686 83     12.5  .25  8 1  2 1 15.068545 23.16   -.28 0  .06426907  .09
                 73 2020 15.113676 78    12.75  .25  8 1  2 1 15.000445 23.41  -1.46 1  .06938747  .08
                 74 2021 14.647287 71   14.586 .286  7 1  2 1 14.973723 23.18  -1.61 1 .071392566  .06
                 75 2017 18.966526 47     21.6   .4 10 1  2 7 16.881489 32.96    1.4 0  .19148003  .43
                 76 2018 18.953163 49     26.5   .5 10 1  2 7  16.84854 32.06   -.03 0  .16424696  .42
                 77 2019 19.060518 51       26   .5 10 1  2 7 16.796793 32.02    .23 0   .1590937  .43
                 78 2020 18.330624 54       26   .5 10 1  2 7 16.873337  36.9   1.25 0  .17272472  .33
                 79 2021 18.476845 56   32.793 .643 14 1  2 7 16.812649 36.81   -.59 0  .16997813  .37
                 80 2020 15.093163 58   16.317 .333  6 1  2 1 14.018892 17.29   9.87 0   .6324934 1.43
                 81 2021 15.332412 51   15.651 .333  6 1  2 1 14.098457 20.71  11.21 0   .3075669 1.72
                 82 2017 17.289942 36     12.5  .25  8 1 11 5 16.386583  28.4   3.17 0  .18905817  .49
                 83 2018 17.367014 41    16.65 .333  6 1 11 5  16.36952 26.59    .03 0  .15841764  .49
                 84 2019 17.412188 48   10.878 .222  9 1 11 5 16.299932 24.86    2.2 0  .14200334  .52
                 85 2020 17.265142 57    12.25  .25  8 1 11 5 16.435959  33.8   1.04 0  .18248276  .38
                 86 2021 16.150602 58   15.651 .333  6 1 11 5 16.369215 31.97   -.41 0   .1669789  .42
                 87 2017 15.196198 44    5.328 .111  9 1  3 4   14.7579 44.57  10.44 0   .3331638 2.23
                 88 2018 15.352632 44    8.016 .167  6 1  3 4 14.771077  44.6   10.1 0   .3276065 2.18
                 89 2019    15.408 42    7.849 .167  6 1  3 4    14.786 42.56    8.6 0   .3359735 2.14
                 90 2020 15.499883 51    7.849 .167  6 1  3 4  14.87543 51.39   6.16 0   .3315304 1.61
                 91 2021 19.132776 55    5.328 .111  9 1  3 4 14.862652 48.21   7.75 0  .26413402 1.69
                 92 2018 17.745817 65       13  .25 12 1  2 2  14.88459 53.35   5.95 0  .03118521  .24
                 93 2019 17.779812 74    13.65 .273 11 1  2 2 14.904067 51.53    5.6 0 .026077244  .24
                 94 2020 17.618124 63   13.923 .273 11 1  2 2 14.878246 49.64   4.59 0   .0227694  .25
                 95 2021  17.72384 64     15.3   .3 10 1  2 2 14.850436 45.57  14.65 0  .03048566  .26
                 96 2020  14.57128 48    6.125 .125  8 0  4 4 12.139538  6.57 -21.33 1  .18941247  .19
                 97 2021 14.741317 50    6.864 .143  7 0  4 4 12.289784  6.69   -.36 1   .1971232  .44
                 98 2020 14.751333 47      5.3   .1 10 0  2 3 12.645308  2.38   7.48 0  .44621405  .74
                 99 2021  14.91795 53      4.9   .1 10 0  2 3  12.79476  1.44   6.77 0   .3974701  .66
                100 2017 13.034624 52        0    0 10 0  3 3 13.470918 20.16   5.61 0   .3322654  .87
                end
                [/CODE]
                ------------------ copy up to and including the previous line ------------------
                
                Listed 100 out of 862 observations
                Use the count() option to list more
                I hope you find the problem with my dataset
                once again thank you very much
                Attached Files
                Last edited by ALKEBSEE RADWAN; 14 Sep 2023, 19:55.

                Comment


                • #9
                  In your data example

                  Code:
                  isid id
                  works, and no "panel" has more than one observation. If that's general, then xtabond2 certainly won't work.


                  If isid id fails generally, you have some other problem as well, and should certainly show the xtabond2 command you tried.

                  Comment


                  • #10
                    Originally posted by Nick Cox View Post
                    In your data example

                    Code:
                    isid id
                    works, and no "panel" has more than one observation. If that's general, then xtabond2 certainly won't work.


                    If isid id fails generally, you have some other problem as well, and should certainly show the xtabond2 command you tried.
                    Unfortunately that code does work as well

                    Here is my command used
                    HTML Code:
                    xtabond2 AFEES L.AFEES scr modfem fem bdsize big4 SEGMG SEGMP FZ leverage ROA Dumloss inv_rec TURN i.year i.sic, gmm (AFEES scr modfem fem bdsize big4 SEGMG SEGMP FZ leverage ROA Dumloss inv_rec TURN i.year i.sic, lag (0 2)) iv (AFEES L.AFEES scr modfem fem bdsize big4 SEGMG SEGMP FZ leverage ROA Dumloss inv_rec TURN i.year i.sic, nolevel(eq)) twostep

                    Thank you very much
                    Last edited by ALKEBSEE RADWAN; 16 Sep 2023, 00:05.

                    Comment


                    • #11
                      It seems that you have singleton panels, so L.AFEES will always be missing. Hence the error message.

                      Comment

                      Working...
                      X