Announcement

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

  • Stata command when depvar is a dummy variable

    I want to run a study on the impact of financial performance on corporate social responsibility (CSR), where CSR is a dummy variable

    Code:
    reg CSR ROA Risk Size Age ib2.Industry,vce(cluster Companyscode)
    Is this correct ? because when I add the prefix i.CSR, stata gives me this

    Code:
     reg i.CSR ROA Risk Size Age ib2.Industry,vce(cluster Companyscode)
    depvar may not be a factor variable
    r(198);


  • #2
    Yes, you do not normally use the factor variable syntax for outcome (dependent) variables.

    Depending upon how many categories are in CSR, and whether the baseline category is coded as zero, you might prefer something like
    Code:
    logit CSR ROA Risk Size Age ib2.Industry, vce(cluster Companyscode)
    or
    Code:
    mlogit CSR ROA Risk Size Age ib2.Industry, vce(cluster Companyscode)

    Comment


    • #3
      CSR is a binary variable, it takes 1 when the company is CSR labelled and 0 otherwise

      mlogit CSR ROA Risk Size Age ib2.Industry, vce(cluster Companyscode)
      this code isn't for pooled ols model ?

      Comment


      • #4
        Is this model correct and reliable knowing that CSR is binary variable 0 or 1 ?

        Code:
        reg CSR ROA Risk Size Age ib2.Industry,vce(cluster Companyscode)
        
        Linear regression                               Number of obs     =        167
                                                        F(7, 27)          =       8.26
                                                        Prob > F          =     0.0000
                                                        R-squared         =     0.0503
                                                        Root MSE          =     .47551
        
                                  (Std. Err. adjusted for 28 clusters in Companyscode)
        ------------------------------------------------------------------------------
                     |               Robust
                 CSR |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 ROA |   .1539658   .0517074     2.98   0.006     .0478709    .2600606
                Risk |  -.0684991   .0471436    -1.45   0.158    -.1652298    .0282316
                Size |  -.0448225   .1000813    -0.45   0.658    -.2501723    .1605273
                 Age |   .0033307   .0039281     0.85   0.404    -.0047291    .0113906
                     |
            Industry |
                  1  |   .2006988   .2308277     0.87   0.392    -.2729205     .674318
                  3  |   .0580331   .2672971     0.22   0.830    -.4904152    .6064814
                  4  |  -.0056543   .2621828    -0.02   0.983     -.543609    .5323004
                     |
               _cons |   .6148575    .875565     0.70   0.489    -1.181653    2.411368
        ------------------------------------------------------------------------------
        
        . linktest
        
              Source |       SS           df       MS      Number of obs   =       167
        -------------+----------------------------------   F(2, 164)       =      4.35
               Model |  1.90707296         2   .95353648   Prob > F        =    0.0144
            Residual |  35.9492145       164  .219202527   R-squared       =    0.0504
        -------------+----------------------------------   Adj R-squared   =    0.0388
               Total |  37.8562874       166  .228049924   Root MSE        =    .46819
        
        ------------------------------------------------------------------------------
                 CSR |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                _hat |   .8949609   1.019796     0.88   0.381    -1.118662    2.908584
              _hatsq |   .1279554   1.171525     0.11   0.913     -2.18526    2.441171
               _cons |   .0195873   .2176179     0.09   0.928    -.4101068    .4492815
        ------------------------------------------------------------------------------
        
        . estat ovtest
        
        Ramsey RESET test using powers of the fitted values of CSR
               Ho:  model has no omitted variables
                         F(3, 156) =      0.15
                          Prob > F =      0.9267
        
        . estat vif
        
            Variable |       VIF       1/VIF  
        -------------+----------------------
                 ROA |      2.81    0.355467
                Risk |      2.80    0.357675
                Size |      2.16    0.463243
                 Age |      1.52    0.656552
            Industry |
                  1  |      2.04    0.491148
                  3  |      3.90    0.256617
                  4  |      2.38    0.419777
        -------------+----------------------
            Mean VIF |      2.52

        Comment


        • #5
          You should read up on logistic regression. One source is

          https://www3.nd.edu/~rwilliam/stats3/index.html

          But there are no doubt hundreds if not thousands of discussions online.
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 19.5 MP (2 processor)

          EMAIL: [email protected]
          WWW: https://www3.nd.edu/~rwilliam

          Comment

          Working...
          X