Announcement

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

  • no observation error after xtabond2

    Hi, I have a problem with the AB models. When I run the model with my first dependent variable is ok but if I change the dependent variable (it is just another GDP per capita type) it doesn't work. I ran the static model with both dependent variables and I had no problem, now I can't understand why it doesn't run. The second variable has fewer observations with respect to the first one, it could be the problem?

  • #2
    Repost of http://www.statalist.org/forums/forum/general-stata-discussion/general/1375387-no-observation-error-in-arellano-bond-estimator

    Please note general advice on posting code and explaining problems exactly within http://www.statalist.org/forums/help#stata ; on why questions don't get answered at http://www.statalist.org/forums/help#noanswer ; on bumping and reposting at http://www.statalist.org/forums/help#adviceextras #1

    You're ignoring much of that advice despite the prompt to read the FAQ Advice that appears every time you post. That is, I guess, contributing to the lack of response. People see your data or your code; they certainly can't test your code.

    Comment


    • #3
      Sorry for the previous message. I saw the other post but it is not the problem here. I'm using Stata 13. I have a 5-years panel data (the variables are the average of 5 consecutive years), I worked with a static model without any problem, but now, when I try to run the AB model I have some problem. If I run the model with GDPgrowth_5 as dependent variable it is ok, but when I try to use GDP PPP growth it replies me "no observation". There are also others controls variables that I did not include in the dataex.


      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input str66 country str4 CountryCode float(id2 period GDPgrowth_5 GDPPPPgrowth_5 iGDP iGDPPPP oglob_5 Life_5 Fertility_5 Final_exp_5 investment_5 dem_5)
      "Afghanistan"              "AFG"  1 1970           .           .        .         .  15.93595 37.621033   7.45         .  4.0401416 .11210859
      "Afghanistan"              "AFG"  1 1975           .           .        .         . 17.326756  40.13267 7.4494  96.69631  10.066472 .07308364
      "Afghanistan"              "AFG"  1 1980           .           .        .         .  18.14595  43.27203  7.451  94.98679          . .04844711
      "Afghanistan"              "AFG"  1 1985           .           .        .         . 18.374601  47.30024 7.4602  89.30106          . .05089876
      "Afghanistan"              "AFG"  1 1990           .           .        .         . 18.900719  51.30024 7.5108         .          . .04260814
      "Afghanistan"              "AFG"  1 1995           .           .        .         .  19.46888  53.98586  7.612         .          .  .0357553
      "Afghanistan"              "AFG"  1 2000   .00101161   .00101161        .         . 21.088957  55.86644 7.2576         .          . .11862855
      "Afghanistan"              "AFG"  1 2005  .073703095  .073703006 5.991772    7.0625  27.10616  57.82447 6.4202         .          . .24889608
      "Afghanistan"              "AFG"  1 2010   .03140793   .03140793 6.345532   7.41626  29.66783  59.67622 5.2834 129.34088          .  .2496515
      "Armenia"                  "ARM"  6 1970           .           .        .         .         .   70.2961 3.0292   77.4652          .         .
      "Armenia"                  "ARM"  6 1975           .           .        .         .         .   70.5657 2.5692  81.09341          .         .
      "Armenia"                  "ARM"  6 1980           .           .        .         .         .   70.4215 2.3972         .          .         .
      "Armenia"                  "ARM"  6 1985           .           .        .         .         .  68.63469  2.536         .          .         .
      "Armenia"                  "ARM"  6 1990  -.15766406  -.15766406 7.491995  8.225649  29.25044  67.95713  2.378         .   4.486482 .36673295
      "Armenia"                  "ARM"  6 1995   .06415653   .06415653 6.948566   7.68222  37.52061  69.74083 1.8606  64.18207  -15.09946 .25213033
      "Armenia"                  "ARM"  6 2000   .10511456   .10511456 7.245191  7.978845  46.91543 72.163475 1.7032 106.64401          . .21203177
      "Armenia"                  "ARM"  6 2005   .06335678   .06335678 7.841207  8.574861  51.74815 73.728226 1.7172 113.11903          .  .1899935
      "Armenia"                  "ARM"  6 2010   .03832798   .03832798  8.04712  8.780774  54.82349  74.45167 1.5852  92.95069          .  .2032161
      "Burundi"                  "BDI" 11 1970 -.006715536           . 5.580158         . 15.440588  44.24335 7.3506  45.21637     1.3157 .12591617
      "Burundi"                  "BDI" 11 1975   .01911011           . 5.545694         . 16.716562   46.0764 7.4444 64.247574   5.278294 .14411661
      "Burundi"                  "BDI" 11 1980  .002342129           . 5.632283         . 18.203304  47.92559 7.4628 100.03322   2.944799 .14225705
      "Burundi"                  "BDI" 11 1985   .01887865           . 5.740103         .  19.11896  48.68822 7.5534  94.21188   3.341824  .1643437
      "Burundi"                  "BDI" 11 1990  -.02553854  -.03335452 5.760676  6.955765 19.254095  47.91299 7.4602  96.11565  -5.389946 .19998416
      "Burundi"                  "BDI" 11 1995  -.04449368  -.04449368 5.527774  6.722864  21.70414  50.04491 7.2158  98.55138  -.3528218 .16693774
      "Burundi"                  "BDI" 11 2000 -.011085224  -.01108532 5.374771   6.56986  25.05968  51.93606 6.9344 107.94616          . .17243567
      "Burundi"                  "BDI" 11 2005  .003060818  .003060818 5.323361   6.51845  30.07573  53.48983  6.563 102.90754          . .20335445
      "Burundi"                  "BDI" 11 2010    .0078825  .007882595 5.367055  6.562144 31.914343  55.77483  6.124 106.28565          .  .1702593
      "Benin"                    "BEN" 13 1970  .006379247           . 6.366726         . 16.063858   43.4705 6.8226  74.51932  1.8670716   .130869
      "Benin"                    "BEN" 13 1975 -.008944416           . 6.317726         .  18.09694  45.98386 6.9788  81.62146   -.851634  .0757895
      "Benin"                    "BEN" 13 1980   .01481371           . 6.386008         . 20.983597  48.20499  7.015  98.51099 -2.4951274 .08013283
      "Benin"                    "BEN" 13 1985 -.013234424           . 6.465012         .  22.76004  51.36647 6.8962  102.2049 -2.2851532 .07980204
      "Benin"                    "BEN" 13 1990  .010756016  .000344038 6.407821   7.28346  23.72805  54.20555 6.5992 102.03652  2.2576265 .43096185
      "Benin"                    "BEN" 13 1995  .019024085   .01902399 6.434105  7.309743 32.781322   54.8758 6.2066  100.1334    5.72223  .5349668
      "Benin"                    "BEN" 13 2000     .013974  .013974095 6.530747  7.406385  37.21623  55.86206 5.8138  92.69693          . .50206304
      "Benin"                    "BEN" 13 2005  .006124306  .006124306 6.558922   7.43456  41.37508  57.82251 5.3662  87.91328          .  .4924744
      "Benin"                    "BEN" 13 2010  .018232346   .01823225 6.597083  7.472721  41.27625  59.12144 4.9284   89.0305          .    .48932
      "Burkina Faso"             "BFA" 14 1970  .012429357           .  5.61165         . 25.340355   40.0235  6.704  89.59686   5.101149 .17283675
      "Burkina Faso"             "BFA" 14 1975   .01934452           .  5.67213         .   26.3767  43.22062 6.9792  89.37245   .9457032 .18099006
      "Burkina Faso"             "BFA" 14 1980 .0010494232           .  5.74362         .  27.14192  47.60437  7.154  96.69236   -4.29501  .1615465
      "Burkina Faso"             "BFA" 14 1985   .02063637           . 5.819299         .  27.41799  49.40476 7.0906 102.53675   2.393511  .1475659
      "Burkina Faso"             "BFA" 14 1990 -.000894165  .007041931  5.83388  6.738558   28.7453  49.29948  6.947 103.97375   6.822578  .2391633
      "Burkina Faso"             "BFA" 14 1995   .04468002   .04468002 5.890179  6.794857 34.131966  49.63357 6.7506  96.74998  10.186468 .29486793
      "Burkina Faso"             "BFA" 14 2000  .020098496  .020098496 6.075766  6.980444 37.996635  51.44904 6.4658  89.49952          .  .3585592
      "Burkina Faso"             "BFA" 14 2005   .02352848   .02352848 6.239225  7.143904  41.32351  55.12026 6.1124  91.89576          .  .3583292
      "Burkina Faso"             "BFA" 14 2010  .030914497  .030914497 6.354391  7.259068  43.04989  57.85037 5.6936  94.36874          .  .3755532
      "Bangladesh"               "BGD" 15 1970  -.03840065           . 6.006414         . 12.807095  47.38479  6.918  87.45434   5.094516  .2100275
      "Bangladesh"               "BGD" 15 1975  .005977917           . 5.791093         . 14.914226  50.98827 6.6666  84.37839    5.38646 .18068965
      "Bangladesh"               "BGD" 15 1980   .00986929           . 5.863167         . 16.238352  54.30463 6.0432  98.90048    7.61282  .2216659
      "Bangladesh"               "BGD" 15 1985  .006006718           . 5.938167         . 18.328426  56.68499 5.0928  98.32133   8.065358 .19955717
      "Bangladesh"               "BGD" 15 1990  .022384454   .02047324 5.992111  7.162732  22.24028     59.75  4.158  92.52528  12.025448  .3139949
      "Bangladesh"               "BGD" 15 1995  .025844384  .025844384 6.102491  7.273112  27.87463  63.33156  3.485  90.92226   14.69906   .331917
      "Bangladesh"               "BGD" 15 2000   .02925768   .02925768 6.235311  7.405931 33.777336  66.45073 2.9724  87.41703          .  .3090886
      "Bangladesh"               "BGD" 15 2005   .04827375   .04827375 6.398123  7.568744  38.95036  68.84382 2.5288  82.92394          . .25239992
      "Bangladesh"               "BGD" 15 2010    .0475791    .0475791 6.633755  7.804376  41.24969 70.856735 2.2494  80.08544          . .24265517
      "Bolivia"                  "BOL" 22 1970  .031627774           . 7.239031         . 33.121258    46.471 6.1824         .   26.21048 .02703398
      "Bolivia"                  "BOL" 22 1975  .015280342           . 7.414494         . 36.608368  48.62626 5.9126  83.37471   20.67542 .03376309
      "Bolivia"                  "BOL" 22 1980  -.04026089           . 7.406347         .  38.38395  50.97577 5.5532  81.86269   17.19902 .12500268
      "Bolivia"                  "BOL" 22 1985 -.010479545           . 7.203232         .  38.33063  53.51375 5.1338  82.61375  10.906678  .4113321
      "Bolivia"                  "BOL" 22 1990   .02038202   .01905322 7.213939 8.2180605   40.0452  56.20202 4.7402  83.53165    9.05085  .4572767
      "Bolivia"                  "BOL" 22 1995   .01841936  .018419266  7.31614  8.320262  47.60283  58.99051 4.3282  89.95135  10.700476  .5249347
      "Bolivia"                  "BOL" 22 2000  .008409214  .008409309 7.388036  8.392158  52.97291  61.82914 3.8674   91.1039          .  .5427631
      "Bolivia"                  "BOL" 22 2005  .028579235   .02857933 7.450131  8.454252  53.86076  64.69413 3.4302   89.7777          . .48305035
      "Bolivia"                  "BOL" 22 2010  .036192704  .036192704 7.591441  8.595563  53.13871 67.410645 3.0782  86.95878          .  .4516576
      "Bhutan"                   "BTN" 26 1970           .           .        .         . 22.103434  38.50102 6.6798   39.9037          . .13824014
      "Bhutan"                   "BTN" 26 1975           .           .        .         . 22.298704  42.58747 6.6572 34.094418          .  .1394054
      "Bhutan"                   "BTN" 26 1980   .05359614           . 5.992319         . 22.728893  46.44071  6.457         .   8.240475 .13928802
      "Bhutan"                   "BTN" 26 1985   .07521734           . 6.220123         . 23.206564  50.14569 6.0972  94.14276  12.551803 .13864632
      "Bhutan"                   "BTN" 26 1990   .04930925   .03874636 6.674351  7.754889 23.201723  54.03801  5.217  96.37409   33.76022 .14529656
      "Bhutan"                   "BTN" 26 1995   .04785185   .04785194 6.902558  7.983096 23.654493   58.0583 4.2006  80.87299    40.6486 .15276045
      "Bhutan"                   "BTN" 26 2000   .04669695   .04669685 7.107224  8.187761  25.92753  62.41441  3.265 68.488846          .  .1696255
      "Bhutan"                   "BTN" 26 2005   .06023722   .06023712 7.344543  8.425081   27.8337 66.230225 2.6366  76.79697          . .28318375
      "Bhutan"                   "BTN" 26 2010   .04714546   .04714546   7.6968  8.777338  29.08491  68.70254 2.1656  63.25154          .  .4186645
      "Central African Republic" "CAF" 28 1970  .003489494           . 6.395282         .  23.73729  43.51566 5.9528  66.92757   8.383795 .04431089
      "Central African Republic" "CAF" 28 1975  -.00646677           .  6.39254         .  24.37196  47.21729  5.952   73.7013 -.04262237 .04119606
      "Central African Republic" "CAF" 28 1980 -.025174905           . 6.304254         .  25.42473  49.42869 5.9544  94.28584  -3.120305 .10309923
      "Central African Republic" "CAF" 28 1985   -.0111413           . 6.262943         .  24.37864  49.65719 5.8934 100.81538   .8328125 .11549301
      "Central African Republic" "CAF" 28 1990   -.0335186 -.030718565 6.150606  6.838273 22.822615  48.21703  5.696 100.19856  1.8777752  .1793873
      "Central African Republic" "CAF" 28 1995  .009160328  .009160424 6.072326  6.759993 26.103643  45.87031 5.5458  96.60698   4.424273 .22871818
      "Central African Republic" "CAF" 28 2000 -.006179714  -.00617981  6.02861  6.716277  26.67686  44.38605 5.3202  94.00446          .  .2039805
      "Central African Republic" "CAF" 28 2005  .009684945   .00968504 6.034839  6.722506  33.46277  45.76152 4.9016   93.8415          . .16870035
      "Central African Republic" "CAF" 28 2010  -.08816957  -.08816957 6.102111  6.789779  35.31082  49.12374 4.4532  96.00379          .   .165065
      "Cote d'Ivoire"            "CIV" 33 1970  .011697054           . 7.542635         .  31.66375    45.396 7.9292  49.39291   27.03234 .13764623
      "Cote d'Ivoire"            "CIV" 33 1975  .034391023           . 7.622494         . 33.828384  49.01774 7.8156  55.38782   27.69066 .13857035
      "Cote d'Ivoire"            "CIV" 33 1980  -.07152166           . 7.601654         .  35.66481  51.55947  7.383 74.281456   20.85976 .13927577
      "Cote d'Ivoire"            "CIV" 33 1985  -.01424322           . 7.408758         . 36.040844  52.80712  6.893  72.75521    18.3928  .1402809
      "Cote d'Ivoire"            "CIV" 33 1990    -.035851 -.033249974 7.286298  8.077291  34.84852  51.59098 6.4568  77.74631  12.831386 .20080094
      "Cote d'Ivoire"            "CIV" 33 1995   .01975937  .019759465 7.190353  7.981345   40.2226   48.1764 6.0798  84.81953   22.09912 .25212318
      "Cote d'Ivoire"            "CIV" 33 2000  -.02722502  -.02722511 7.207913  7.998905  47.04593  46.84642 5.7174  83.54411          . .28391778
      "Cote d'Ivoire"            "CIV" 33 2005  .001240444  .001240444 7.114659  7.905651  49.59997  48.76194 5.3948    79.646          . .28190586
      "Cote d'Ivoire"            "CIV" 33 2010  .025026893   .02502699 7.119705  7.910697  49.09081  50.86002 5.1186  80.29927          .  .3253763
      "Cameroon"                 "CMR" 34 1970  .027128935           . 6.737263         .   25.3811  47.13795 6.2832  80.34615   15.78694 .07715745
      "Cameroon"                 "CMR" 34 1975   .05896606           . 6.924773         .  27.72314   49.7724 6.4738  78.88729   20.77282 .07813002
      "Cameroon"                 "CMR" 34 1980   .03989678           . 7.091398         . 30.249956  51.94205 6.6708  84.30343     25.336  .0933078
      "Cameroon"                 "CMR" 34 1985   -.0259716           .  7.38729         . 30.790653  53.20789 6.6146  78.30309   22.94272 .09928042
      "Cameroon"                 "CMR" 34 1990  -.06813087   -.0619849  7.11752  7.925997  32.22777  53.54784 6.2606 73.600235   18.95346 .15011966
      "Cameroon"                 "CMR" 34 1995  .018437767  .018437767 6.882173   7.69065 33.819275  52.71117 5.8292  78.29573   18.95858 .16111477
      "Cameroon"                 "CMR" 34 2000  .014049148  .014049148 6.976356  7.784832  40.34001  51.74078  5.516  82.25596          . .17142485
      "Cameroon"                 "CMR" 34 2005 .0012648583 .0012648583 7.029052  7.837529  42.84556  52.52782 5.2302  80.85837          . .17330797
      "Cameroon"                 "CMR" 34 2010   .02063627  .020636177 7.045116  7.853593  43.22953  54.59085 4.8598  81.52451          . .18323272
      "Congo, Rep."              "COG" 35 1970   .04732573           . 7.418726         .  30.59306  53.95773 6.3414         .  12.468092 .04132115
      end

      Comment


      • #4
        I don't ever use Arellano-Bond but I am trying to get you to post a question that can be answered. Either some generic Stata problem will emerge or an expert in your field can see what the specific problem is.

        I am, I fear, failing here miserably.

        I have to spell out that you still need to follow the advice flagged. You haven't given any exact examples of problematic code.

        You aren't telling us about your xtset settings. (You can't rely on having told us about them before even if you have. People generally aren't going to search your previous posts to see what you have told us previously.)

        Mentioning the variables

        Code:
        GDP PPP growth
        is not enough detail as any command in Stata given those variables would fail because GDP is an ambiguous abbreviation.

        So. we still don't have a clear, reproducible problem that I can see.

        Experts in this technique may be able to say more.


        Comment


        • #5
          From the sample you have posted, it appears that you never have more than 5 observations of the variable GDPPPPgrowth_5 (not GDP PPP growth as you typed, confusingly) for any given country. As you were advised in the previous thread http://www.statalist.org/forums/foru...bond-estimator, if you specify, say, 5 lags of the dependent variable in your Arellano-Bond model, you will have no countries for which the necessary 6 observations are available.

          But in general, we can't tell you precisely what you did wrong if you can't tell us precisely what you did.

          Comment


          • #6
            Sorry if the dataex is confused, I never used before. When I specified delta (5) I thought that it was referring to the periodicity of my sample in order to tells to Stata that the lagged value is a 5-years lagged value. So what you said is correct and I don't have countries with more than 5 observation, It can be the problem?
            When I typed the xtset the results is

            Code:
            xtset id2 period, delta(5)
                   panel variable:  id2 (strongly balanced)
                    time variable:  period, 1970 to 2010
                            delta:  5 units
            This are all the variables that I used

            Code:
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input str4 CountryCode float(period GDPPPPgrowth_5 newoglob iGDPPPP newlsc lnLife_5 lnFertility_5 newinvest newGen_exp newInfl2 Trade_grw_5 newdbagdp dem_5)
            "AFG" 1970            .  .1593595         . .005089256  3.627411  2.008214   .04040141         .             .            .          .  .11210859
            "AFG" 1975            . .17326756         . .007421748  3.692005 2.0081334   .10066472         .             .            .          .  .07308364
            "AFG" 1980            .  .1814595         .  .01149964  3.767227 2.0083482           .         .             .    .04306312          .  .04844711
            "AFG" 1985            .   .183746         .  .01540666  3.856181 2.0095823           .         .             .  -.028853497          .  .05089876
            "AFG" 1990            .  .1890072         . .018062672  3.937514 2.0163288           .         .             .            .          .  .04260814
            "AFG" 1995            .  .1946888         . .029780254  3.988665 2.0297213           .         .             .            .          .   .0357553
            "AFG" 2000    .00101161  .2108896         .  .04687289 4.0229187 1.9817373           .         .             .            .          .  .11862855
            "AFG" 2005   .073703006  .2710616    7.0625  .06560375 4.0573654 1.8583763           .         .             .            .          .  .24889608
            "AFG" 2010    .03140793 .29667827   7.41626  .08646737  4.088899  1.662735           . .09818015    .011286223    .02366972  .06559175   .2496515
            "AGO" 1970            .         .         .          . 3.6327455 1.9963038           . .12616083    .008490594    -.1037469   .0786019          .
            "AGO" 1975            .   .327166         .          .  3.677166 1.9940468           . .12377696    .004421791    .01662469          .  .06325779
            "AGO" 1980            .  .3448661         .          .  3.699009 1.9891046           .         .             .            .          .  .06566188
            "AGO" 1985            .  .3713993         .          .  3.712419 1.9815773           .         .             .            .          . .064198814
            "AGO" 1990   -.11523533  .3975912   8.47771          .  3.722554  1.968778           .        .5             .            .          .  .08767743
            "AGO" 1995    .04704628  .4203681  8.085019          . 3.7645745  1.948026           .  .4333333    .006870986   -.08109303          .  .09487984
            "AGO" 2000 -.0031562806  .4400882  8.250881          . 3.8426015  1.921207           .  .4351084     1.1431836     .2207446 .033013575   .1009784
            "AGO" 2005    .10843258  .4430195  8.368869          .    3.9002  1.888723           .  .4250581      1.300863   .000567317  .02606511   .1233464
            "AGO" 2010   .013794517  .4288136  8.778353          . 3.9407845  1.832304           .  .2391128     .09087902  -.017536258  .10140254  .13180348
            "ALB" 1970            .  .2678989         .  .09187403  4.213769 1.5342675           .         .             .            .          .  .06244756
            "ALB" 1975            . .28081906         .   .1281895  4.240087 1.3785368           .         .             .            .          .  .06339355
            "ALB" 1980            . .29124397         .  .17044973 4.2584887 1.2413266    .3364698         .             .            .          .  .06365453
            "ALB" 1985            . .27758193         .   .2244238  4.273777 1.1505158    .2887412 .08984426             .            .          .  .06395612
            "ALB" 1990    -.0574522  .3182623  8.424509  .25587478 4.2759833   1.03848  -.22203487  .0892399  -.0003777917    -.0557025          .  .29547855
            "ALB" 1995    .06828499  .3834676  8.325747  .24859785 4.2898316  .8831779  -.06676778 .11142574 -.00056933606   .018599367          .   .3528754
            "ALB" 2000   .064144515  .4383555  8.607038  .26625678 4.3188286  .6794661           .  .1667739     .08941545    .04211283  .41247195   .4062754
            "ALB" 2005     .0609581 .53333265  8.917597   .3292062 4.3368416  .5051355           . .09807986    .013462258   .034809925  .32768625   .4760538
            "ALB" 2010    .02324467  .5650357  9.203032   .4290328 4.3494773  .5473358           . .10861427   .0032194534     .0457551   .4458848   .4877895
            "ARE" 1970            .   .498274         .  .09291226 4.1482515 1.8542192     .798415         .             .            .          .          .
            "ARE" 1975            .  .5252674         .   .1198271 4.1960454 1.7493315    .7122686         .             .            .          .          .
            "ARE" 1980            . .54526603         .   .1607118 4.2320724 1.6634096    .6027576         .             .            .          .          .
            "ARE" 1985            .  .5383236         .  .19691987  4.259311  1.575742     .409159         .    .005987195            .          .          .
            "ARE" 1990   -.02272248  .6155001 11.648495  .23530784 4.2806635 1.3805625     .362428         . -.00012151976            .          .          .
            "ARE" 1995  -.004437065  .6819888 11.573554  .27670094 4.2993355 1.1176283           .         .   .0018910645            .          .          .
            "ARE" 2000 -.0008684158  .7059702 11.582512   .2995936 4.3169622  .8876995           .         .   .0015081433            .          .          .
            "ARE" 2005    -.1023018  .7474999 11.458685       .322  4.332053  .6996828           .         .    .004093842            .          .          .
            "ARE" 2010   .008884239  .7633314 10.957917    .356808 4.3440976  .6002427           . .09286048    .006104276    .07136428   .7018085          .
            "ARG" 1970            . .42982215         .  .10141942 4.2072253 1.1498309    .2374808 .08888112    .008540659    .04323697   .8413065   .2155857
            "ARG" 1975            .  .4405876         .  .11952323 4.2287555  1.214112    .3064638 .10665993   .0016271934   .021296343          .  .13597707
            "ARG" 1980            .  .4539445         .   .1586411   4.24862  1.168756    .2348026  .1135593     .07787579   .026511526   .1619782  .23574524
            "ARG" 1985            . .47949535         .  .17068893 4.2623405 1.1167408    .2123146 .10152366       .199468  -.004403925  .21759395   .6842582
            "ARG" 1990    .07296133  .5239047  9.290399  .19377334 4.2765255 1.0670325    .1694386         .      .3857738    .08891688  .15759745   .6421162
            "ARG" 1995    .00950756  .6208991  9.540821  .23205356 4.2919083  .9817384    .1736822 .04166557     1.1448923  -.036690902   .1922803   .6552026
            "ARG" 2000  -.010490417  .6255853  9.610751   .2452789  4.306035  .9228351           . .09268811    .029884357    .05536018  .25931138   .6879115
            "ARG" 2005    .03516064  .5984267  9.651789   .2894208  4.317584   .881646           . .12913188   -.000604168    .02694073   .3499402   .6541895
            "ARG" 2010   .018470574  .5808197  9.841308   .3107256  4.328344  .8528565           . .12208005    .013803745    .11603961  .25937262   .6291484
            "ARM" 1970            .         .         .   .4300413 4.2527113 1.1074132           .  .1460374    .019582486   -.03805107   .2179842          .
            "ARM" 1975            .         .         .   .4650284  4.256544  .9425837           . .16712743      .0289686   -.07172791          .          .
            "ARM" 1980            .         .         .  .51542604  4.254491  .8742496           .         .             .            .          .          .
            "ARM" 1985            .         .         .   .5486028  4.228763  .9305063           .         .             .            .          .          .
            "ARM" 1990   -.15766406 .29250443  8.225649    .578249 4.2188706  .8647429   .04486482         .             .            .          .  .36673295
            "ARM" 1995    .06415653  .3752061   7.68222   .5932608  4.244734  .6187497   -.1509946   .183065             .            . .001252552  .25213033
            "ARM" 2000    .10511456  .4691543  7.978845   .6176626  4.278899   .532464           . .15338324      1.261564   .011419296  .05863103  .21203177
            "ARM" 2005    .06335678  .5174815  8.574861   .6035072 4.3003783  .5406162           .  .1144363    .009341278   -.03054352   .0937017   .1899935
            "ARM" 2010    .03832798  .5482348  8.780774   .5712123  4.310148  .4603651           . .10440827    .004109879  -.005151558  .11052014   .2032161
            "ATG" 1970            .         .         .          .  4.192383 1.1939837           .         .             .            .          .          .
            "ATG" 1975            .         .         .          . 4.2154408  .8697971   .23063633         .             .            .          .          .
            "ATG" 1980            .  .4265565         .          .  4.236061  .7424078    .1075988         .             .            .          .          .
            "ATG" 1985            .  .4255688         .          .  4.254596  .7288818    .2120252  .1849789    .011100283    .14277904          .          .
            "ATG" 1990    .01753068  .4431674   9.74997          . 4.2715235  .7440567    .3603342  .1890861    .007262322   .017285157          .          .
            "ATG" 1995  .0040924074  .4821904  9.750754          . 4.2870855   .820246    .2106436  .1822576     .00686388   .009365368          .          .
            "ATG" 2000   .016502762  .4811064   9.86883          . 4.3015347  .8261299           .  .1905261    .002695285   .005573177          .          .
            "ATG" 2005    .01865082 .50418615  9.971811          . 4.3147397  .7810783           .  .2078672    .004522319   -.07689857   .8028442          .
            "ATG" 2010  -.012696648  .4964603   9.93146          . 4.3257504  .7428468           . .19400916   .0015601624 -.0000506401   .7562708          .
            "AUS" 1970            .  .5857409         .    .365937 4.2700324  .9864635     .274138  .1785452    .002526961   -.02946043   1.002754   .8356025
            "AUS" 1975            .  .6742963         .   .4570697  4.294982  .6993464    .2407482 .16159485    .001224203    .01513513   .3669107   .8421983
            "AUS" 1980            .  .6867408         .   .5182478 4.3159714  .6436774     .231676  .1477242    .010645766    .02075758   .3652861   .8468049
            "AUS" 1985            .  .7187228         .  .52416235 4.3328185  .6209549    .2417492 .17472033     .01045906   .021745777   .3475915     .84938
            "AUS" 1990   .008578062  .7611344 10.260185   .5283047  4.350021  .6247919    .2138148  .1819394    .008778005  .0011915207   .4270911   .8577556
            "AUS" 1995   .029906655  .7902949 10.320474  .50620884  4.361687  .5779809     .224846  .1800408    .007213798 -.0021203042   .6389533     .85868
            "AUS" 2000    .02085304   .815413 10.470065  .57038057  4.380846  .5615417           .  .1836586    .001746835    .03130598   .7279958   .8553286
            "AUS" 2005      .015485  .8224466  10.56666   .5597783  4.397193  .6547627           . .17643668   .0016163317   .016152477   .8639752   .8649993
            "AUS" 2010   .009916687  .8231162 10.630147   .3848693 4.4068055  .6410742           . .17454442   .0035372686  -.010229397  1.0542418   .8509949
            "AUT" 1970            .  .5765015         .   .1882812 4.2556477  .7318336           . .17507523   .0043272073 -.0009622574   1.240808    .767792
            "AUT" 1975            .  .6616843         .   .2260167  4.273644 .51152635    .2519486 .17001474   .0025612486    .00844423  .55856645   .7844462
            "AUT" 1980            .  .7337586         .  .26334396 4.2900653  .4767625    .2437442   .149021    .007561952   .006239987   .6791569    .794525
            "AUT" 1985            .  .7642058         .   .3012826 4.3131394  .3715255    .2522616 .17161676     .00530233    .03321295   .8949383   .8045882
            "AUT" 1990    .01261592  .8125215 10.350264   .3497321 4.3293824  .3986766     .247769 .18093595    .004691502   .009525108  1.0603487   .8024812
            "AUT" 1995   .027006913   .874494 10.425526   .3741177   4.34743  .3318009   .23260026  .1820979   .0025758485   .003970623  1.1829838   .8020139
            "AUT" 2000   .014993859  .9095153 10.566486   .3875892  4.364853  .3189415           . .18756694    .002843382  -.009253502  1.2590113   .8120741
            "AUT" 2005   .009117126  .9120587   10.6251   .3919363 4.3824043  .3378447           . .19346695   .0008403441    .04459066  1.2248415   .8139004
            "AUT" 2010   .007682419  .9031393 10.673017   .4081262  4.394378  .3632494           .  .1886219   .0017353622     .0193614    1.24747   .8148004
            "AZE" 1970            . .25454503         .          . 4.1754346 1.4687482           .  .1971777   .0017735473    .00973916   1.345411          .
            "AZE" 1975            . .25423676         .          . 4.1737056  1.300779           .  .1977409    .001786372  -.006718318          .          .
            "AZE" 1980            . .25533184         .          .  4.172727 1.1348442           .         .             .            .          .          .
            "AZE" 1985            . .25815398         .          .  4.180377 1.0515419           .         .             .            .          .          .
            "AZE" 1990     -.201164  .2867516  9.049386          . 4.1645284  .9975477    .0825844         .             .            .          .  .15165018
            "AZE" 1995     .0121809  .3736102   8.10765          .  4.181426  .7399004   .12765555  .1759891             .            .   .3440154  .07931498
            "AZE" 2000     .0927885  .5027146  8.402679          .  4.213401   .646024           . .20714855      .7654686  -.035959817  .13440697  .07120786
            "AZE" 2005     .1744299  .5550498  8.993635          . 4.2439656  .6579809           . .12970638    .009870335   .021838855  .09428903  .06466376
            "AZE" 2010   .016468238  .5636232   9.67723          .  4.257258  .6809422           .   .097732    .007219508     .0805831  .11620905 .070561916
            "BDI" 1970            . .15440588         .  .00590416   3.78967  1.994774     .013157 .10139596    .013227314   -.04567087  .20615534  .12591617
            "BDI" 1975            .  .1671656         . .008067181  3.830217 2.0074604   .05278294 .10550029   .0019607586   -.04896593  .04932584  .14411661
            "BDI" 1980            . .18203303         . .009997207 3.8696034 2.0099282   .02944799 .11843944    .008944711    .04020662   .0555922  .14225705
            "BDI" 1985            .  .1911896         .  .01224006  3.885429 2.0219946  .033418242 .11143833      .0154803   .032568406  .07355649   .1643437
            "BDI" 1990   -.03335452 .19254096  6.955765 .015937071 3.8693786 2.0095475  -.05389946 .08739015    .005664458 -.0018019676 .071040854  .19998416
            "BDI" 1995   -.04449368 .21704137  6.722864 .021875253 3.9127796 1.9762223 -.003528218 .10247712    .003311752   .022761106  .12290891  .16693774
            "BDI" 2000   -.01108532 .25059682   6.56986   .0267889 3.9499946 1.9364104           .  .1739233   .0079957405   .024057055  .15322605  .17243567
            "BDI" 2005   .003060818  .3007573   6.51845  .03522671 3.9794314  1.881282           . .17384803      .0224401   -.11561637   .2166695  .20335445
            "BDI" 2010   .007882595  .3191434  6.562144  .04968499 4.0212526 1.8120066           .  .1718926    .011738623    .12266488  .17880276   .1702593
            "BEL" 1970            .  .6860246         .  .11309893  4.268449  .7226464   .28452882 .29316905    .013147562    .03132224   .1929214   .6705414
            end
            Then I tryed to apply the ab estimator. Following the literature,I considered some variables as endogenous (l.GDPPPPgrowth_5 iGDPPPP lnFertility_5 newinvest newGen_exp), some variables as predetermined (newlsc lnLife_5 newdbagdp) and some variables as exogenous (newoglob Trade_grw_5 newInfl2 i.period dem_5). I considered the orthog option since I have gaps. I have doubts regarding how I need to work with the time dummies (i.period), maybe i need a level option. The results is

            Code:
            xtabond2 GDPPPPgrowth_5 l.GDPPPPgrowth_5 newoglob iGDPPPP newlsc lnLife_5 lnFertility_5 newinvest newGen_exp newInfl2 Trade_grw_5 newdbagdp dem_5 i.period, gmm (l.GDPPPPgrowth_5 iGDPPPP lnFertility_5 newinvest newGen_exp, lag (2 3)) gmm (newlsc lnLife_5 newdbagdp) iv (newoglob Trade_grw_5 newInfl2 i.period dem_5) nolevel robust small orthog
            Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
            No observations.
            r(2000);
            I hope it is more clear now. Thank you

            Comment


            • #7
              I read in your sample data for the countries AFG through BDI. Then I ran the following
              Code:
              . encode CountryCode, generate(id2)
              
              . xtset id2 period, delta(5)
                     panel variable:  id2 (strongly balanced)
                      time variable:  period, 1970 to 2010
                              delta:  5 units
              
              . xtabond2 GDPPPPgrowth_5 l.GDPPPPgrowth_5 newoglob iGDPPPP newlsc lnLife_5 lnFertility_5 ///
              >               newinvest newGen_exp newInfl2 Trade_grw_5 newdbagdp dem_5 i.period, ///
              >                  gmm (l.GDPPPPgrowth_5 iGDPPPP lnFertility_5 newinvest newGen_exp, lag (2 3)) ///
              >                  gmm (newlsc lnLife_5 newdbagdp) ///
              >                  iv (newoglob Trade_grw_5 newInfl2 i.period dem_5) ///
              >                  nolevel robust small orthog
              Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
              No observations.
              r(2000);
              I look at your data and see large blocks of missing values, and remember that if values for any of the required variables are missing, the observation will be omitted from the estimation.

              I look at the data for AFG and find that lnFertility_5 is missing for every observation, so we don't get any observations from AFG.

              I look at the data for AGO and find that newlsc is missing for every observation, so we don't get any observations from AGO.

              I look at the data for ALB and find that for every observation either newinvest or newdbagdp is missing, so we don't get any observations from ALB.

              And so on.

              Comment


              • #8
                I know that there are many missing and I used the orthogonal deviation for this reason. I don't know if the missing can cause problem for this kind of model. But my question is about a change in dependent variable. If I use another GDP measure it runs and the difference with the previous is just in the dependent variable, the others are the same, so also the missing are the same but it works. This is the other GDP measure I forgot before (alle the other variable are the same)

                Code:
                * Example generated by -dataex-. To install: ssc install dataex
                clear
                input str4 CountryCode float(period GDPgrowth_5 newoglob iGDP newlsc lnLife_5 lnFertility_5 newinvest newGen_exp newInfl2 Trade_grw_5 newdbagdp dem_5)
                "AFG" 1970              .  .1593595         . .005089256  3.627411  2.008214   .04040141         .             .            .          .  .11210859
                "AFG" 1975              . .17326756         . .007421748  3.692005 2.0081334   .10066472         .             .            .          .  .07308364
                "AFG" 1980              .  .1814595         .  .01149964  3.767227 2.0083482           .         .             .    .04306312          .  .04844711
                "AFG" 1985              .   .183746         .  .01540666  3.856181 2.0095823           .         .             .  -.028853497          .  .05089876
                "AFG" 1990              .  .1890072         . .018062672  3.937514 2.0163288           .         .             .            .          .  .04260814
                "AFG" 1995              .  .1946888         . .029780254  3.988665 2.0297213           .         .             .            .          .   .0357553
                "AFG" 2000      .00101161  .2108896         .  .04687289 4.0229187 1.9817373           .         .             .            .          .  .11862855
                "AFG" 2005     .073703095  .2710616  5.991772  .06560375 4.0573654 1.8583763           .         .             .            .          .  .24889608
                "AFG" 2010      .03140793 .29667827  6.345532  .08646737  4.088899  1.662735           . .09818015    .011286223    .02366972  .06559175   .2496515
                "AGO" 1970              .         .         .          . 3.6327455 1.9963038           . .12616083    .008490594    -.1037469   .0786019          .
                "AGO" 1975              .   .327166         .          .  3.677166 1.9940468           . .12377696    .004421791    .01662469          .  .06325779
                "AGO" 1980              .  .3448661         .          .  3.699009 1.9891046           .         .             .            .          .  .06566188
                "AGO" 1985     .014354467  .3713993  7.938167          .  3.712419 1.9815773           .         .             .            .          . .064198814
                "AGO" 1990      -.0983822  .3975912  7.964616          .  3.722554  1.968778           .        .5             .            .          .  .08767743
                "AGO" 1995      .04704628  .4203681  7.571925          . 3.7645745  1.948026           .  .4333333    .006870986   -.08109303          .  .09487984
                "AGO" 2000   -.0031562806  .4400882  7.737787          . 3.8426015  1.921207           .  .4351084     1.1431836     .2207446 .033013575   .1009784
                "AGO" 2005      .10843267  .4430195  7.855774          .    3.9002  1.888723           .  .4250581      1.300863   .000567317  .02606511   .1233464
                "AGO" 2010     .013794517  .4288136  8.265259          . 3.9407845  1.832304           .  .2391128     .09087902  -.017536258  .10140254  .13180348
                "ALB" 1970              .  .2678989         .  .09187403  4.213769 1.5342675           .         .             .            .          .  .06244756
                "ALB" 1975              . .28081906         .   .1281895  4.240087 1.3785368           .         .             .            .          .  .06339355
                "ALB" 1980 -.000022768974 .29124397  7.619088  .17044973 4.2584887 1.2413266    .3364698         .             .            .          .  .06365453
                "ALB" 1985     .007698727 .27758193  7.616087   .2244238  4.273777 1.1505158    .2887412 .08984426             .            .          .  .06395612
                "ALB" 1990     -.06969128  .3182623  7.538844  .25587478 4.2759833   1.03848  -.22203487  .0892399  -.0003777917    -.0557025          .  .29547855
                "ALB" 1995     .068285085  .3834676   7.44008  .24859785 4.2898316  .8831779  -.06676778 .11142574 -.00056933606   .018599367          .   .3528754
                "ALB" 2000      .06414442  .4383555  7.721371  .26625678 4.3188286  .6794661           .  .1667739     .08941545    .04211283  .41247195   .4062754
                "ALB" 2005       .0609581 .53333265  8.031931   .3292062 4.3368416  .5051355           . .09807986    .013462258   .034809925  .32768625   .4760538
                "ALB" 2010     .023244476  .5650357  8.317366   .4290328 4.3494773  .5473358           . .10861427   .0032194534     .0457551   .4458848   .4877895
                "ARE" 1970              .   .498274         .  .09291226 4.1482515 1.8542192     .798415         .             .            .          .          .
                "ARE" 1975    -.008964539  .5252674   11.5666   .1198271 4.1960454 1.7493315    .7122686         .             .            .          .          .
                "ARE" 1980    -.028341293 .54526603 11.652718   .1607118 4.2320724 1.6634096    .6027576         .             .            .          .          .
                "ARE" 1985     -.07324467  .5383236  11.29908  .19691987  4.259311  1.575742     .409159         .    .005987195            .          .          .
                "ARE" 1990     .004199791  .6155001   11.1347  .23530784 4.2806635 1.3805625     .362428         . -.00012151976            .          .          .
                "ARE" 1995    -.004437065  .6819888  11.05976  .27670094 4.2993355 1.1176283           .         .   .0018910645            .          .          .
                "ARE" 2000   -.0008686066  .7059702 11.068717   .2995936 4.3169622  .8876995           .         .   .0015081433            .          .          .
                "ARE" 2005      -.1023018  .7474999  10.94489       .322  4.332053  .6996828           .         .    .004093842            .          .          .
                "ARE" 2010      .00888443  .7633314  10.44412    .356808 4.3440976  .6002427           . .09286048    .006104276    .07136428   .7018085          .
                "ARG" 1970     .021345854 .42982215  8.864426  .10141942 4.2072253 1.1498309    .2374808 .08888112    .008540659    .04323697   .8413065   .2155857
                "ARG" 1975     .004210281  .4405876  8.933186  .11952323 4.2287555  1.214112    .3064638 .10665993   .0016271934   .021296343          .  .13597707
                "ARG" 1980    -.017305946  .4539445  8.996433   .1586411   4.24862  1.168756    .2348026  .1135593     .07787579   .026511526   .1619782  .23574524
                "ARG" 1985    -.030721474 .47949535  8.789916  .17068893 4.2623405 1.1167408    .2123146 .10152366       .199468  -.004403925  .21759395   .6842582
                "ARG" 1990      .05064335  .5239047  8.692096  .19377334 4.2765255 1.0670325    .1694386         .      .3857738    .08891688  .15759745   .6421162
                "ARG" 1995      .00950775  .6208991  8.942518  .23205356 4.2919083  .9817384    .1736822 .04166557     1.1448923  -.036690902   .1922803   .6552026
                "ARG" 2000    -.010490417  .6255853  9.012448   .2452789  4.306035  .9228351           . .09268811    .029884357    .05536018  .25931138   .6879115
                "ARG" 2005      .03516064  .5984267  9.053486   .2894208  4.317584   .881646           . .12913188   -.000604168    .02694073   .3499402   .6541895
                "ARG" 2010     .018470574  .5808197  9.243004   .3107256  4.328344  .8528565           . .12208005    .013803745    .11603961  .25937262   .6291484
                "ARM" 1970              .         .         .   .4300413 4.2527113 1.1074132           .  .1460374    .019582486   -.03805107   .2179842          .
                "ARM" 1975              .         .         .   .4650284  4.256544  .9425837           . .16712743      .0289686   -.07172791          .          .
                "ARM" 1980              .         .         .  .51542604  4.254491  .8742496           .         .             .            .          .          .
                "ARM" 1985              .         .         .   .5486028  4.228763  .9305063           .         .             .            .          .          .
                "ARM" 1990     -.15766406 .29250443  7.491995    .578249 4.2188706  .8647429   .04486482         .             .            .          .  .36673295
                "ARM" 1995      .06415653  .3752061  6.948566   .5932608  4.244734  .6187497   -.1509946   .183065             .            . .001252552  .25213033
                "ARM" 2000      .10511456  .4691543  7.245191   .6176626  4.278899   .532464           . .15338324      1.261564   .011419296  .05863103  .21203177
                "ARM" 2005      .06335678  .5174815  7.841207   .6035072 4.3003783  .5406162           .  .1144363    .009341278   -.03054352   .0937017   .1899935
                "ARM" 2010      .03832798  .5482348   8.04712   .5712123  4.310148  .4603651           . .10440827    .004109879  -.005151558  .11052014   .2032161
                "ATG" 1970              .         .         .          .  4.192383 1.1939837           .         .             .            .          .          .
                "ATG" 1975      .05358267         .         .          . 4.2154408  .8697971   .23063633         .             .            .          .          .
                "ATG" 1980     .063332364  .4265565  8.574836          .  4.236061  .7424078    .1075988         .             .            .          .          .
                "ATG" 1985      .09219303  .4255688  8.899212          .  4.254596  .7288818    .2120252  .1849789    .011100283    .14277904          .          .
                "ATG" 1990      .01924801  .4431674  9.292545          . 4.2715235  .7440567    .3603342  .1890861    .007262322   .017285157          .          .
                "ATG" 1995    .0040924074  .4821904  9.293329          . 4.2870855   .820246    .2106436  .1822576     .00686388   .009365368          .          .
                "ATG" 2000     .016502762  .4811064  9.411405          . 4.3015347  .8261299           .  .1905261    .002695285   .005573177          .          .
                "ATG" 2005      .01865082 .50418615  9.514385          . 4.3147397  .7810783           .  .2078672    .004522319   -.07689857   .8028442          .
                "ATG" 2010    -.012696648  .4964603  9.474035          . 4.3257504  .7428468           . .19400916   .0015601624 -.0000506401   .7562708          .
                "AUS" 1970     .012673378  .5857409 10.166338    .365937 4.2700324  .9864635     .274138  .1785452    .002526961   -.02946043   1.002754   .8356025
                "AUS" 1975     .013383294  .6742963 10.218014   .4570697  4.294982  .6993464    .2407482 .16159485    .001224203    .01513513   .3669107   .8421983
                "AUS" 1980     .009974862  .6867408 10.301816   .5182478 4.3159714  .6436774     .231676  .1477242    .010645766    .02075758   .3652861   .8468049
                "AUS" 1985      .02647171  .7187228 10.371312  .52416235 4.3328185  .6209549    .2417492 .17472033     .01045906   .021745777   .3475915     .84938
                "AUS" 1990      .01083908  .7611344 10.486064   .5283047  4.350021  .6247919    .2138148  .1819394    .008778005  .0011915207   .4270911   .8577556
                "AUS" 1995     .029906655  .7902949 10.546353  .50620884  4.361687  .5779809     .224846  .1800408    .007213798 -.0021203042   .6389533     .85868
                "AUS" 2000      .02085304   .815413 10.695944  .57038057  4.380846  .5615417           .  .1836586    .001746835    .03130598   .7279958   .8553286
                "AUS" 2005     .015485192  .8224466  10.79254   .5597783  4.397193  .6547627           . .17643668   .0016163317   .016152477   .8639752   .8649993
                "AUS" 2010     .009887504  .8231162 10.856027   .3848693 4.4068055  .6410742           . .17454442   .0035372686  -.010229397  1.0542418   .8509949
                "AUT" 1970      .04475164  .5765015  9.878991   .1882812 4.2556477  .7318336           . .17507523   .0043272073 -.0009622574   1.240808    .767792
                "AUT" 1975      .02945957  .6616843 10.057007   .2260167  4.273644 .51152635    .2519486 .17001474   .0025612486    .00844423  .55856645   .7844462
                "AUT" 1980     .012771225  .7337586  10.22246  .26334396 4.2900653  .4767625    .2437442   .149021    .007561952   .006239987   .6791569    .794525
                "AUT" 1985       .0247633  .7642058 10.293362   .3012826 4.3131394  .3715255    .2522616 .17161676     .00530233    .03321295   .8949383   .8045882
                "AUT" 1990     .017076302  .8125215 10.427887   .3497321 4.3293824  .3986766     .247769 .18093595    .004691502   .009525108  1.0603487   .8024812
                "AUT" 1995     .027006913   .874494  10.50315   .3741177   4.34743  .3318009   .23260026  .1820979   .0025758485   .003970623  1.1829838   .8020139
                "AUT" 2000      .01499405  .9095153  10.64411   .3875892  4.364853  .3189415           . .18756694    .002843382  -.009253502  1.2590113   .8120741
                "AUT" 2005     .009117126  .9120587 10.702723   .3919363 4.3824043  .3378447           . .19346695   .0008403441    .04459066  1.2248415   .8139004
                "AUT" 2010     .007682228  .9031393  10.75064   .4081262  4.394378  .3632494           .  .1886219   .0017353622     .0193614    1.24747   .8148004
                "AZE" 1970              . .25454503         .          . 4.1754346 1.4687482           .  .1971777   .0017735473    .00973916   1.345411          .
                "AZE" 1975              . .25423676         .          . 4.1737056  1.300779           .  .1977409    .001786372  -.006718318          .          .
                "AZE" 1980              . .25533184         .          .  4.172727 1.1348442           .         .             .            .          .          .
                "AZE" 1985              . .25815398         .          .  4.180377 1.0515419           .         .             .            .          .          .
                "AZE" 1990       -.201164  .2867516  8.045122          . 4.1645284  .9975477    .0825844         .             .            .          .  .15165018
                "AZE" 1995     .012180805  .3736102  7.103386          .  4.181426  .7399004   .12765555  .1759891             .            .   .3440154  .07931498
                "AZE" 2000       .0927886  .5027146  7.398416          .  4.213401   .646024           . .20714855      .7654686  -.035959817  .13440697  .07120786
                "AZE" 2005       .1744299  .5550498  7.989372          . 4.2439656  .6579809           . .12970638    .009870335   .021838855  .09428903  .06466376
                "AZE" 2010     .016468238  .5636232  8.672966          .  4.257258  .6809422           .   .097732    .007219508     .0805831  .11620905 .070561916
                "BDI" 1970    -.006715536 .15440588  5.580158  .00590416   3.78967  1.994774     .013157 .10139596    .013227314   -.04567087  .20615534  .12591617
                "BDI" 1975      .01911011  .1671656  5.545694 .008067181  3.830217 2.0074604   .05278294 .10550029   .0019607586   -.04896593  .04932584  .14411661
                "BDI" 1980     .002342129 .18203303  5.632283 .009997207 3.8696034 2.0099282   .02944799 .11843944    .008944711    .04020662   .0555922  .14225705
                "BDI" 1985      .01887865  .1911896  5.740103  .01224006  3.885429 2.0219946  .033418242 .11143833      .0154803   .032568406  .07355649   .1643437
                "BDI" 1990     -.02553854 .19254096  5.760676 .015937071 3.8693786 2.0095475  -.05389946 .08739015    .005664458 -.0018019676 .071040854  .19998416
                "BDI" 1995     -.04449368 .21704137  5.527774 .021875253 3.9127796 1.9762223 -.003528218 .10247712    .003311752   .022761106  .12290891  .16693774
                "BDI" 2000    -.011085224 .25059682  5.374771   .0267889 3.9499946 1.9364104           .  .1739233   .0079957405   .024057055  .15322605  .17243567
                "BDI" 2005     .003060818  .3007573  5.323361  .03522671 3.9794314  1.881282           . .17384803      .0224401   -.11561637   .2166695  .20335445
                "BDI" 2010       .0078825  .3191434  5.367055  .04968499 4.0212526 1.8120066           .  .1718926    .011738623    .12266488  .17880276   .1702593
                "BEL" 1970      .04628968  .6860246  9.908795  .11309893  4.268449  .7226464   .28452882 .29316905    .013147562    .03132224   .1929214   .6705414
                end
                ------------------ copy up to and including the previous line ------------------

                and running

                Code:
                 xtabond2 GDPgrowth_5 l.GDPgrowth_5 newoglob iGDP newlsc lnLife_5 lnFertility_5 newinvest newGen_exp newInfl2 Trade_grw_5 newdbagdp dem_5 i.period,
                gmm (l.GDPgrowth_5 iGDP lnFertility_5 newinvest newGen_exp, lag (2 3))
                gmm (newlsc lnLife_5 newdbagdp)
                iv (newoglob Trade_grw_5 newInfl2 i.period dem_5) nolevel robust small orthog
                I can obtain some results. This second measure of GDP has fewer missing than the first one, maybe this makes the difference?

                Comment


                • #9
                  Yes, of course it makes the difference. And I haven't the faintest idea what "orthogonal deviation" means in the context of the command you are executing. All I know is that unless the xtabond2 command you are executing does some something special in its handling of missing values, and I do not believe it does, nothing you do to the nonmissing values will alter the handling of missing values: as I wrote above

                  if values for any of the required variables are missing, the observation will be omitted from the estimation.
                  I read in your new sample data for the countries AFG through BDI. Then I ran the following
                  Code:
                  . encode CountryCode, generate(id2)
                  
                  . xtset id2 period, delta(5)
                         panel variable:  id2 (strongly balanced)
                          time variable:  period, 1970 to 2010
                                  delta:  5 units
                  
                  . xtabond2 GDPgrowth_5 l.GDPgrowth_5 newoglob iGDP newlsc lnLife_5 lnFertility_5 ///
                  >               newinvest newGen_exp newInfl2 Trade_grw_5 newdbagdp dem_5 i.period, ///
                  >                  gmm (l.GDPgrowth_5 iGDP lnFertility_5 newinvest newGen_exp, lag (2 3)) ///
                  >                  gmm (newlsc lnLife_5 newdbagdp) ///
                  >                  iv (newoglob Trade_grw_5 newInfl2 i.period dem_5) ///
                  >                  nolevel robust small orthog
                  Favoring space over speed. To switch, type or click on mata: mata set matafavor speed, perm.
                  Warning: Number of instruments may be large relative to number of observations.
                  Warning: Two-step estimated covariance matrix of moments is singular.
                    Using a generalized inverse to calculate robust weighting matrix for Hansen test.
                    Difference-in-Sargan/Hansen statistics may be negative.
                  
                  Dynamic panel-data estimation, one-step difference GMM
                  ------------------------------------------------------------------------------
                  Group variable: id2                             Number of obs      =        14
                  Time variable : period                          Number of groups   =         4
                  Number of instruments = 14                      Obs per group: min =         2
                  F(21, 4)      =      0.00                                      avg =      3.50
                  Prob > F      =     1.000                                      max =         4
                  -------------------------------------------------------------------------------
                                |               Robust
                    GDPgrowth_5 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                  --------------+----------------------------------------------------------------
                    GDPgrowth_5 |
                            L1. |          0  (omitted)
                                |
                       newoglob |  -.3588721          .        .       .            .           .
                           iGDP |   .2009414          .        .       .            .           .
                         newlsc |   .0545633          .        .       .            .           .
                       lnLife_5 |          0  (omitted)
                  lnFertility_5 |  -.0700743          .        .       .            .           .
                      newinvest |   .3285435          .        .       .            .           .
                     newGen_exp |   .3880428          .        .       .            .           .
                       newInfl2 |   .0836823          .        .       .            .           .
                    Trade_grw_5 |  -.1255098          .        .       .            .           .
                      newdbagdp |  -.0334123          .        .       .            .           .
                          dem_5 |   .0783812          .        .       .            .           .
                                |
                         period |
                          1970  |          0  (empty)
                          1975  |   .0349906          .        .       .            .           .
                          1980  |   .0198347          .        .       .            .           .
                          1985  |   .0174908          .        .       .            .           .
                          1990  |          0  (omitted)
                          1995  |   .0191773          .        .       .            .           .
                          2000  |          0  (omitted)
                          2005  |          0  (omitted)
                          2010  |          0  (omitted)
                  -------------------------------------------------------------------------------
                  Instruments for orthogonal deviations equation
                    Standard
                      FOD.(newoglob Trade_grw_5 newInfl2 1970b.period 1975.period 1980.period
                      1985.period 1990.period 1995.period 2000.period 2005.period 2010.period
                      dem_5)
                    GMM-type (missing=0, separate instruments for each period unless collapsed)
                      L(1/8).(newlsc lnLife_5 newdbagdp)
                      L(2/3).(L.GDPgrowth_5 iGDP lnFertility_5 newinvest newGen_exp)
                  ------------------------------------------------------------------------------
                  Arellano-Bond test for AR(1) in first differences: z = -121.25  Pr > z =  0.000
                  Arellano-Bond test for AR(2) in first differences: z =  72.60  Pr > z =  0.000
                  ------------------------------------------------------------------------------
                  Sargan test of overid. restrictions: chi2(-7)   =  14.00  Prob > chi2 =      .
                    (Not robust, but not weakened by many instruments.)
                  Hansen test of overid. restrictions: chi2(-7)   =   0.00  Prob > chi2 =      .
                    (Robust, but weakened by many instruments.)
                  You will note that of the 99 observations read in (I again excluded the one observation from BEL), a total of just 14 were used in the estimation.
                  Code:
                  . list CountryCode period if e(sample), sepby(CountryCode)
                  
                       +-------------------+
                       | Countr~e   period |
                       |-------------------|
                   40. |      ARG     1985 |
                   41. |      ARG     1990 |
                       |-------------------|
                   66. |      AUS     1980 |
                   67. |      AUS     1985 |
                   68. |      AUS     1990 |
                   69. |      AUS     1995 |
                       |-------------------|
                   75. |      AUT     1980 |
                   76. |      AUT     1985 |
                   77. |      AUT     1990 |
                   78. |      AUT     1995 |
                       |-------------------|
                   93. |      BDI     1980 |
                   94. |      BDI     1985 |
                   95. |      BDI     1990 |
                   96. |      BDI     1995 |
                       +-------------------+

                  Comment


                  • #10
                    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


                    • #11
                      #10 was cross-posted at https://www.statalist.org/forums/for...nning-xtabond2

                      If interested see comments there.

                      Comment


                      • #12
                        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.
                        That is a doubly-dangerous solution to the problem. For one thing, if the gaps in the time variable for consecutive observations are irregular, this irregularity will be hidden by this solution. But also the first -bys id: gen newy = _n-, sorts the observations by id, but it can randomize the order within id (and do so in ways that are not reproducible from one run of the code to the next) thereby causing the newy variable to be in the wrong order, which is worse yet.

                        Comment

                        Working...
                        X