Announcement

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

  • collinearity in fixed effect model when including i.country and i.year

    Hi everyone, I am new to Stata and currently I am using the version of 14.0.

    I am analyzing the effect of policy incentives on the diffusion of photovoltaic of 6 Asia Pacific countries from 2000-2015. The Hausman test indicates fixed effect model is preferable than random effect. I am interested in adding the country-level and year fixed effect to capture the heterogeneity among the countries and variation of the solar photovoltaic in the regression. have read in the previous literature that country-level effect is important to include since each country in the region has different solar irradiance, geographical characteristics which need to be controlled. Can I know why there is collinearity exists? The result gives me like this:



    Code:
    xtreg switch diff roi subsidy taxrelief lgdp leduc lpeak_demand patent i.country1 i.year, fe
    note: 2.country1 omitted because of collinearity
    note: 3.country1 omitted because of collinearity
    note: 4.country1 omitted because of collinearity
    note: 5.country1 omitted because of collinearity
    note: 6.country1 omitted because of collinearity
    note: 7.country1 omitted because of collinearity
    note: 8.country1 omitted because of collinearity
    note: 9.country1 omitted because of collinearity
    note: 10.country1 omitted because of collinearity
    note: 11.country1 omitted because of collinearity
    note: 12.country1 omitted because of collinearity
    note: 13.country1 omitted because of collinearity
    note: 14.country1 omitted because of collinearity
    note: 15.country1 omitted because of collinearity
    note: 16.country1 omitted because of collinearity
    note: 17.country1 omitted because of collinearity
    note: 18.country1 omitted because of collinearity
    note: 19.country1 omitted because of collinearity
    
    Fixed-effects (within) regression               Number of obs     =        301
    Group variable: country1                        Number of groups  =         19
    
    R-sq:                                           Obs per group:
         within  = 0.4947                                         min =         15
         between = 0.4462                                         avg =       15.8
         overall = 0.2183                                         max =         16
    
                                                    F(23,259)         =      11.03
    corr(u_i, Xb)  = -0.9137                        Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------------
                switch |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------------+----------------------------------------------------------------
                  diff |   .2943408   .0259848    11.33   0.000     .2431724    .3455092
                   roi |   .0004192   .0001161     3.61   0.000     .0001906    .0006477
               subsidy |    .001027   .0021311     0.48   0.630    -.0031694    .0052235
             taxrelief |   .0078546    .002529     3.11   0.002     .0028745    .0128347
                  lgdp |   .0061131   .0040088     1.52   0.128    -.0017809     .014007
                 leduc |   .0031772   .0058966     0.54   0.590    -.0084341    .0147886
          lpeak_demand |  -.0018415   .0046997    -0.39   0.696    -.0110959    .0074129
                patent |  -.0000287   .0000132    -2.17   0.031    -.0000546   -2.67e-06
                       |
              country1 |
       Andhra Pradesh  |          0  (omitted)
              Gujarat  |          0  (omitted)
                Japan  |          0  (omitted)
            Karnataka  |          0  (omitted)
                Korea  |          0  (omitted)
       Madhya Pradesh  |          0  (omitted)
          Maharashtra  |          0  (omitted)
             Malaysia  |          0  (omitted)
      New South Wales  |          0  (omitted)
               Punjab  |          0  (omitted)
           Queensland  |          0  (omitted)
            Rajasthan  |          0  (omitted)
      South Australia  |          0  (omitted)
           Tamil Nadu  |          0  (omitted)
             Thailand  |          0  (omitted)
        Uttar Pradesh  |          0  (omitted)
             Victoria  |          0  (omitted)
    Western Australia  |          0  (omitted)
                       |
                  year |
                 2001  |  -.0002054   .0032542    -0.06   0.950    -.0066135    .0062027
                 2002  |  -.0004665   .0032893    -0.14   0.887    -.0069437    .0060107
                 2003  |  -.0005664   .0033903    -0.17   0.867    -.0072425    .0061098
                 2004  |  -.0012656   .0034871    -0.36   0.717    -.0081322    .0056011
                 2005  |  -.0021969   .0037302    -0.59   0.556    -.0095424    .0051486
                 2006  |  -.0028175   .0038611    -0.73   0.466    -.0104206    .0047856
                 2007  |   -.002865   .0040733    -0.70   0.482    -.0108861     .005156
                 2008  |   .0001183   .0041585     0.03   0.977    -.0080704    .0083071
                 2009  |    -.00915   .0043987    -2.08   0.038    -.0178118   -.0004882
                 2010  |  -.0091307   .0050413    -1.81   0.071    -.0190579    .0007965
                 2011  |  -.0120203   .0056046    -2.14   0.033    -.0230567   -.0009839
                 2012  |  -.0093994   .0055925    -1.68   0.094    -.0204119    .0016132
                 2013  |  -.0141286    .005611    -2.52   0.012    -.0251776   -.0030797
                 2014  |  -.0194913   .0057455    -3.39   0.001    -.0308052   -.0081774
                 2015  |  -.0246798   .0063077    -3.91   0.000    -.0371006   -.0122589
                       |
                 _cons |  -.1280427   .0916246    -1.40   0.163    -.3084667    .0523814
    -------------------+----------------------------------------------------------------
               sigma_u |  .02070686
               sigma_e |  .00995871
                   rho |  .81214898   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------------
    F test that all u_i=0: F(18, 259) = 0.70                     Prob > F = 0.8073
    
    . #delimit
    I also have omitted the year fixed effect as well, but the fixed effect regression also appears:

    Code:
    . xtreg switch diff roi subsidy taxrelief lgdp leduc lpeak_demand patent i.country1, fe
    note: 2.country1 omitted because of collinearity
    note: 3.country1 omitted because of collinearity
    note: 4.country1 omitted because of collinearity
    note: 5.country1 omitted because of collinearity
    note: 6.country1 omitted because of collinearity
    note: 7.country1 omitted because of collinearity
    note: 8.country1 omitted because of collinearity
    note: 9.country1 omitted because of collinearity
    note: 10.country1 omitted because of collinearity
    note: 11.country1 omitted because of collinearity
    note: 12.country1 omitted because of collinearity
    note: 13.country1 omitted because of collinearity
    note: 14.country1 omitted because of collinearity
    note: 15.country1 omitted because of collinearity
    note: 16.country1 omitted because of collinearity
    note: 17.country1 omitted because of collinearity
    note: 18.country1 omitted because of collinearity
    note: 19.country1 omitted because of collinearity
    
    Fixed-effects (within) regression               Number of obs     =        301
    Group variable: country1                        Number of groups  =         19
    
    R-sq:                                           Obs per group:
         within  = 0.4409                                         min =         15
         between = 0.0360                                         avg =       15.8
         overall = 0.1221                                         max =         16
    
                                                    F(8,274)          =      27.01
    corr(u_i, Xb)  = -0.6918                        Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------------
                switch |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------------+----------------------------------------------------------------
                  diff |   .2415431   .0226804    10.65   0.000     .1968931    .2861932
                   roi |   .0002207   .0001052     2.10   0.037     .0000137    .0004277
               subsidy |   .0039145   .0013661     2.87   0.004     .0012251    .0066038
             taxrelief |   .0052359   .0019526     2.68   0.008     .0013919    .0090799
                  lgdp |  -.0032053   .0031052    -1.03   0.303    -.0093184    .0029077
                 leduc |  -.0055995   .0051577    -1.09   0.279    -.0157532    .0045542
          lpeak_demand |  -.0050037   .0043587    -1.15   0.252    -.0135845    .0035772
                patent |   -.000031   .0000132    -2.35   0.020     -.000057   -4.98e-06
                       |
              country1 |
       Andhra Pradesh  |          0  (omitted)
              Gujarat  |          0  (omitted)
                Japan  |          0  (omitted)
            Karnataka  |          0  (omitted)
                Korea  |          0  (omitted)
       Madhya Pradesh  |          0  (omitted)
          Maharashtra  |          0  (omitted)
             Malaysia  |          0  (omitted)
      New South Wales  |          0  (omitted)
               Punjab  |          0  (omitted)
           Queensland  |          0  (omitted)
            Rajasthan  |          0  (omitted)
      South Australia  |          0  (omitted)
           Tamil Nadu  |          0  (omitted)
             Thailand  |          0  (omitted)
        Uttar Pradesh  |          0  (omitted)
             Victoria  |          0  (omitted)
    Western Australia  |          0  (omitted)
                       |
                 _cons |   .1271098     .05834     2.18   0.030     .0122582    .2419614
    -------------------+----------------------------------------------------------------
               sigma_u |  .01243094
               sigma_e |  .01018491
                   rho |  .59834251   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------------
    --more--
    Thank you for your advise and time

  • #2
    xtreg is the command for running panel data. Therefore, it already includes country fixed effects. Adding i.country duplicates the country specific effects. If you would like to see the country effects, use reg instead of xtreg. In this case you add manually the country fixed effects, and the dummies will not be dropped out.

    xtreg, fe and reg i.country will give you the same result.

    Comment


    • #3
      Hi Farah, I experienced the same problem in a panel regression (FE, within) - with industry dummies, Stata 15 excluded those because of collinearity. Finally, I excluded them from the equation but analyzed its effect by an ANOVA.
      1) My intuition behind the collinearity problem is that the fixed effects (in your case by country) do not handle the dummy variable as a "variable" in the narrow sense (per group of observation of one country, your dummy will constantly be 0 or 1, right?)
      2) Hint: check the xtset command to define the panel data structure. You can still use cluster or robust then.
      3) Lastly, I am not sure if this is the right section of the Stata forum

      Comment


      • #4
        Sorry for the late reply.

        Thank you everyone for the helpful comments.

        Comment

        Working...
        X