Announcement

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

  • Random effects model with dummy variable as control variable

    Hello, everyone,
    I run a study on the impact of CSR (Corporate Social Responsibility) on FP(Financial Performance|), N=28, T=5 years. The independent variable is a dummy variable which has the value 1 if the company is CSR labelled, and 0 if not. the dependent variable I have ROA. I have three control variables (size, risk and industry).
    When I run a random effects model, Stata drop out an industry (for example I have IND1(chemicals), IND 2(technological) and IND 3 (food industry)), Stata gives the p-value for IND1and IND2 but IND3 is omitted. So how can I evaluate the significance of IND3?

  • #2
    Jihad:
    welcome to this forum.
    Stata is as always right: it omits one of the level of the categorical variable to protect you against the dummy trap problem (https://en.wikipedia.org/wiki/Dummy_...le_(statistics)).
    You can change your reference category via -fvvarlist- notation, but onel level will be always omitted.
    For the future, as reminded by the FAQ, please post waht you typed and what Stata gave you back. Thanks.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Thank you, Mr.Carlo
      I typed in command: xtreg ROA CSR Risk Size IND1 IND2 IND3 IND4,re
      And Stata 14 omits IND4. so in my interpretation of results, I should report the significance of variables. when I run another analysis by changing the reference category, I have p-value changed for the others. So what's the significance of IND4 in my model?

      I have another problem, rho is 0. But R-sq overall = 0.2257. (I read that I should report the value of rho in a random effects model). That means my results aren't valid?

      Thank you
      Jihad.
      Last edited by Jihad El Yaagoubi; 17 May 2018, 10:16. Reason: That will help in P.hD thesis

      Comment


      • #4
        Jihad:
        on of the first thing that I would do is reorganizing your IND1-2-3-4 variables in an unique categorical variable (see -help fvvarlist).
        If your data are not in the -long- format yest, -reshape- them accordingly, as panel data analysis do prefer the -long- format.
        Last but not least, your chances of getting (more) helpful replies are conditional on posting what you typed and what Stata gave you back via CODE delimiters (see the FAQ on this and other posting-related topics).
        As a sidelight, please call me Carlo, as all on (and many more off) the list do. Thanks.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Thank you Carlo. Im working on this. Next time I will share my results, Im very interesting in your opinion.
          jihad

          Comment


          • #6
            Hello Carlo,
            Here are my results and what I typed. I need to know if my results are valid and if I typed correctly the dummy variable.
            Code:
             xtset Companyscode Year, yearly
                   panel variable:  Companyscode (strongly balanced)
                    time variable:  Year, 2012 to 2016
                            delta:  1 year
            
            . 
            . tabulate Industry,generate(Ind)
            
               Industry |      Freq.     Percent        Cum.
            ------------+-----------------------------------
                      1 |         35       25.00       25.00
                      2 |         25       17.86       42.86
                      3 |         50       35.71       78.57
                      4 |         30       21.43      100.00
            ------------+-----------------------------------
                  Total |        140      100.00
            
            . list Industry i.Industry in 1/4
            
                 +---------------------+
                 |                   3.|
                 | Industry   Industry |
                 |---------------------|
              1. |        3          1 |
              2. |        3          1 |
              3. |        3          1 |
              4. |        3          1 |
                 +---------------------+
            Code:
             xtreg ROA i.CSR Risk Size ib2.Industry,re
            
            Random-effects GLS regression                   Number of obs     =        139
            Group variable: Companyscode                    Number of groups  =         28
            
            R-sq:                                           Obs per group:
                 within  = 0.6424                                         min =          4
                 between = 0.7522                                         avg =        5.0
                 overall = 0.6649                                         max =          5
            
                                                            Wald chi2(6)      =     261.88
            corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
            
            ------------------------------------------------------------------------------
                     ROA |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                   1.CSR |   .1158301   .0779946     1.49   0.138    -.0370365    .2686966
                    Risk |   .6491344   .0419502    15.47   0.000     .5669136    .7313552
                    Size |  -.1009088   .0568764    -1.77   0.076    -.2123845     .010567
                         |
                Industry |
                      1  |   -.192214   .1219311    -1.58   0.115    -.4311945    .0467665
                      3  |  -.1182151   .1472157    -0.80   0.422    -.4067525    .1703223
                      4  |  -.1268181   .1254604    -1.01   0.312    -.3727161    .1190798
                         |
                   _cons |   1.028692   .4946718     2.08   0.038     .0591531    1.998231
            -------------+----------------------------------------------------------------
                 sigma_u |          0
                 sigma_e |  .42755899
                     rho |          0   (fraction of variance due to u_i)
            ------------------------------------------------------------------------------
            .
            As you see rho=0

            Thank you very much

            Comment


            • #7
              Jihad:
              what does -xttest0- after -xtreg,re- give you back?
              Kind regards,
              Carlo
              (Stata 18.0 SE)

              Comment


              • #8
                It gives me this
                Code:
                xttest0
                
                Breusch and Pagan Lagrangian multiplier test for random effects
                
                        ROA[Companyscode,t] = Xb + u[Companyscode] + e[Companyscode,t]
                
                        Estimated results:
                                         |       Var     sd = sqrt(Var)
                                ---------+-----------------------------
                                     ROA |   .5318008       .7292468
                                       e |   .1828067        .427559
                                       u |          0              0
                
                        Test:   Var(u) = 0
                                             chibar2(01) =     0.00
                                          Prob > chibar2 =   1.0000

                Comment


                • #9
                  Jihad:
                  no evidence of panel-wise effect.
                  Go pooled OLS with standard errors clustered on -panelid-.
                  Kind regards,
                  Carlo
                  (Stata 18.0 SE)

                  Comment


                  • #10
                    Ah ok I see. Is it because p= 1 so >0.05?
                    which command i should use : regress depvar indepvar ?
                    It would be a pooled OLS model through panel data ?

                    Thank you very much Carlo for your help
                    ​​​​​​​

                    Comment


                    • #11
                      Jihad:
                      in your case -xtest0- does not reject the null that Var(u)=0; that result implies that pooled OLS is the way to go to analyse your data.
                      However, you should acknowledge the panel structure of your data by clustering standard errors on -Companyscode- (ie, your -panelid-).
                      Hence, your code should be:
                      Code:
                      reg ROA i.CSR Risk Size ib2.Industry,vce(cluster Companyscode)
                      Kind regards,
                      Carlo
                      (Stata 18.0 SE)

                      Comment


                      • #12
                        Thank you very much Carlo. I will work on this and share it .. Many thanks

                        Comment


                        • #13
                          Hello, again Carlo,
                          This is the results I obtained from the pooled OLS estimation, Are they valid? can I have reliable conclusions from it?
                          Code:
                           xtset Companyscode Year, yearly
                                 panel variable:  Companyscode (strongly balanced)
                                  time variable:  Year, 2012 to 2016
                                          delta:  1 year
                          
                          . 
                          . reg ROA i.CSR Risk Size ib2.Industry,vce(cluster Companyscode)
                          
                          Linear regression                               Number of obs     =        139
                                                                          F(6, 27)          =       2.15
                                                                          Prob > F          =     0.0803
                                                                          R-squared         =     0.6649
                                                                          Root MSE          =     .43165
                          
                                                    (Std. Err. adjusted for 28 clusters in Companyscode)
                          ------------------------------------------------------------------------------
                                       |               Robust
                                   ROA |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                          -------------+----------------------------------------------------------------
                                 1.CSR |   .1158301   .0642641     1.80   0.083    -.0160289    .2476891
                                  Risk |   .6491344   .3023649     2.15   0.041     .0287329    1.269536
                                  Size |  -.1009088   .0477627    -2.11   0.044    -.1989097   -.0029079
                                       |
                              Industry |
                                    1  |   -.192214   .0868874    -2.21   0.036    -.3704923   -.0139358
                                    3  |  -.1182151   .1022348    -1.16   0.258    -.3279836    .0915534
                                    4  |  -.1268181    .083513    -1.52   0.141    -.2981726    .0445364
                                       |
                                 _cons |   1.028692    .442875     2.32   0.028     .1199876    1.937396
                          ------------------------------------------------------------------------------
                          .Thanks
                          Jihad

                          Comment


                          • #14
                            Jihad:
                            at their face-value, your results make sense.
                            As I do not know your research field (corporate finance?) I cannot help you out on any substantive interpretation.
                            Kind regards,
                            Carlo
                            (Stata 18.0 SE)

                            Comment


                            • #15
                              So statistically they are valid? but I should relate it to the theorical background of corporate social responsibility ?
                              thank you very much Carlo. Your help was considerable

                              Comment

                              Working...
                              X