Announcement

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

  • Omitted variable - collinearity

    Dear All,

    I am trying to run a regression using the following data:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float com int year float(sector eexc laamx codex dep treat)
     1 1995 12   . .  .  1.411278 1
     1 1996 12   . .  .  1.488005 1
     1 1997 12   . .  . 1.4494776 1
     1 1998 12  88 .  1  1.705854 1
     1 1999 12   . .  .  1.656534 1
     1 2000 12   . .  . 1.6491847 1
     1 2001 12   . .  .  1.730539 1
     1 2002 12  90 0  0 1.6510295 1
     1 2003 12   . .  .  1.563731 1
     1 2004 12   . .  . 1.6436025 1
     1 2005 12   . .  . 1.5406827 1
     1 2006 12  80 0  0  1.515854 1
     1 2007 12   . .  . 1.6257266 1
     1 2008 12   . .  . 1.7287593 1
     1 2009 12   . .  . 1.3151954 1
     1 2010 12 100 0  0 1.5262792 1
     1 2011 12   . .  . 1.1069509 1
     1 2012 12   . .  .  1.051182 1
     1 2013 12   . .  . 1.1729863 1
     1 2014 12 100 0  0  .9884984 1
     2 1991 11   . .  . 1.0434661 1
     2 1992 11   . .  .  .9271622 1
     2 1993 11   . .  .  .8492423 1
     2 1994 11  50 . 30  .8269278 1
     2 1995 11   . .  .  .7813889 1
     2 1996 11   . .  .  .8506687 1
     2 1997 11   . .  .  .8323577 1
     2 1998 11  65 . 30  .9076535 1
     2 1999 11   . .  . 1.0160373 1
     2 2000 11   . .  .   1.10961 1
     2 2001 11   . .  . 1.3159565 1
     2 2002 11  80 5 12  1.084326 1
     3 1991  9   . .  .  1.136887 0
     3 1992  9   . .  . 1.0757954 0
     4 1991 12   . .  .  .8256931 0
     4 1992 12   . .  .   .804726 0
     4 1993 12   . .  .   .780638 0
     4 1994 12   0 .  0  .9256536 0
     5 1991 13   . .  .  .9146101 0
     5 1992 13   . .  .  .8794309 0
     5 1993 13   . .  .  .8172153 0
     5 1994 13   0 .  0  .7599015 0
     6 1991 13   . .  . 1.3281982 0
     6 1992 13   . .  . 1.0768616 0
     6 1993 13   . .  . 1.1563516 0
     6 1994 13 100 .  0 1.1109765 0
     6 1995 13   . .  . 1.0105128 0
     6 1996 13   . .  . 1.0960695 0
     6 1997 13   . .  . 1.1478943 0
     6 1998 13   0 .  0  1.333023 0
     6 1999 13   . .  . 1.1633385 0
     6 2000 13   . .  .  1.143926 0
     6 2001 13   . .  . 1.1114565 0
     6 2002 13 100 0  0 1.1428592 0
     6 2003 13   . .  . 1.0643917 0
     6 2004 13   . .  . 1.0306267 0
     6 2005 13   . .  .  .9632311 0
     6 2006 13 100 0  0  .9179249 0
     6 2007 13   . .  .  .9592893 0
     6 2008 13   . .  .   .926369 0
     6 2009 13   . .  .  .6393066 0
     6 2010 13 100 0  0  .8153636 0
     6 2011 13   . .  .  .8548777 0
     6 2012 13   . .  .  .7466815 0
     6 2013 13   . .  .  .6818656 0
     6 2014 13 100 0  0  .6245112 0
     7 1991 14   . .  . 1.0430107 1
     7 1992 14   . .  .  .9511774 1
     7 1993 14   . .  .  .8678993 1
     7 1994 14  40 .  0  .8822538 1
     8 1991 13   . .  .  .7490114 1
     8 1992 13   . .  .  .7515919 1
     8 1993 13   . .  .  .6340792 1
     8 1994 13   0 .  0  .7225877 1
     9 1991 19   . .  .  .8288298 1
     9 1992 19   . .  .  .8327088 1
     9 1993 19   . .  .  .7838495 1
     9 1994 19  82 .  8  .7689138 1
     9 1995 19   . .  .  .8044341 1
     9 1996 19   . .  .  .8259929 1
     9 1997 19   . .  .  .7698634 1
     9 1998 19  66 .  0  .8889729 1
     9 1999 19   . .  .  .8401833 1
     9 2000 19   . .  .  .8388023 1
     9 2001 19   . .  .  .8129711 1
     9 2002 19 100 0  0   .845615 1
     9 2003 19   . .  .  .8768312 1
     9 2004 19   . .  .  .9189938 1
     9 2005 19   . .  .  .8900991 1
     9 2006 19  52 0  8  .8134815 1
     9 2007 19   . .  .  .6012696 1
     9 2008 19   . .  .  .8675996 1
     9 2009 19   . .  .  .6974946 1
    11 1993 12   . .  .  1.640435 0
    11 1994 12 100 .  0 1.7704585 0
    14 1991 14   . .  .  1.208013 1
    14 1992 14   . .  . 1.0663192 1
    14 1993 14   . .  .  .9891994 1
    14 1994 14  37 . 12 1.1723765 1
    14 1995 14   . .  . 1.3722243 1
    end
    and using the following code:

    Code:
     areg dep treat eexc codex laamx i.treat##c.eexc i.treat##c.codex i.treat##c.laamx i.year, absorb(com) vce(cluster sector)

    But when I run the code the "treat" variable is omitted and I get no coefficient.This is what I get:



    Code:
     areg dep treat eexc codex laamx i.treat##c.eexc i.treat##c.codex i.treat##c.laamx i.year, absorb(com) vce(cluster sector)
    note: 1.treat omitted because of collinearity
    note: eexc omitted because of collinearity
    note: codex omitted because of collinearity
    note: laamx omitted because of collinearity
    note: treat omitted because of collinearity
    
    Linear regression, absorbing indicators         Number of obs     =      5,495
    Absorbed variable: com                          No. of categories =      2,750
                                                    F(   9,     19)   =      20.46
                                                    Prob > F          =     0.0000
                                                    R-squared         =     0.8917
                                                    Adj R-squared     =     0.7824
                                                    Root MSE          =     0.2282
    
                                     (Std. Err. adjusted for 20 clusters in sector)
    -------------------------------------------------------------------------------
                  |               Robust
              dep |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    --------------+----------------------------------------------------------------
            treat |          0  (omitted)
             eexc |   5.46e-06   .0002724     0.02   0.984    -.0005646    .0005755
            codex |   .0007877   .0008131     0.97   0.345    -.0009141    .0024894
            laamx |   .0008779    .000801     1.10   0.287    -.0007986    .0025543
          1.treat |          0  (omitted)
             eexc |          0  (omitted)
                  |
     treat#c.eexc |
               1  |  -.0001829   .0006983    -0.26   0.796    -.0016445    .0012786
                  |
            codex |          0  (omitted)
                  |
    treat#c.codex |
               1  |  -.0011561   .0009707    -1.19   0.248    -.0031877    .0008755
                  |
            laamx |          0  (omitted)
                  |
    treat#c.laamx |
               1  |  -.0016817   .0012939    -1.30   0.209    -.0043899    .0010266
                  |
             year |
            2006  |  -.1111935   .0165116    -6.73   0.000    -.1457526   -.0766343
            2010  |  -.2513586   .0267462    -9.40   0.000    -.3073389   -.1953782
            2014  |  -.3635089   .0314859   -11.55   0.000    -.4294096   -.2976083
                  |
            _cons |   1.477416   .0253971    58.17   0.000     1.424259    1.530573
    -------------------------------------------------------------------------------
    
    .
    end of do-file
    
    .

    It is clear that there is a collinearity issue here. How can I solve this issue?

    Thanks
    JLI

  • #2
    Jade, in your example data, "treat" and the FE of "com" are perfectly collinear. Within each "com", treat is either all zeros or all ones. Not sure if your whole sample has the same issue.

    Comment


    • #3
      Fei Wang, thanks for your answer.
      Yes, treat is invariant across each company (com). Some companies (com) are 1 or 0 for the whole period.

      Comment


      • #4
        Jade, fixed effects models estimate the effect of the change of a variable within a particular group, in your case "com". If "treat" never changes within any "com" we can't expect a fixed effects model to estimate its effect.

        Comment


        • #5
          Jade:
          as -fe- estimator wipes out time-invariant variable (hence, -xtreg,fe- is expected to give back the same issue), what theoretical support/empirical test pointed you out to -fe- (instead of, -re-)?
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Thank you, Jackson and Carlo!
            I just did not pay attention to the "treat" stata code. I did a mistake by assigning treatment and control groups. So I corrected the code and ran the regression, it worked out well!

            Comment

            Working...
            X