Announcement

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

  • xtdcce2 insufficient observations

    Hello, @JanDitzen I have a question regarding the xtdcce2 command. I was using version 3.01 and followed what you suggested on your website. There is no missing observation on my panel. My code is:

    xtdcce2 d.log_AllCauses, lr(L.d.log_AllCauses d.log_PrevntCare L.d.log_PrevntCare d.log_GDPperCapita L.d.log_GDPperCapita d.log_AgePressureRatio L.d.log_AgePressureRatio d.log_LiveBirths L.d.log_LiveBirths d.log_Fertility L.d.log_Fertility d.log_NonMedAlcohol L.d.log_NonMedAlcohol) lr_options(ardl) cr(d.log_AllCauses d.log_PrevntCare d.log_GDPperCapita d.log_AgePressureRatio d.log_LiveBirths d.log_Fertility d.log_NonMedAlcohol) cr_lags(3 3 3 3 3 3 3 3) fullsample


    I received this message that: Units (CountryNumber) to be removed due to insufficient numbers of observations: 2 3 4 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 27 28 29 30 31 32 33 34 35 36 37
    And only four countries remain in my channel. Can you please tell me what is wrong?

    Thanks

  • #2
    From the error message it appears that the problem is that some of the countries have less observations over time than you want to add variables to your model. The MG estimator estimates a time series equation for each country. Therefore you need more observations over time than variables in your model.

    You have 13 explanatory variables and 7 cross-section averages + 3*7 lags of those. This implies you want to estimate a model with 28 (CSA; 4*7) + 13 (x) + 1 (FE) = 42 variables. My suggestion would be to remove some of the cross-sectional averages.

    I hope this helps.

    Jan

    Comment


    • #3
      Hi @JanDitzen, is there a general rule for how many observations are needed? I am trying to run a similar regression:
      Code:
      xtdcce2 d.growth d.l(growth) d.l(0/1)(tau_k tau_h tau_c totalexpenditure surplus gfcfgdp employmentgrowth yearsedugrowth), ///
          lr(l.growth tau_k tau_h tau_c totalexpenditure surplus gfcfgdp employmentgrowth yearsedugrowth l.lngdpph) ///
          p(l.growth tau_k tau_h tau_c totalexpenditure surplus gfcfgdp employmentgrowth yearsedugrowth l.lngdpph) nocross
      Running the above removes most countries, despite including nocross in the code, as you suggested above, because my surplus variable only goes back to 1995 for most countries. Removing surplus leaves many more countries in.
      The problem is, of course, that I am unable to find data for government surpluses beyond 1995 for many countries yet it is an important aspect of my regression. Any suggestions?

      Comment


      • #4
        What is your time and cross-section dimensions and is your data balanced?

        Comment


        • #5
          My panel has 32 countries from 1970 to 2019. This means 1,600 observations if it were perfectly balanced, but it is not. I have managed to find enough data since the above post that the regression will run, with each regressor having at least 1,000 observations. However, the problem I am having now is that a lot of the variables one would expect to be significant, for example human capital growth in the long run, are not. I am trying to explore using cross-sectional averages to solve this, but I am running into further problems, see here.

          Comment


          • #6
            I answered on your other post

            Comment

            Working...
            X