Announcement

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

  • cross sectional regression

    cross sectional regression across countries: My sample consists of 150 bank observations for 2023, across 30 countries.
    My question is which one of the below is best to use to account for across country variations?
    1) country fixed effects by using i.country command in stata
    2) use country control variables such as GDP, Rule of Law, control of corruption, Enviromental Performance inded
    3) Should I do both 1) and 2) above - if not which one is better?
    4) if I do 1) or 2) do I need to cluster standard errors across country?

    I have tried to do 1) and 4) and my F statitstic disappears and suddenly none of my independent variables are significant, so I suppose this is inappropriate.
    thank you so much

  • #2
    Maria:
    1) correct;
    2) correct;
    3) 1)+2):
    4) yes.

    As far as your last point is concerned, please share what you typed and what Stata have you back (as per FAQ). Thanks.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thank you so much for the prompt response. I am copying below my output without clustering standard errors. The Homoskedasticity tests indicate no heterosckedastisticity, Does this mean that I do not need to do robust or cluster standard errors:

      . . regress GERQS ESGCom PERF REM WOMB WOME PCAF NZBA SIZE LEV ROAA CGF i.CCODE
      note: 30.CCODE omitted because of collinearity.

      Source | SS df MS Number of obs = 176
      -------------+---------------------------------- F(39, 136) = 7.41
      Model | 9562.19251 39 245.184423 Prob > F = 0.0000
      Residual | 4501.65088 136 33.1003741 R-squared = 0.6799
      -------------+---------------------------------- Adj R-squared = 0.5881
      Total | 14063.8434 175 80.3648194 Root MSE = 5.7533

      ------------------------------------------------------------------------------
      GERQS | Coefficient Std. err. t P>|t| [95% conf. interval]
      -------------+----------------------------------------------------------------
      ESGCom | .5936342 1.535091 0.39 0.700 -2.442101 3.629369
      PERF | 1.664053 2.204215 0.75 0.452 -2.694915 6.023022
      REM | 8.458434 2.397928 3.53 0.001 3.716386 13.20048
      WOMB | .6919396 2.801889 0.25 0.805 -4.848966 6.232845
      WOME | -3.238755 3.221254 -1.01 0.316 -9.608981 3.131472
      PCAF | 3.509845 1.505327 2.33 0.021 .5329691 6.486721
      NZBA | 3.76366 1.991068 1.89 0.061 -.1737974 7.701118
      SIZE | .1634796 .5767978 0.28 0.777 -.977173 1.304132
      LEV | -.0783147 .1685003 -0.46 0.643 -.4115343 .2549049
      ROAA | .6812615 .4526264 1.51 0.135 -.2138347 1.576358
      CGF | 1.574039 1.268099 1.24 0.217 -.9337043 4.081783
      |
      CCODE |
      2 | 10.24028 8.582243 1.19 0.235 -6.731632 27.21218
      3 | 23.98475 25.27272 0.95 0.344 -25.99359 73.96309
      4 | 15.90648 18.83823 0.84 0.400 -21.34726 53.16021
      5 | 17.87123 17.72687 1.01 0.315 -17.18472 52.92719
      6 | 4.260802 6.810191 0.63 0.533 -9.206764 17.72837
      7 | -3.14963 7.383645 -0.43 0.670 -17.75124 11.45198
      8 | 2.209857 4.424958 0.50 0.618 -6.540767 10.96048
      9 | -2.788007 6.409615 -0.43 0.664 -15.46341 9.887396
      10 | 8.412635 9.936375 0.85 0.399 -11.23715 28.06242
      11 | 2.50148 3.070251 0.81 0.417 -3.570128 8.573087
      12 | 27.28537 20.04259 1.36 0.176 -12.35006 66.92081
      13 | 23.52056 21.06102 1.12 0.266 -18.12889 65.17001
      14 | 6.426802 4.208285 1.53 0.129 -1.895338 14.74894
      15 | -.6573553 3.456969 -0.19 0.849 -7.493721 6.17901
      16 | 23.47177 18.11815 1.30 0.197 -12.35798 59.30151
      17 | 10.90944 14.07277 0.78 0.440 -16.92032 38.73919
      18 | 1.865625 4.528703 0.41 0.681 -7.090161 10.82141
      19 | 5.031645 8.53808 0.59 0.557 -11.85293 21.91622
      20 | -12.23272 8.340597 -1.47 0.145 -28.72676 4.261314
      21 | 8.568783 13.94674 0.61 0.540 -19.01175 36.14932
      22 | 2.883075 3.375749 0.85 0.395 -3.792674 9.558824
      23 | -8.03483 6.910293 -1.16 0.247 -21.70035 5.630693
      24 | 17.02607 16.59738 1.03 0.307 -15.79625 49.8484
      25 | 16.38382 11.89338 1.38 0.171 -7.136062 39.9037
      26 | 25.82149 23.8293 1.08 0.280 -21.3024 72.94538
      27 | 15.0263 18.3246 0.82 0.414 -21.21171 51.26431
      28 | 9.560482 10.94494 0.87 0.384 -12.08381 31.20477
      29 | 21.73535 15.7669 1.38 0.170 -9.444647 52.91534
      30 | 0 (omitted)
      |
      _cons | -28.09633 27.20939 -1.03 0.304 -81.90456 25.7119
      ------------------------------------------------------------------------------

      . estat hettest

      Breusch–Pagan/Cook–Weisberg test for heteroskedasticity
      Assumption: Normal error terms
      Variable: Fitted values of GERQS

      H0: Constant variance

      chi2(1) = 0.01
      Prob > chi2 = 0.9178

      . estat imtest, white

      White's test
      H0: Homoskedasticity
      Ha: Unrestricted heteroskedasticity

      chi2(176) = 176.00
      Prob > chi2 = 0.4858

      Cameron & Trivedi's decomposition of IM-test

      --------------------------------------------------
      Source | chi2 df p
      ---------------------+----------------------------
      Heteroskedasticity | 176.00 176 0.4858
      Skewness | 38.25 39 0.5038
      Kurtosis | 0.58 1 0.4475
      ---------------------+----------------------------
      Total | 214.83 216 0.5097
      --------------------------------------------------

      Comment


      • #4
        sorry the copy did not work very well. . I tried again and it is better now.

        egress GERQS ESGCom PERF REM WOMB WOME PCAF NZBA SIZE LEV ROAA CGF, robust

        Linear regression Number of obs = 176
        F(11, 164) = 35.77
        Prob > F = 0.0000
        R-squared = 0.5950
        Root MSE = 5.8933

        ------------------------------------------------------------------------------
        | Robust
        GERQS | Coefficient std. err. t P>|t| [95% conf. interval]
        -------------+----------------------------------------------------------------
        ESGCom | 1.618787 1.310701 1.24 0.219 -.969237 4.206811
        PERF | 1.27092 1.93083 0.66 0.511 -2.541571 5.083411
        REM | 8.794508 1.915623 4.59 0.000 5.012044 12.57697
        WOMB | .4619205 2.490686 0.19 0.853 -4.456025 5.379866
        WOME | -4.275162 2.614473 -1.64 0.104 -9.437529 .8872048
        PCAF | 3.771934 1.237289 3.05 0.003 1.328864 6.215004
        NZBA | 5.929158 1.215245 4.88 0.000 3.529613 8.328702
        SIZE | .4336076 .3779865 1.15 0.253 -.3127398 1.179955
        LEV | .0564408 .1771497 0.32 0.750 -.2933474 .4062291
        ROAA | .7406547 .2825804 2.62 0.010 .1826898 1.29862
        CGF | .2361721 .07721 3.06 0.003 .0837183 .3886258
        _cons | -5.265707 5.902145 -0.89 0.374 -16.9197 6.388282
        ------------------------------------------------------------------------------

        .
        . . regress GERQS ESGCom PERF REM WOMB WOME PCAF NZBA SIZE LEV ROAA CGF i.CCODE
        note: 30.CCODE omitted because of collinearity.

        Source | SS df MS Number of obs = 176
        -------------+---------------------------------- F(39, 136) = 7.41
        Model | 9562.19251 39 245.184423 Prob > F = 0.0000
        Residual | 4501.65088 136 33.1003741 R-squared = 0.6799
        -------------+---------------------------------- Adj R-squared = 0.5881
        Total | 14063.8434 175 80.3648194 Root MSE = 5.7533

        ------------------------------------------------------------------------------
        GERQS | Coefficient Std. err. t P>|t| [95% conf. interval]
        -------------+----------------------------------------------------------------
        ESGCom | .5936342 1.535091 0.39 0.700 -2.442101 3.629369
        PERF | 1.664053 2.204215 0.75 0.452 -2.694915 6.023022
        REM | 8.458434 2.397928 3.53 0.001 3.716386 13.20048
        WOMB | .6919396 2.801889 0.25 0.805 -4.848966 6.232845
        WOME | -3.238755 3.221254 -1.01 0.316 -9.608981 3.131472
        PCAF | 3.509845 1.505327 2.33 0.021 .5329691 6.486721
        NZBA | 3.76366 1.991068 1.89 0.061 -.1737974 7.701118
        SIZE | .1634796 .5767978 0.28 0.777 -.977173 1.304132
        LEV | -.0783147 .1685003 -0.46 0.643 -.4115343 .2549049
        ROAA | .6812615 .4526264 1.51 0.135 -.2138347 1.576358
        CGF | 1.574039 1.268099 1.24 0.217 -.9337043 4.081783
        |
        CCODE |
        2 | 10.24028 8.582243 1.19 0.235 -6.731632 27.21218
        3 | 23.98475 25.27272 0.95 0.344 -25.99359 73.96309
        4 | 15.90648 18.83823 0.84 0.400 -21.34726 53.16021
        5 | 17.87123 17.72687 1.01 0.315 -17.18472 52.92719
        6 | 4.260802 6.810191 0.63 0.533 -9.206764 17.72837
        7 | -3.14963 7.383645 -0.43 0.670 -17.75124 11.45198
        8 | 2.209857 4.424958 0.50 0.618 -6.540767 10.96048
        9 | -2.788007 6.409615 -0.43 0.664 -15.46341 9.887396
        10 | 8.412635 9.936375 0.85 0.399 -11.23715 28.06242
        11 | 2.50148 3.070251 0.81 0.417 -3.570128 8.573087
        12 | 27.28537 20.04259 1.36 0.176 -12.35006 66.92081
        13 | 23.52056 21.06102 1.12 0.266 -18.12889 65.17001
        14 | 6.426802 4.208285 1.53 0.129 -1.895338 14.74894
        15 | -.6573553 3.456969 -0.19 0.849 -7.493721 6.17901
        16 | 23.47177 18.11815 1.30 0.197 -12.35798 59.30151
        17 | 10.90944 14.07277 0.78 0.440 -16.92032 38.73919
        18 | 1.865625 4.528703 0.41 0.681 -7.090161 10.82141
        19 | 5.031645 8.53808 0.59 0.557 -11.85293 21.91622
        20 | -12.23272 8.340597 -1.47 0.145 -28.72676 4.261314
        21 | 8.568783 13.94674 0.61 0.540 -19.01175 36.14932
        22 | 2.883075 3.375749 0.85 0.395 -3.792674 9.558824
        23 | -8.03483 6.910293 -1.16 0.247 -21.70035 5.630693
        24 | 17.02607 16.59738 1.03 0.307 -15.79625 49.8484
        25 | 16.38382 11.89338 1.38 0.171 -7.136062 39.9037
        26 | 25.82149 23.8293 1.08 0.280 -21.3024 72.94538
        27 | 15.0263 18.3246 0.82 0.414 -21.21171 51.26431
        28 | 9.560482 10.94494 0.87 0.384 -12.08381 31.20477
        29 | 21.73535 15.7669 1.38 0.170 -9.444647 52.91534
        30 | 0 (omitted)
        |
        _cons | -28.09633 27.20939 -1.03 0.304 -81.90456 25.7119
        ------------------------------------------------------------------------------

        . estat hettest

        Breusch–Pagan/Cook–Weisberg test for heteroskedasticity
        Assumption: Normal error terms
        Variable: Fitted values of GERQS

        H0: Constant variance

        chi2(1) = 0.01
        Prob > chi2 = 0.9178

        . estat imtest, white

        White's test
        H0: Homoskedasticity
        Ha: Unrestricted heteroskedasticity

        chi2(176) = 176.00
        Prob > chi2 = 0.4858

        Cameron & Trivedi's decomposition of IM-test

        --------------------------------------------------
        Source | chi2 df p
        ---------------------+----------------------------
        Heteroskedasticity | 176.00 176 0.4858
        Skewness | 38.25 39 0.5038
        Kurtosis | 0.58 1 0.4475
        ---------------------+----------------------------
        Total | 214.83 216 0.5097
        --------------------------------------------------

        .


        Comment


        • #5
          and when I cluster standard errors by country I get
          . regress GERQS ESGCom PERF REM WOMB WOME PCAF NZBA SIZE LEV ROAA CGF i.CCODE, cluster(CCODE)
          note: 30.CCODE omitted because of collinearity.
          Linear regression Number of obs = 176
          F(9, 29) = .
          Prob > F = .
          R-squared = 0.6799
          Root MSE = 5.7533
          (Std. err. adjusted for 30 clusters in CCODE)
          |Robust
          GERQS | Coefficient std. err. t P>|t| [95% conf. interval]
          ESGCom | .5936342 1.158382 0.51 0.612 -1.775522 2.962791
          PERF | 1.664053 2.23379 0.74 0.462 -2.90456 6.232667
          REM | 8.458434 2.7045 3.13 0.004 2.92711 13.98976
          WOMB | .6919396 3.036366 0.23 0.821 -5.518125 6.902005
          WOME | -3.238755 2.663609 -1.22 0.234 -8.686448 2.208938
          PCAF | 3.509845 1.864528 1.88 0.070 -.303544 7.323234
          NZBA | 3.76366 2.689615 1.40 0.172 -1.73722 9.26454
          SIZE | .1634796 .814418 0.20 0.842 -1.502192 1.829151
          LEV | -.0783147 .3044736 -0.26 0.799 -.7010332 .5444038
          ROAA | .6812615 .4375015 1.56 0.130 -.2135295 1.576052
          CGF | 1.574039 .7503912 2.10 0.045 .0393172 3.108762
          |
          CCODE |
          2 | 10.24028 4.014636 2.55 0.016 2.029425 18.45113
          3 | 23.98475 13.70314 1.75 0.091 -4.041329 52.01082
          4 | 15.90648 10.05387 1.58 0.124 -4.655998 36.46895
          5 | 17.87123 9.155598 1.95 0.061 -.8540667 36.59653
          6 | 4.260802 3.052275 1.40 0.173 -1.981802 10.50341
          7 | -3.14963 3.933057 -0.80 0.430 -11.19363 4.8943

          Comment


          • #6
            ssc install reghdfe

            reghdfe GERQS ESGCom PERF REM WOMB WOME PCAF NZBA SIZE LEV ROAA CGF , absorb(CCODE YEAR) cluster(CCODE)

            Comment


            • #7
              Thank you George. Please note that all my observations are for 2023 as I am checking for early adoption of climate related disclosures.Thus YEAR is not relevant.
              I have run the regression and I copy the output below.
              1) One of my variables CGF which is key for country governance quality - it says below because it is probably collinear wiht fixed effects. Can I run a second regression wihtout country fixed effects and include this variable, as a robusness check?
              2) Do you think the below results are good and robust?
              3)Do I need to do any robustness checks?
              reghdfe GERQS ESGCom PERF REM WOMB WOME PCAF NZBA SIZE LEV ROAA CGF , absorb(CCODE) cluster(CCODE)
              (MWFE estimator converged in 1 iterations)
              note: CGF is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
              HDFE Linear regression Number of obs = 176
              Absorbing 1 HDFE group F( 10, 29) = 10.75
              Statistics robust to heteroskedasticity Prob > F = 0.0000
              R-squared = 0.6799
              Adj R-squared = 0.5881
              Within R-sq. = 0.3529
              Number of clusters (CCODE) = 30 Root MSE = 5.7533
              (Std. err. adjusted for 30 clusters in CCODE)
              |Robust
              GERQS | Coefficient std. err. t P>|t| [95% conf. interval]
              ESGCom | .5936342 1.051669 0.56 0.577 -1.557271 2.744539
              PERF | 1.664053 2.028009 0.82 0.419 -2.483691 5.811798
              REM | 8.458434 2.455356 3.44 0.002 3.436666 13.4802
              WOMB | .6919396 2.75665 0.25 0.804 -4.946042 6.329921
              WOME | -3.238755 2.418232 -1.34 0.191 -8.184595 1.707086
              PCAF | 3.509845 1.692764 2.07 0.047 .0477531 6.971937
              NZBA | 3.76366 2.441842 1.54 0.134 -1.230467 8.757788
              SIZE | .1634796 .7393921 0.22 0.827 -1.348747 1.675706
              LEV | -.0783147 .2764249 -0.28 0.779 -.6436671 .4870377
              ROAA | .6812615 .397198 1.72 0.097 -.1310996 1.493623
              CGF | 0 (omitted)
              _cons | 3.536742 12.21612 0.29 0.774 -21.44802 28.5215
              Absorbed degrees of freedom:
              Absorbed FE | Categories - Redundant = Num. Coefs |
              -|
              CCODE | 30 30 0 *|
              * = FE nested within cluster; treated as redundant for DoF computation

              Comment


              • #8
                Maria:
                you can go -regress- with -vce(cluster CCODE)- standard errors.
                Please share what you typed and what Stata gave you back using CODE delimiters (see the FAQ). Thanks.
                Kind regards,
                Carlo
                (StataNow 18.5)

                Comment


                • #9
                  Thank you Carlo. It is not clear to me what the command in stata should be, afer I write my regress command. This is my regress equation. Can you please indicate what I should change?

                  . regress GERQS ESGCom PERF REM NZBA PCAF WOMB WOME SIZE LEV ROAA i.CCODE, cluster(CCODE)

                  Linear regression Number of obs = 176
                  F(9, 29) = .
                  Prob > F = .
                  R-squared = 0.6799
                  Root MSE = 5.7533

                  (Std. err. adjusted for 30 clusters in CCODE)

                  Comment


                  • #10
                    1) Also I need some help on how to run endogeneity test. My dependent variable can in no way impact the independent variables.
                    2) what do you think about the suggestion to run reghdfe as suggested by Geoge Ford above. My results can be viewed above.

                    Comment


                    • #11
                      Maria:
                      please read (and act on) Help - Statalist , point 12.3.
                      About the reason why your F test does not appear, see -help j_robustsingular-.
                      As far as the command -estat endogenous- is concerned, see ivregress postestimation##syntax_estat.
                      George's helpful hint is one of the possible approaches to deal with what you're planning to do.
                      Kind regards,
                      Carlo
                      (StataNow 18.5)

                      Comment


                      • #12
                        Code:
                        .    regress    GERQS    ESGCom    PERF    REM    NZBA    PCAF    WOMB    WOME    SIZE    LEV    ROAA    i.CCODE

                        Comment


                        • #13
                          . regress GERQS ESGCom PERF REM NZBA PCAF WOMB WOME SIZE LEV ROAA i.CCODE

                          Code:
                           regress GERQS ESGCom PERF REM NZBA PCAF WOMB WOME SIZE LEV ROAA i.CCODE
                          
                                Source |       SS           df       MS      Number of obs   =       176
                          -------------+----------------------------------   F(39, 136)      =      7.41
                                 Model |  9562.19251        39  245.184423   Prob > F        =    0.0000
                              Residual |  4501.65088       136  33.1003741   R-squared       =    0.6799
                          -------------+----------------------------------   Adj R-squared   =    0.5881
                                 Total |  14063.8434       175  80.3648194   Root MSE        =    5.7533
                          
                          ------------------------------------------------------------------------------
                                 GERQS | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                          -------------+----------------------------------------------------------------
                                ESGCom |   .5936342   1.535091     0.39   0.700    -2.442101    3.629369
                                  PERF |   1.664053   2.204215     0.75   0.452    -2.694915    6.023022
                                   REM |   8.458434   2.397928     3.53   0.001     3.716386    13.20048
                                  NZBA |    3.76366   1.991068     1.89   0.061    -.1737974    7.701118
                                  PCAF |   3.509845   1.505327     2.33   0.021     .5329691    6.486721
                                  WOMB |   .6919396   2.801889     0.25   0.805    -4.848966    6.232845
                                  WOME |  -3.238755   3.221254    -1.01   0.316    -9.608981    3.131472
                                  SIZE |   .1634796   .5767978     0.28   0.777     -.977173    1.304132
                                   LEV |  -.0783147   .1685003    -0.46   0.643    -.4115343    .2549049
                                  ROAA |   .6812615   .4526264     1.51   0.135    -.2138347    1.576358
                                       |
                                 CCODE |
                                    2  |   1.693242   3.190253     0.53   0.596    -4.615678    8.002162
                                    3  |  -5.701635   3.306326    -1.72   0.087     -12.2401     .836825
                                    4  |  -5.689344    3.36573    -1.69   0.093    -12.34528    .9665906
                                    5  |  -2.370914     3.5371    -0.67   0.504    -9.365744    4.623916
                                    6  |   -1.81499   3.311099    -0.55   0.584    -8.362889    4.732909
                                    7  |   7.191809   3.189708     2.25   0.026     .8839665    13.49965
                                    8  |   1.296914   4.164011     0.31   0.756    -6.937671    9.531499
                                    9  |   5.522921    4.38155     1.26   0.210     -3.14186     14.1877
                                   10  |  -.8112354   3.809942    -0.21   0.832    -8.345628    6.723157
                                   11  |   2.265374   2.974989     0.76   0.448    -3.617848    8.148596
                                   12  |   4.571983   3.713791     1.23   0.220    -2.772264    11.91623
                                   13  |  -1.002972   3.257435    -0.31   0.759    -7.444747    5.438803
                                   14  |   7.087898   4.372768     1.62   0.107    -1.559517    15.73531
                                   15  |   2.254618   3.567351     0.63   0.528    -4.800036    9.309271
                                   16  |   3.670351   4.530704     0.81   0.419    -5.289391    12.63009
                                   17  |  -4.610592    3.57599    -1.29   0.199    -11.68233    2.461146
                                   18  |   2.306356   4.639536     0.50   0.620    -6.868608    11.48132
                                   19  |  -3.074658   3.815734    -0.81   0.422     -10.6205    4.471188
                                   20  |  -.9940828   3.549297    -0.28   0.780    -8.013033    6.024868
                                   21  |   -6.73088   3.947704    -1.71   0.090     -14.5377    1.075945
                                   22  |   5.795048   3.760546     1.54   0.126    -1.641661    13.23176
                                   23  |   .9529345   4.553552     0.21   0.835    -8.051991     9.95786
                                   24  |    -1.8624   2.991911    -0.62   0.535    -7.779085    4.054286
                                   25  |   3.791504   3.545848     1.07   0.287    -3.220626    10.80363
                                   26  |  -1.850121   3.267341    -0.57   0.572    -8.311486    4.611244
                                   27  |  -5.892686   3.449826    -1.71   0.090    -12.71493    .9295544
                                   28  |  -1.914265   3.565225    -0.54   0.592    -8.964715    5.136185
                                   29  |   4.861646    4.03239     1.21   0.230     -3.11265    12.83594
                                   30  |   5.162849   4.159366     1.24   0.217     -3.06255    13.38825
                                       |
                                 _cons |   3.384457   9.967332     0.34   0.735    -16.32655    23.09546
                          ------------------------------------------------------------------------------
                          
                          .

                          Comment


                          • #14
                            Struggled a bit but managed to properly copy my data. Thank you and apologies

                            Comment


                            • #15
                              Maria:
                              try:
                              Code:
                              testparm i.CCODE
                              and see if unit fixed effect is worth considering for -reghdfe- (or -areg-).
                              Kind regards,
                              Carlo
                              (StataNow 18.5)

                              Comment

                              Working...
                              X