Announcement

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

  • Omitted because of collinearity



    Dear forum members,

    I am facing an issue and I'm hoping to get your assistance. In my current data analysis, I have a dummy variable that seems to always be omitted in my models.

    I have tried various approaches to address this problem. I have made sure that my dummy variable is correctly coded and that there are no missing values. However, the dummy variable is not being included in the regression models and is consistently displayed as "omitted".

    I'm not sure what could be the exact cause of this behavior. Could there be collinearity issues with other variables? Or are there other potential reasons for this omitted behavior?

    I would greatly appreciate your help and advice. What steps can I take to identify the problem and properly include the dummy variable in my analyses?

    Thank you in advance for your support!

    Best regards,
    Dominik Tuider


    reg Sprd_Opt_log Stockvolume_ln StockReturn_log Pre_Ban_Period BAN_Period Post_Ban_Period VIX_Change_log Marketreturn_log
    note: Pre_Ban_Period omitted because of collinearity.

    Source | SS df MS Number of obs = 25,282
    -------------+---------------------------------- F(6, 25275) = 323.43
    Model | 1925.50184 6 320.916973 Prob > F = 0.0000
    Residual | 25078.5259 25,275 .992226546 R-squared = 0.0713
    -------------+---------------------------------- Adj R-squared = 0.0711
    Total | 27004.0278 25,281 1.06815505 Root MSE = .99611

    ----------------------------------------------------------------------------------
    Sprd_Opt_log | Coefficient Std. err. t P>|t| [95% conf. interval]
    -----------------+----------------------------------------------------------------
    Stockvolume_ln | .0824025 .0069687 11.82 0.000 .0687436 .0960615
    StockReturn_log | -.0448981 .0061554 -7.29 0.000 -.056963 -.0328332
    Pre_Ban_Period | 0 (omitted)
    BAN_Period | .2539663 .0204097 12.44 0.000 .213962 .2939705
    Post_Ban_Period | -.3762999 .0176403 -21.33 0.000 -.410876 -.3417238
    VIX_Change_log | .1249523 .0077915 16.04 0.000 .1096806 .140224
    Marketreturn_log | .1850272 .0075623 24.47 0.000 .1702046 .1998498
    _cons | -2.316229 .1347388 -17.19 0.000 -2.580325 -2.052133
    ----------------------------------------------------------------------------------


    . dataex Sprd_Opt_log Stockvolume_ln StockReturn_log Pre_Ban_Period BAN_Period Post_Ban_Period VIX_Change_log Marketreturn_log

    ----------------------- copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(Sprd_Opt_log Stockvolume_ln StockReturn_log Pre_Ban_Period BAN_Period Post_Ban_Period VIX_Change_log Marketreturn_log)
     -2.442347 12.969944 -5.109517 1 0 0          . -3.72991
    -1.1526794 12.969944 -5.109517 1 0 0          . -3.72991
    -3.0788465 12.969944 -5.109517 1 0 0          . -3.72991
    -3.2657595 12.969944 -5.109517 1 0 0          . -3.72991
     -3.277143 12.969944 -5.109517 1 0 0          . -3.72991
     -2.720472 12.969944 -5.109517 1 0 0          . -3.72991
    -4.0096045 12.969944 -5.109517 1 0 0          . -3.72991
    -3.3111506 12.969944 -5.109517 1 0 0          . -3.72991
    -1.6739763 12.969944 -5.109517 1 0 0          . -3.72991
     -2.397895 12.969944 -5.109517 1 0 0          . -3.72991
    -3.2108436 12.969944 -5.109517 1 0 0          . -3.72991
     -2.772588 12.969944 -5.109517 1 0 0          . -3.72991
    -3.6287756 12.969944 -5.109517 1 0 0          . -3.72991
     -3.988985 12.969944 -5.109517 1 0 0          . -3.72991
     -3.733693 12.969944 -5.109517 1 0 0          . -3.72991
     -3.691656 12.969944 -5.109517 1 0 0          . -3.72991
    -1.0216511 12.969944 -5.109517 1 0 0          . -3.72991
     -3.345507 12.969944 -5.109517 1 0 0          . -3.72991
    -2.2335923 12.969944 -5.109517 1 0 0          . -3.72991
    -3.0513024 12.969944 -5.109517 1 0 0          . -3.72991
     -2.881069 12.969944 -5.109517 1 0 0          . -3.72991
     -3.766998 12.969944 -5.109517 1 0 0          . -3.72991
      -1.94591 12.969944 -5.109517 1 0 0          . -3.72991
    -4.0073357 12.969944 -5.109517 1 0 0          . -3.72991
     -1.189584 12.969944 -5.109517 1 0 0          . -3.72991
      -2.92674 12.969944 -5.109517 1 0 0          . -3.72991
     -2.413811 12.969944 -5.109517 1 0 0          . -3.72991
    -2.7056665 12.969944 -5.109517 1 0 0          . -3.72991
     -2.248364 12.969944 -5.109517 1 0 0          . -3.72991
     -2.614959 12.969944 -5.109517 1 0 0          . -3.72991
     -1.985131 12.969944 -5.109517 1 0 0          . -3.72991
    -1.3099214 12.969944 -5.109517 1 0 0          . -3.72991
      -1.99243 12.969944 -5.109517 1 0 0          . -3.72991
    -3.8554535 12.969944 -5.109517 1 0 0          . -3.72991
     -3.173412 12.969944 -5.109517 1 0 0          . -3.72991
     -2.435074 12.969944 -5.109517 1 0 0          . -3.72991
     -.6190393 12.969944 -5.109517 1 0 0          . -3.72991
      -2.81645 12.969944 -5.109517 1 0 0          . -3.72991
     -3.222869 12.969944 -5.109517 1 0 0          . -3.72991
    -2.1465812 12.969944 -5.109517 1 0 0          . -3.72991
     -2.619826 12.969944 -5.109517 1 0 0          . -3.72991
     -2.432263 12.969944 -5.109517 1 0 0          . -3.72991
    -2.5345786 12.969944 -5.109517 1 0 0          . -3.72991
     -2.974071 12.969944 -5.109517 1 0 0          . -3.72991
    -2.8089564 12.969944 -5.109517 1 0 0          . -3.72991
      -2.95491 12.969944 -5.109517 1 0 0          . -3.72991
    -3.7922754 12.969944 -5.109517 1 0 0          . -3.72991
     -1.770706 12.969944 -5.109517 1 0 0          . -3.72991
     -3.569532 12.969944 -5.109517 1 0 0          . -3.72991
    -3.3900266 12.969944 -5.109517 1 0 0          . -3.72991
     -3.341092 12.969944 -5.109517 1 0 0          . -3.72991
    -2.2022622 12.969944 -5.109517 1 0 0          . -3.72991
    -2.2857778 12.969944 -5.109517 1 0 0          . -3.72991
    -2.3434072 12.969944 -5.109517 1 0 0          . -3.72991
     -3.173658 12.969944 -5.109517 1 0 0          . -3.72991
     -3.344038 12.969944 -5.109517 1 0 0          . -3.72991
     -3.098589 12.969944 -5.109517 1 0 0          . -3.72991
    -2.4269526 12.969944 -5.109517 1 0 0          . -3.72991
    -3.1183345 12.969944 -5.109517 1 0 0          . -3.72991
     -3.153957 12.969944 -5.109517 1 0 0          . -3.72991
      -2.65926 12.969944 -5.109517 1 0 0          . -3.72991
    -1.5055194 12.969944 -5.109517 1 0 0          . -3.72991
    -3.3270886 12.969944 -5.109517 1 0 0          . -3.72991
     -2.516455 12.969944 -5.109517 1 0 0          . -3.72991
    -1.4816043 12.994682 -6.591486 1 0 0 -1.7978293        .
     -2.533268 12.994682 -6.591486 1 0 0 -1.7978293        .
      -1.81529 12.994682 -6.591486 1 0 0 -1.7978293        .
    -2.3690746 12.994682 -6.591486 1 0 0 -1.7978293        .
    -2.7502825 12.994682 -6.591486 1 0 0 -1.7978293        .
    -1.7749527 12.994682 -6.591486 1 0 0 -1.7978293        .
     -2.795061 12.994682 -6.591486 1 0 0 -1.7978293        .
    -2.7932084 12.994682 -6.591486 1 0 0 -1.7978293        .
     -1.574036 12.994682 -6.591486 1 0 0 -1.7978293        .
     -.5465437 12.994682 -6.591486 1 0 0 -1.7978293        .
     -3.098589 12.994682 -6.591486 1 0 0 -1.7978293        .
     -1.866983 12.994682 -6.591486 1 0 0 -1.7978293        .
     -4.467673 12.994682 -6.591486 1 0 0 -1.7978293        .
      -2.61007 12.994682 -6.591486 1 0 0 -1.7978293        .
    -2.3445492 12.994682 -6.591486 1 0 0 -1.7978293        .
      -3.53125 12.994682 -6.591486 1 0 0 -1.7978293        .
    -2.0368822 12.994682 -6.591486 1 0 0 -1.7978293        .
      -3.34011 12.994682 -6.591486 1 0 0 -1.7978293        .
    -1.8230124 12.994682 -6.591486 1 0 0 -1.7978293        .
     -4.580101 12.994682 -6.591486 1 0 0 -1.7978293        .
     -1.341174 12.994682 -6.591486 1 0 0 -1.7978293        .
     -2.904165 12.994682 -6.591486 1 0 0 -1.7978293        .
     -2.444901 12.994682 -6.591486 1 0 0 -1.7978293        .
    -3.4197724 12.994682 -6.591486 1 0 0 -1.7978293        .
    -3.3322046 12.994682 -6.591486 1 0 0 -1.7978293        .
    -1.0891783 12.994682 -6.591486 1 0 0 -1.7978293        .
     -.4307829 12.994682 -6.591486 1 0 0 -1.7978293        .
     -1.176777 12.994682 -6.591486 1 0 0 -1.7978293        .
     -3.326234 12.994682 -6.591486 1 0 0 -1.7978293        .
     -3.592738 12.994682 -6.591486 1 0 0 -1.7978293        .
     -2.935628 12.994682 -6.591486 1 0 0 -1.7978293        .
    -2.0877397 12.994682 -6.591486 1 0 0 -1.7978293        .
     -3.324521 12.994682 -6.591486 1 0 0 -1.7978293        .
    -2.7051475 12.994682 -6.591486 1 0 0 -1.7978293        .
     -3.189888 12.994682 -6.591486 1 0 0 -1.7978293        .
      -3.89284 12.994682 -6.591486 1 0 0 -1.7978293        .
    end
    ------------------ copy up to and including the previous line ------------------

  • #2
    Dominik:
    welcome to this forum.
    The reason is that your dummy values do not change:
    Code:
    . reg Sprd_Opt_log Stockvolume_ln Pre_Ban_Period
    note: Pre_Ban_Period omitted because of collinearity.
    
          Source |       SS           df       MS      Number of obs   =       100
    -------------+----------------------------------   F(1, 98)        =      1.33
           Model |  .987696543         1  .987696543   Prob > F        =    0.2516
        Residual |  72.7596727        98   .74244564   R-squared       =    0.0134
    -------------+----------------------------------   Adj R-squared   =    0.0033
           Total |  73.7473692        99  .744922922   Root MSE        =    .86165
    
    --------------------------------------------------------------------------------
      Sprd_Opt_log | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    ---------------+----------------------------------------------------------------
    Stockvolume_ln |   8.369518   7.256397     1.15   0.252    -6.030565     22.7696
    Pre_Ban_Period |          0  (omitted)
             _cons |  -111.2961   94.17973    -1.18   0.240    -298.1927    75.60053
    --------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      There are three ice-cream flavors: vanilla, chocolate, and coffee. If it's NOT vanilla and NOT coffee, then it has to be chocolate.

      Just like in your case, if a time is NOT post ban and NOT during the ban, then it has to be pre ban. Because the existence of any two of these time dummies can perfectly do the job of the third, the third one is not needed.

      There is also a better way to model categorical variables, check out help fvvarlist.

      Comment


      • #4
        Hello Ken,

        thank you very much for your help. Then where do I find the result in the regression of the pre-ban period? To possibly clarify the background of my regression: I want to determine option data based on before, during and after the Corona crisis and in this respect I have added these 3 dummy variables to analyze the volume and the calculated spread. However, to analyze the 3 phases, I need the results of all 3 phases. I hope I could provide more understanding by this.

        Carlo, they do. Unfortunately, there are 25 thousand observations and the dataex only took the ones where the one dummy variable occurred.

        At fvvarlist I will have a look!

        Thanks in advance!

        Comment


        • #5
          Dominik_
          you may want to consider the following toy-example (domestic=0; foreign=1):
          Code:
          . sysuse auto.dta
          (1978 automobile data)
          
          . regress price i.foreign
          
                Source |       SS           df       MS      Number of obs   =        74
          -------------+----------------------------------   F(1, 72)        =      0.17
                 Model |  1507382.66         1  1507382.66   Prob > F        =    0.6802
              Residual |   633558013        72  8799416.85   R-squared       =    0.0024
          -------------+----------------------------------   Adj R-squared   =   -0.0115
                 Total |   635065396        73  8699525.97   Root MSE        =    2966.4
          
          ------------------------------------------------------------------------------
                 price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
          -------------+----------------------------------------------------------------
               foreign |
              Foreign  |   312.2587   754.4488     0.41   0.680    -1191.708    1816.225
                 _cons |   6072.423    411.363    14.76   0.000     5252.386     6892.46
          ------------------------------------------------------------------------------
          
          . predict fitted, xb
          
          . mat list e(b)
          
          e(b)[1,3]
                     0b.         1.           
                foreign    foreign      _cons
          y1          0  312.25874  6072.4231
          
          
          . bysort foreign: list price foreign fitted if _n==1
          
          --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
          -> foreign = Domestic
          
               +-----------------------------+
               | price    foreign     fitted |
               |-----------------------------|
            1. | 4,099   Domestic   6072.423 |
               +-----------------------------+
          
          --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
          -> foreign = Foreign
          
               +----------------------------+
               | price   foreign     fitted |
               |----------------------------|
            1. | 9,690   Foreign   6384.682 |
               +----------------------------+
          
          
          . di 6072.4231 + (312.25874*0)
          6072.4231
          
          . di 6072.4231 + (312.25874*1)
          6384.6818
          
          .
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment

          Working...
          X