Announcement

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

  • Dummy varaible in regression -problem with results ouput

    Hi All,

    I have ran a regression model which explians how the effect of bank competiton on bank risk .I am also trying to understand the effect of monetary policy regime (MPR) on bank risk.for the MPR variable I have two category (EMP and TMP).I have treated it as a dummy varaible and also I have used intercations with the same.my problem is that The result which I am getting is showing only either EMP or TMP.I am not able to show both the interactions in single table.Can any one help me on this.I have seen some of the papers as they have put both categories in single table while i was getting 0 in that case.
    I am attaching both my reression results on stata as well as excel
    Code:
     reg zscore  NIM  lasset CapitalRatio  i.mpr##c.C5_Aggregate i.Year,robust
    note: 2019.Year omitted because of collinearity
    
    Linear regression                               Number of obs     =        378
                                                    F(19, 358)        =       3.48
                                                    Prob > F          =     0.0000
                                                    R-squared         =     0.1665
                                                    Root MSE          =     .46035
    
    ------------------------------------------------------------------------------------
                       |               Robust
                zscore |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------------+----------------------------------------------------------------
                   NIM |    .166563   .0505932     3.29   0.001     .0670658    .2660601
                lasset |   .0370991    .027149     1.37   0.173    -.0162923    .0904906
          CapitalRatio |  -.6045754   .5546065    -1.09   0.276    -1.695272    .4861208
                       |
                   mpr |
                  TMP  |  -2.849336   1.144863    -2.49   0.013    -5.100838   -.5978336
          C5_Aggregate |   -22.2205   5.575988    -3.99   0.000    -33.18631    -11.2547
                       |
    mpr#c.C5_Aggregate |
                  TMP  |    7.18703   2.908346     2.47   0.014     1.467441    12.90662
                       |
                  Year |
                 2006  |  -.0931186   .0976341    -0.95   0.341     -.285127    .0988897
                 2007  |  -.1506941   .1196353    -1.26   0.209    -.3859703    .0845821
                 2008  |  -.3771988    .160835    -2.35   0.020    -.6934989   -.0608987
                 2009  |  -.4125662   .1663068    -2.48   0.014    -.7396271   -.0855052
                 2010  |  -.6597916   .2470061    -2.67   0.008    -1.145557   -.1740264
                 2011  |  -.5763591   .1997539    -2.89   0.004    -.9691976   -.1835206
                 2012  |  -.6730537   .2154415    -3.12   0.002    -1.096744   -.2493638
                 2013  |  -.7146015   .2247925    -3.18   0.002    -1.156681   -.2725218
                 2014  |  -.5656688    .196636    -2.88   0.004    -.9523757    -.178962
                 2015  |  -.5367778   .1768668    -3.03   0.003    -.8846063   -.1889493
                 2016  |  -.4683608   .1762386    -2.66   0.008    -.8149539   -.1217677
                 2017  |  -.3803226   .1953754    -1.95   0.052    -.7645503     .003905
                 2018  |   .4640251   .1954189     2.37   0.018     .0797118    .8483384
                 2019  |          0  (omitted)
                       |
                 _cons |   8.616593   2.136981     4.03   0.000     4.413979    12.81921
    ------------------------------------------------------------------------------------
    similarly
    tabulate mpr,gen(dMPR)

    monetary |
    poicy |
    regime | Freq. Percent Cum.
    ------------+-----------------------------------
    EMP | 206 53.79 53.79
    TMP | 177 46.21 100.00
    ------------+-----------------------------------
    Total | 383 100.00

    . reg zscore NIM lasset CapitalRatio dMPR1#c.C5_Aggregate i.Year,robust
    note: 1.dMPR1#c.C5_Aggregate omitted because of collinearity

    Linear regression Number of obs = 378
    F(18, 359) = 3.40
    Prob > F = 0.0000
    R-squared = 0.1523
    Root MSE = .4636

    --------------------------------------------------------------------------------------
    | Robust
    zscore | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    ---------------------+----------------------------------------------------------------
    NIM | .1617704 .0483224 3.35 0.001 .0667399 .2568008
    lasset | .030806 .027096 1.14 0.256 -.0224808 .0840928
    CapitalRatio | -.8086158 .4762358 -1.70 0.090 -1.745178 .1279466
    |
    dMPR1#c.C5_Aggregate |
    0 | .0775196 .1512528 0.51 0.609 -.2199332 .3749723
    1 | 0 (omitted)
    |
    Year |
    2006 | -.0665558 .0967374 -0.69 0.492 -.256799 .1236873
    2007 | .0244397 .1052275 0.23 0.816 -.1825 .2313795
    2008 | .0312063 .1090563 0.29 0.775 -.1832633 .2456758
    2009 | -.0203048 .1251241 -0.16 0.871 -.2663732 .2257636
    2010 | -.0975821 .1778664 -0.55 0.584 -.447373 .2522089
    2011 | .0764374 .081305 0.94 0.348 -.0834565 .2363313
    2012 | .0167227 .0846394 0.20 0.843 -.1497287 .183174
    2013 | .0303189 .0867024 0.35 0.727 -.1401896 .2008273
    2014 | -.0938555 .1097305 -0.86 0.393 -.3096509 .1219399
    2015 | -.0585723 .1009598 -0.58 0.562 -.2571193 .1399746
    2016 | -.2019525 .1374338 -1.47 0.143 -.472229 .068324
    2017 | -.332495 .1920758 -1.73 0.084 -.7102302 .0452401
    2018 | -.2988177 .1752532 -1.71 0.089 -.6434695 .0458341
    2019 | -.6637235 .1854361 -3.58 0.000 -1.028401 -.299046
    |
    _cons | -.354233 .3581022 -0.99 0.323 -1.058475 .3500087
    --------------------------------------------------------------------------------------
    Code:
     
    (1)
    zscore
    NIM 0.167**
    (3.29)
    lasset 0.0371
    (1.37)
    CapitalRatio -0.605
    (-1.09)
    0.dMPR2 0
    (.)
    1.dMPR2 -2.849*
    (-2.49)
    C5_Aggregate -22.22***
    (-3.99)
    0.dMPR2#c.C5_Aggregate 0
    (.)
    1.dMPR2#c.C5_Aggregate 7.187*
    (2.47)
    2005.Year 0
    (.)
    2006.Year -0.0931
    (-0.95)
    2007.Year -0.151
    (-1.26)
    2008.Year -0.377*
    (-2.35)
    2009.Year -0.413*
    (-2.48)
    2010.Year -0.660**
    (-2.67)
    2011.Year -0.576**
    (-2.89)
    2012.Year -0.673**
    (-3.12)
    2013.Year -0.715**
    (-3.18)
    2014.Year -0.566**
    (-2.88)
    2015.Year -0.537**
    (-3.03)
    2016.Year -0.468**
    (-2.66)
    2017.Year -0.380
    (-1.95)
    2018.Year 0.464*
    (2.37)
    2019.Year 0
    (.)
    _cons 8.617***
    (4.03)
    N 378
    t statistics in parentheses
    ="* p<0.05 ** p<0.01 *** p<0.001"

    can any one help me on this.Your commnets are highly appreciated

  • #2
    Fadi:
    as far as I can get it, you have an interaction only.
    That said, to a have clearer idea of what's going on with your coefficients, try:
    Code:
     reg zscore  NIM  lasset CapitalRatio  i.mpr##c.C5_Aggregate i.Year,robust allbaselevels
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thankyou so much for your help.This is what I was getting after doing the commands .is there any way I can get the results like EMP*C5_aggregate and TMP*C5_aggregate as MPR inclusive of both TMP and EMP
      Code:
      eststo:reg zscore  NIM  lasset CapitalRatio  i.mpr##c.C5_Aggregate i.Year,robust allbaselevels
      note: 2019.Year omitted because of collinearity
      
      Linear regression                               Number of obs     =        378
                                                      F(19, 358)        =       3.48
                                                      Prob > F          =     0.0000
                                                      R-squared         =     0.1665
                                                      Root MSE          =     .46035
      
      ------------------------------------------------------------------------------------
                         |               Robust
                  zscore |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------------+----------------------------------------------------------------
                     NIM |    .166563   .0505932     3.29   0.001     .0670658    .2660601
                  lasset |   .0370991    .027149     1.37   0.173    -.0162923    .0904906
            CapitalRatio |  -.6045754   .5546065    -1.09   0.276    -1.695272    .4861208
                         |
                     mpr |
                    EMP  |          0  (base)
                    TMP  |  -2.849336   1.144863    -2.49   0.013    -5.100838   -.5978336
                         |
            C5_Aggregate |   -22.2205   5.575988    -3.99   0.000    -33.18631    -11.2547
                         |
      mpr#c.C5_Aggregate |
                    EMP  |          0  (base)
                    TMP  |    7.18703   2.908346     2.47   0.014     1.467441    12.90662
                         |
                    Year |
                   2005  |          0  (base)
                   2006  |  -.0931186   .0976341    -0.95   0.341     -.285127    .0988897
                   2007  |  -.1506941   .1196353    -1.26   0.209    -.3859703    .0845821
                   2008  |  -.3771988    .160835    -2.35   0.020    -.6934989   -.0608987
                   2009  |  -.4125662   .1663068    -2.48   0.014    -.7396271   -.0855052
                   2010  |  -.6597916   .2470061    -2.67   0.008    -1.145557   -.1740264
                   2011  |  -.5763591   .1997539    -2.89   0.004    -.9691976   -.1835206
                   2012  |  -.6730537   .2154415    -3.12   0.002    -1.096744   -.2493638
                   2013  |  -.7146015   .2247925    -3.18   0.002    -1.156681   -.2725218
                   2014  |  -.5656688    .196636    -2.88   0.004    -.9523757    -.178962
                   2015  |  -.5367778   .1768668    -3.03   0.003    -.8846063   -.1889493
                   2016  |  -.4683608   .1762386    -2.66   0.008    -.8149539   -.1217677
                   2017  |  -.3803226   .1953754    -1.95   0.052    -.7645503     .003905
                   2018  |   .4640251   .1954189     2.37   0.018     .0797118    .8483384
                   2019  |          0  (omitted)
                         |
                   _cons |   8.616593   2.136981     4.03   0.000     4.413979    12.81921
      Thankyou so much.

      Comment


      • #4
        Fadi:
        no, you can's, as -EMP- is your reference category.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Thanks so much @Carlo .In one of the research paper they have done something similar to this.Can I get something like this if I can run regression seperately for both EMP and TMP.
          Attached Files

          Comment


          • #6
            Fadi:
            you have a two-level vategorical variable; the reference category does not enter the interaction (and there's nothing you can do about that, because multiplying a given number by zero gives back zero).
            If you change your reference category, you simply reverse the isssue (that, as per what above, is here to stay).
            IMHO, one of the most didactic exercise to carry out during OLS postestimate tests, is to ask Stata for calculating the fitted values, calulate them by hand based on code and coefficients and then compare the results obtained with the two approaches:
            Code:
            use "C:\Program Files\Stata17\ado\base\a\auto.dta"
            . regress price i.foreign##c.trunk if trunk<=11, allbase
            
                  Source |       SS           df       MS      Number of obs   =        27
            -------------+----------------------------------   F(3, 23)        =      1.36
                   Model |  4645330.66         3  1548443.55   Prob > F        =    0.2806
                Residual |  26238937.9        23  1140823.39   R-squared       =    0.1504
            -------------+----------------------------------   Adj R-squared   =    0.0396
                   Total |  30884268.5        26  1187856.48   Root MSE        =    1068.1
            
            ---------------------------------------------------------------------------------
                      price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
            ----------------+----------------------------------------------------------------
                    foreign |
                  Domestic  |          0  (base)
                   Foreign  |   1666.006   2271.605     0.73   0.471    -3033.168    6365.179
                            |
                      trunk |   -13.7037   187.6449    -0.07   0.942    -401.8767    374.4693
                            |
            foreign#c.trunk |
                  Domestic  |          0  (base)
                   Foreign  |  -98.73108   244.9716    -0.40   0.691    -605.4935    408.0314
                            |
                      _cons |   4493.741   1748.222     2.57   0.017     877.2681    8110.213
            ---------------------------------------------------------------------------------
            
            predict fitted, xb
            
            *Let's calculate fitted values by hand for a domestic car with trunk=10*
            
            . di 4493.741 + (-13.7037*10)
            4356.704
            
            . list fitted if foreign==0 & trunk==10
            
                 +----------+
                 |   fitted |
                 |----------|
              7. | 4356.704 |
             25. | 4356.704 |
             
             40. | 4356.704 |
                 +----------+
            *Let's calculate fitted values  by hand for a foreign car with trunk=10 (decimal digits rounding)*
            . di 4493.741 + 1666.006 + (  -13.7037 -98.73108)*10
            5035.3992
            
            . list fitted if foreign==1 & trunk==10
            
                 +----------+
                 |   fitted |
                 |----------|
             61. | 5035.398 |
             65. | 5035.398 |
                 +----------+
            
            
            .
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment

            Working...
            X