Announcement

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

  • Collinearity issues

    Hi Statlist,
    good morning. I am regressing the following variables here represented in a data format:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double idfirm int Year float(log_tot_sales recalled_dummy_byfirm inflow_ratio outflow_ratio agefirm) double nprod float(newmolfirm newmolmarket)
    1 2004         . .          .          .  .   . . .
    1 2005         . .          .          .  .   . . .
    1 2006         . .          .          .  .   . . .
    1 2007         . .          .          .  .   . . .
    1 2008 12.262413 0          .          0  0   4 1 0
    1 2009 12.640274 0          0          0  1   4 0 0
    1 2010  12.91715 0         .2          0  2   5 1 0
    1 2011 13.302264 0   .2857143          0  3   7 1 0
    1 2012  13.40613 0  .22222222          0  4   9 1 0
    1 2013 13.318162 0   .3571429          0  5  14 1 0
    1 2014 13.480266 0   .2631579          0  6  19 1 0
    1 2015 13.552082 0          0  .05555556  7  18 0 0
    2 2004 16.320004 0          .          0 29   6 1 0
    2 2005 16.259003 0          0          0 30   6 0 0
    2 2006 16.325436 0          0          0 31   6 0 0
    2 2007 16.249718 0          0          0 32   6 0 0
    2 2008 16.329601 0  .14285715          0 33   7 1 0
    2 2009 16.372135 0          0          0 34   7 0 0
    2 2010 16.204067 0          0  .16666667 35   6 0 0
    2 2011 16.174494 0          0          0 36   6 0 0
    2 2012 16.210453 0          0          0 37   6 0 0
    2 2013 16.026436 0          0          0 38   6 0 0
    2 2014 15.780373 0          0         .5 39   4 0 0
    2 2015 15.507068 0          0          0 40   4 0 0
    3 2004 14.717526 0          .          0  9  46 1 1
    3 2005  15.29863 1  .19298245          0 10  57 1 1
    3 2006 14.427028 0          0 .036363635 11  55 1 1
    3 2007  13.07318 0          0  .17021276 12  47 1 0
    3 2008 11.988324 0          0  .27027026 13  37 1 1
    3 2009 11.322382 0          0  .12121212 14  33 1 0
    3 2010  11.74948 0  .23255815          0 15  43 1 1
    3 2011 10.473407 0          0   .5925926 16  27 1 1
    3 2012  9.682564 0          0      .6875 17  16 1 1
    3 2013 10.011105 1  .15789473          0 18  19 1 0
    3 2014  9.956585 0          0  .26666668 19  15 0 0
    3 2015  10.07903 0          0   .3636364 20  11 1 0
    4 2004 15.943534 1          .          0  4 152 1 0
    4 2005  15.92585 0  .03797468          0  5 158 1 0
    4 2006 16.102678 1   .0867052          0  6 173 1 0
    4 2007 16.418432 1  .19907407          0  7 216 1 0
    4 2008 16.437866 1  .14624506          0  8 253 1 0
    4 2009 16.442644 0  .06985294          0  9 272 1 0
    4 2010  16.34378 0 .025089607          0 10 279 1 0
    4 2011 16.335884 1 .014134276          0 11 283 1 0
    4 2012 16.232006 0  .03082192          0 12 292 1 0
    4 2013 16.496168 1  .05501618          0 13 309 1 0
    4 2014  17.09195 0  .05504587          0 14 327 1 0
    4 2015  17.21494 0          0 .009259259 15 324 1 0
    5 2004         . .          .          .  .   . . .
    5 2005         . .          .          .  .   . . .
    5 2006         . .          .          .  .   . . .
    5 2007   3.67482 0          .          0  0   1 1 0
    5 2008         . .          .          .  .   . . .
    5 2009         . .          .          .  .   . . .
    5 2010         . .          .          .  .   . . .
    5 2011         . .          .          .  .   . . .
    5 2012         . .          .          .  .   . . .
    5 2013         . .          .          .  .   . . .
    5 2014         . .          .          .  .   . . .
    5 2015         . .          .          .  .   . . .
    6 2004 17.150093 0          .          0 29   1 1 0
    6 2005 15.556746 0          0          0 30   1 0 0
    6 2006 13.115322 0          0          0 31   1 0 0
    6 2007   9.15078 0          0          0 32   1 0 0
    6 2008  5.977219 0          0          0 33   1 0 0
    6 2009  7.229989 0          0          0 34   1 0 0
    6 2010         . .          .          .  .   . . .
    6 2011         . .          .          .  .   . . .
    6 2012         . .          .          .  .   . . .
    6 2013         . .          .          .  .   . . .
    6 2014         . .          .          .  .   . . .
    6 2015         . .          .          .  .   . . .
    7 2004         . .          .          .  .   . . .
    7 2005         . .          .          .  .   . . .
    7 2006         . .          .          .  .   . . .
    7 2007 10.476154 0          .          0  0   1 1 0
    7 2008 10.647244 0          0          0  1   1 0 0
    7 2009 12.853146 0          0          0  2   1 0 0
    7 2010 13.019257 0          0          0  3   1 0 0
    7 2011 12.508344 0          0          0  4   1 0 0
    7 2012 12.705505 0          0          0  5   1 0 0
    7 2013  12.62807 0          0          0  6   1 0 0
    7 2014 12.063735 0          0          0  7   1 0 0
    7 2015  10.36172 0          0          0  8   1 0 0
    8 2004 21.128635 0          .          0 43 133 1 0
    8 2005  21.24772 1          0  .03100775 44 129 0 0
    8 2006 21.192095 0          0  .19444445 45 108 0 0
    8 2007  21.22827 0          0  .04854369 46 103 1 0
    8 2008  21.48543 0          0  .04040404 47  99 1 1
    8 2009 21.512186 0          0  .11235955 48  89 0 0
    8 2010  21.50318 0          0  .08536585 49  82 0 0
    8 2011  21.43127 1 .023809524          0 50  84 1 0
    8 2012 21.523424 0  .10638298          0 51  94 1 0
    8 2013  21.72658 0  .05050505          0 52  99 1 0
    8 2014 21.581614 0          0          0 53  99 1 0
    8 2015  21.58638 0          0  .05319149 54  94 1 0
    9 2004 23.017605 0          .          0 41  33 1 0
    9 2005  23.08483 0          0          0 42  33 0 0
    9 2006   23.1325 0          0     .03125 43  32 0 0
    9 2007 23.121153 0          0          0 44  32 0 0
    end

    The command I am using is
    Code:
    xtreg log_tot_sales recalled_dummy inflow_ratio outflow_ratio agefirm nprod newmolfirm newmolmarket [aweight=cem_weights], fe
    and I cannot see the reason why the variables inflow_ratio, newmolfirm and newmolmarket are omitted due to collinearity. They seem to me not constant over idfirm Am I doing something wrong?

  • #2
    It seems to me it may be something related to your weight variable "cem_weightss". Im assuming it is constant respect to the panel id, and its the only variable not included in your data example.
    In fact, running the regression without that gives me no problem of colinearity.
    Code:
    . xtreg log_tot_sales recalled_dummy inflow_ratio outflow_ratio agefirm nprod newmolfirm newmolmarket ,
    >  fe
    
    Fixed-effects (within) regression               Number of obs     =         67
    Group variable: idfirm                          Number of groups  =          8
    
    R-sq:                                           Obs per group:
         within  = 0.2390                                         min =          3
         between = 0.1834                                         avg =        8.4
         overall = 0.1128                                         max =         11
    
                                                    F(7,52)           =       2.33
    corr(u_i, Xb)  = -0.7716                        Prob > F          =     0.0378
    
    ---------------------------------------------------------------------------------------
            log_tot_sales |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    ----------------------+----------------------------------------------------------------
    recalled_dummy_byfirm |  -.0863576   .5784798    -0.15   0.882    -1.247162    1.074447
             inflow_ratio |  -.1824834   3.230796    -0.06   0.955    -6.665549    6.300582
            outflow_ratio |   -2.20366   1.619934    -1.36   0.180    -5.454294    1.046975
                  agefirm |  -.1483365   .0651991    -2.28   0.027    -.2791681   -.0175049
                    nprod |   .0147865   .0072506     2.04   0.047     .0002372    .0293358
               newmolfirm |   .3311952   .6509017     0.51   0.613    -.9749346    1.637325
             newmolmarket |   .5167922   .7500844     0.69   0.494    -.9883623    2.021947
                    _cons |   17.75792   1.430362    12.41   0.000     14.88769    20.62815
    ----------------------+----------------------------------------------------------------
                  sigma_u |  6.6889541
                  sigma_e |  1.2800738
                      rho |  .96467089   (fraction of variance due to u_i)
    ---------------------------------------------------------------------------------------
    F test that all u_i=0: F(7, 52) = 29.28                      Prob > F = 0.0000

    Comment


    • #3
      Thank you very much for the reply Fernando. Actually I need to use cem procedure in order to pair firms optimally. Maybe the weights are constant for idfirm...I don't know. Let's see if anyone has got a clue.
      For the moment many thanks for the reply!

      Comment


      • #4
        I see.
        Can you post your data again, this time including the cemweights?
        in any case, the weights HAVE to be constant by panel id. otherwise it would give you a warning. Im thinking your cem_weights may have missing data.

        Comment


        • #5
          Maybe I have seen the problem. The problem is that the selected variables with cem_weight have all missing values (as you suggested). So I think I need to revise the cem procedure. In any case I will let you know...thank you very much for the moment.

          Comment

          Working...
          X