Announcement

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

  • Coefficient test for two different reghdfe regression models (suest not working)

    Hello, STATA newbie here.

    For my research I need to do a coefficient test between coefficients from two different regression models. Usually this is done with the suest command, however, since I'm using a reghdfe regression, this isn't working, since it cannot predict the score. I saw one forum post where someone had the same issue, but the commands posted there were too complicated for me. I have the following two regression models (excluding the control variables):

    Model 1: Reghdfe EarningsPersistenceGAAP GAAPEPS CG FirminGFC FirminCOVID GAAPEPS*GFC GAAPEPS*COVID GAAPEPS*GFC*CG GAAPEPS*COVID*CG, absorb(year industry)

    Model 2: Reghdfe EarningsPersistenceNONGAAP NONGAAPEPS CG FirminGFC FirminCOVID NONGAAPEPS*GFC NONGAAPEPS*COVID NONGAAPEPS*GFC*CG NONGAAPEPS*COVID*CG, absorb(year industry)

    I would like to test every variable for potential statistical differences.

    Does anyone know how I can do a manual workaround (that I can understand and explain if necessary)?

  • #2
    The difference between the two models is that where Model1 has GAAP, Model 2 has NONGAAP in a variable name. This leads me to think that what are really trying to do is conduct the regression in two subsets of your population, those characterized as GAAP (whatever that is) and the other being those who are not characterized as GAAP. And every observation is either a GAAP observation or a NONGAAP observation (probably with the variables containing the opposite name having missing values). Am I right?

    If my thought is correct, then you have not formed your data set optimally for purpose. Instead of having separate variables for GAAP and NONGAAP, have a single variable that takes on the value 1 in GAAP observations and 0 in the NONGAAP observations. For variables like GAAPEPS and NONGAAPEPS, combine them into a single variable, EPS, which takes on the GAAPEPS value if the observation has GAAP == 1 and the NONGAAPEPS value if the observation has GAAP = 0. Then do a single regression like this using factor variable notation:

    Code:
    reghdfe EarningsPersistence i.GAAP##(x.CG x.FirminGFC x.FirminCOVID x.EPS#x.GFC x.x.EPS#x.COVID x.EPS#x.GFC#x.CT x.EPS#x.COVID#x.CG), ///
         absorb(industry i.GAAP#industry year i.GAAP#year)
    Note that, the right hand side variables have all been prefixed with x. You must replace x., in each case, by c. if the variable is continuous, and by i. if the variable is discrete. And it may be more complicated than that: if, for example EPS*COVID is actually an interaction term for variables EPS and FirminCOVID, then you need to properly construct that interaction as x.EPS#x.FirminCOVID instead. Before you proceed, do read -help fvvarlist- so you can understand factor variable notation, how it works, and how to use it.

    Anyway, once you have properly constructed the regression using factor variable notation and with the whole thing involving an interaction with i.GAAP, you are home. The coefficients of all of the i.GAAP#whatever terms are the differences between the whatever terms in the GAAP and NONGAAP subset regressions.

    Comment


    • #3
      reghdfe and areg won't work with suest.

      Clyde offers a clean alternative.

      Comment


      • #4
        Hi Clyde, thanks for your response.

        GAAP and non-GAAP are two different variables. Indeed, I have them both in one dataset, but they are different from each other. Hence, the two different regression models. A litte background on the variables:

        GFC and COVID are both dummy variables
        The interaction variables are generated by multiplying the independent variable with a dummy variable (and another independent variable if applicable), but that's wrong according to your message?


        I came across this stata forum, but I don't understand much from it to be honest: https://www.statalist.org/forums/for...erent-outcomes

        I will read -help fvvarlist-, thanks for the suggestion.

        Comment


        • #5
          I understand that GAAP and NONGAAP are two separate variables in your data. I'm questioning whether they should be. From their names it sounds like it should be the case that whenever GAAP == 1, we have NONGAAP == 0, and vice versa. Are you saying that this is not the case? OK, but if it is not the case, why did you name them GAAP and NONGAAP? At best that's confusing.

          Anyway, on the assumption that GAAP and NONGAAP are in fact two variables that are not related by each being the opposite of the other, then the approach outlined in #2 will not work. In this case, what you need to do is emulate the -reghdfe- commands in -regress-. You can do that by eliminating the -absorb()- option and adding i.year and i.industry to the list of independent variables.

          I still think that you should get rid of your homebrew interaction terms and use factor variable notation instead. So the approach I am recommending looks like this:
          Code:
          //    MODEL 1
          regress EarningsPersistenceGAAP c.GAAPEPS##c.GC##i.COVID##i.GFC i.year i.industry
          estimates store gaap
          
          //    MODEL 2
          regress EarningsPersistenceNONGAAP c.NONGAAPEPS##c.GC##i.COVID##i.GFC i.year i.industry
          estimates store nongaap
          
          suest gaap nongaap
          In the above I am guessing that the EPS and GC variables are continuous and COVID and GFC are discrete (probably even dichotomous), but change the c.'s and i.'s to whatever is actually correct for these variables. Also, as I am reading your code from #1, it seems to me that what you are actually looking at, if I understand which variables are intended to be interactions of which others, that what you are really trying to model here is a four-way interaction involving (NON)GAAPEPS, GC, COVID, and GFC. I've coded it accordingly here.

          Your code in #1 makes no mention of robust or clustered variance estimation. Typically one of those is used in this kind of situation, unless the number of clusters is too small to allow it. Anyway, if you want to use either of those variance estimators, do not apply them to the -regress- commands. Instead, continue to use the default OLS variance estimator in -regress-, but apply the other variance estimation to the -suest- command.

          Comment


          • #6
            Are EarningsPersistenceGAAP and EarningsPersistenceNONGAAP measuring different things, or measuring the same thing for different groups (GAAP and NONGAAP). Can a firm be in both groups?

            Comment


            • #7
              Originally posted by George Ford View Post
              Are EarningsPersistenceGAAP and EarningsPersistenceNONGAAP measuring different things, or measuring the same thing for different groups (GAAP and NONGAAP). Can a firm be in both groups?
              Hi George, EarningsPersistence (EP) is measured in the same way for both reporting standards (GAAP and non-GAAP). All the firms in my sample report both GAAP earnings per share (EPS) and non-GAAP earnings per share.

              Comment


              • #8
                I still think Clyde's reghdfe approach would work, but you'd need to modify the data a bit. Create a single Y and EPS variable and then have a dummy for GAAP, then estimate all the coefficients with i.GAAP interaction on all the Xs. Or, include the Xs and then have c.GAAP#(c.X) and the interactions measure the difference in coefficients and the t-test is a direct test. You can report the i.GAAP coefficients and then just use the c.GAAP approach to test equality.

                This approach seems more straightforward and everything you need comes from one (or two) lines of code, versus a bunch of coefficient tests using suest.

                Comment


                • #9
                  Originally posted by Clyde Schechter View Post
                  I understand that GAAP and NONGAAP are two separate variables in your data. I'm questioning whether they should be. From their names it sounds like it should be the case that whenever GAAP == 1, we have NONGAAP == 0, and vice versa. Are you saying that this is not the case? OK, but if it is not the case, why did you name them GAAP and NONGAAP? At best that's confusing.

                  Anyway, on the assumption that GAAP and NONGAAP are in fact two variables that are not related by each being the opposite of the other, then the approach outlined in #2 will not work. In this case, what you need to do is emulate the -reghdfe- commands in -regress-. You can do that by eliminating the -absorb()- option and adding i.year and i.industry to the list of independent variables.

                  I still think that you should get rid of your homebrew interaction terms and use factor variable notation instead. So the approach I am recommending looks like this:
                  Code:
                  // MODEL 1
                  regress EarningsPersistenceGAAP c.GAAPEPS##c.GC##i.COVID##i.GFC i.year i.industry
                  estimates store gaap
                  
                  // MODEL 2
                  regress EarningsPersistenceNONGAAP c.NONGAAPEPS##c.GC##i.COVID##i.GFC i.year i.industry
                  estimates store nongaap
                  
                  suest gaap nongaap
                  In the above I am guessing that the EPS and GC variables are continuous and COVID and GFC are discrete (probably even dichotomous), but change the c.'s and i.'s to whatever is actually correct for these variables. Also, as I am reading your code from #1, it seems to me that what you are actually looking at, if I understand which variables are intended to be interactions of which others, that what you are really trying to model here is a four-way interaction involving (NON)GAAPEPS, GC, COVID, and GFC. I've coded it accordingly here.

                  Your code in #1 makes no mention of robust or clustered variance estimation. Typically one of those is used in this kind of situation, unless the number of clusters is too small to allow it. Anyway, if you want to use either of those variance estimators, do not apply them to the -regress- commands. Instead, continue to use the default OLS variance estimator in -regress-, but apply the other variance estimation to the -suest- command.
                  Hi Clyde, thanks for your reply. I can understand where the confusion comes from. I should have explained that better. For my research I need to make a distinction between the Global Financial Crisis and the COVID Crisis which means I can't let all the variables interact with each other. Furthermore, if I understand correctly, I should stop using the reghdfe command and ditch the year fixed effects and industry fixed effects by transforming the reghdfe into a normal reg. Will i.year and i.industry capture the fixed effects in the correct way?

                  Code:
                  . reg EarningsPersistenceGAAP_w GAAPEPS_w CG GFC COVID c.GAAPEPS##i.GFC c.GAAPEPS##i.COVID c.
                  > GAAPEPS##i.GFC##c.CG c.GAAPEPS##i.COVID##c.CG  Num_LogTA_w NaturalLogarithmofFA_w Num_LR_w 
                  > Num_SR_w INF_w INFGrowth_w UR_w URGrowth_w IR_w IRGrowth_w GDP_w GDPGrowth_w i.FiscalYearCC
                  > M i.SIC_Industry 
                  note: 1.GFC omitted because of collinearity.
                  note: GAAPEPS omitted because of collinearity.
                  note: 1.COVID omitted because of collinearity.
                  note: GAAPEPS omitted because of collinearity.
                  note: CG omitted because of collinearity.
                  note: GAAPEPS omitted because of collinearity.
                  note: CG omitted because of collinearity.
                  note: 2009.FiscalYearCCM omitted because of collinearity.
                  note: 2021.FiscalYearCCM omitted because of collinearity.
                  
                        Source |       SS           df       MS      Number of obs   =    15,233
                  -------------+----------------------------------   F(39, 15193)    =    290.03
                         Model |  12554.4278        39  321.908405   Prob > F        =    0.0000
                      Residual |  16862.9051    15,193  1.10991279   R-squared       =    0.4268
                  -------------+----------------------------------   Adj R-squared   =    0.4253
                         Total |  29417.3328    15,232  1.93128498   Root MSE        =    1.0535
                  
                  ----------------------------------------------------------------------------------------
                  EarningsPersistenceG~w | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                  -----------------------+----------------------------------------------------------------
                               GAAPEPS_w |   .6681901   .0116702    57.26   0.000     .6453151    .6910651
                                      CG |    .012462   .0063395     1.97   0.049     .0000358    .0248881
                                     GFC |  -.0087051   .1684049    -0.05   0.959     -.338799    .3213887
                                   COVID |   1.715321   .4143013     4.14   0.000     .9032407    2.527401
                                 GAAPEPS |   .0206978   .0168235     1.23   0.219    -.0122783    .0536738
                                   1.GFC |          0  (omitted)
                                         |
                           GFC#c.GAAPEPS |
                                      1  |  -.2866625   .0623326    -4.60   0.000    -.4088419   -.1644831
                                         |
                                 GAAPEPS |          0  (omitted)
                                 1.COVID |          0  (omitted)
                                         |
                         COVID#c.GAAPEPS |
                                      1  |  -.0519804   .0227925    -2.28   0.023    -.0966564   -.0073044
                                         |
                                 GAAPEPS |          0  (omitted)
                                      CG |          0  (omitted)
                                         |
                          c.GAAPEPS#c.CG |  -.0072304   .0018884    -3.83   0.000     -.010932   -.0035289
                                         |
                                GFC#c.CG |
                                      1  |  -.0110013    .010655    -1.03   0.302    -.0318863    .0098837
                                         |
                      GFC#c.GAAPEPS#c.CG |
                                      1  |   .0168293   .0054928     3.06   0.002     .0060627    .0275959
                                         |
                                 GAAPEPS |          0  (omitted)
                                      CG |          0  (omitted)
                                         |
                              COVID#c.CG |
                                      1  |  -.0255031   .0116383    -2.19   0.028    -.0483156   -.0026907
                                         |
                    COVID#c.GAAPEPS#c.CG |
                                      1  |   .0072397   .0024525     2.95   0.003     .0024325    .0120469
                                         |
                             Num_LogTA_w |   .0350231   .0088228     3.97   0.000     .0177293    .0523169
                  NaturalLogarithmofFA_w |  -.0254782   .0132157    -1.93   0.054    -.0513826    .0004263
                                Num_LR_w |  -.0245809   .0085321    -2.88   0.004    -.0413049    -.007857
                                Num_SR_w |  -.0028228   .0028168    -1.00   0.316    -.0083439    .0026984
                                   INF_w |  -.0152702   .0086377    -1.77   0.077    -.0322012    .0016608
                             INFGrowth_w |   9.317135   4.603709     2.02   0.043     .2933119    18.34096
                                    UR_w |   .0304478   .0243885     1.25   0.212    -.0173567    .0782523
                              URGrowth_w |  -.0034263    .087293    -0.04   0.969     -.174531    .1676785
                                    IR_w |  -.1400874   .0397134    -3.53   0.000    -.2179304   -.0622444
                              IRGrowth_w |   .1033606   .0857643     1.21   0.228    -.0647476    .2714689
                                   GDP_w |  -.0001371    .000134    -1.02   0.306    -.0003998    .0001256
                             GDPGrowth_w |  -.2230232   1.650276    -0.14   0.893    -3.457763    3.011716
                                         |
                           FiscalYearCCM |
                                   2007  |     .10874   .0450905     2.41   0.016     .0203571    .1971229
                                   2008  |   .0594729   .0756395     0.79   0.432    -.0887896    .2077353
                                   2009  |          0  (omitted)
                                   2010  |   .0831276   .1234739     0.67   0.501     -.158896    .3251513
                                   2018  |   1.206829   .2899916     4.16   0.000     .6384109    1.775248
                                   2019  |   1.169862   .3201219     3.65   0.000     .5423845    1.797339
                                   2020  |  -.4886415     .06704    -7.29   0.000     -.620048    -.357235
                                   2021  |          0  (omitted)
                                   2022  |   1.851714   .4392351     4.22   0.000     .9907599    2.712667
                                         |
                            SIC_Industry |
                                      2  |   .0953184   .1897156     0.50   0.615    -.2765469    .4671836
                                      3  |    .002676   .2224802     0.01   0.990    -.4334119    .4387638
                                      4  |   .2374448   .1870519     1.27   0.204    -.1291994    .6040891
                                      5  |   .0942036   .1878171     0.50   0.616    -.2739404    .4623476
                                      6  |   .2452833    .193118     1.27   0.204    -.1332512    .6238178
                                      7  |   .2960358   .1888819     1.57   0.117    -.0741954    .6662671
                                      9  |   .1679514   .1878889     0.89   0.371    -.2003334    .5362363
                                     10  |   .4052408   .2202281     1.84   0.066    -.0264327    .8369143
                                         |
                                   _cons |   5.628291   1.372383     4.10   0.000     2.938256    8.318327
                  This is the result

                  Comment


                  • #10
                    Thoughts?

                    Code:
                     reg EarningsPersistenceGAAP_w GAAPEPS_w CG GFC COVID c.GAAPEPS##i.GFC c.GAAPEPS##i.COVID c.GAAPEPS##i.GFC##c.CG c.GAAPEPS##i.COVID##c.CG Num_LogTA_w NaturalLogarithmofFA_w Num_LR_w Num_SR_w INF_w INFGrowth_w UR_w URGrowth_w IR_w 
                    > IRGrowth_w GDP_w GDPGrowth_w i.FiscalYearCCM i.SIC_Industry 
                    note: 1.GFC omitted because of collinearity.
                    note: GAAPEPS omitted because of collinearity.
                    note: 1.COVID omitted because of collinearity.
                    note: GAAPEPS omitted because of collinearity.
                    note: CG omitted because of collinearity.
                    note: GAAPEPS omitted because of collinearity.
                    note: CG omitted because of collinearity.
                    note: 2009.FiscalYearCCM omitted because of collinearity.
                    note: 2021.FiscalYearCCM omitted because of collinearity.
                    
                          Source |       SS           df       MS      Number of obs   =    15,233
                    -------------+----------------------------------   F(39, 15193)    =    290.03
                           Model |  12554.4278        39  321.908405   Prob > F        =    0.0000
                        Residual |  16862.9051    15,193  1.10991279   R-squared       =    0.4268
                    -------------+----------------------------------   Adj R-squared   =    0.4253
                           Total |  29417.3328    15,232  1.93128498   Root MSE        =    1.0535
                    
                    ----------------------------------------------------------------------------------------
                    EarningsPersistenceG~w | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                    -----------------------+----------------------------------------------------------------
                                 GAAPEPS_w |   .6681901   .0116702    57.26   0.000     .6453151    .6910651
                                        CG |    .012462   .0063395     1.97   0.049     .0000358    .0248881
                                       GFC |  -.0087051   .1684049    -0.05   0.959     -.338799    .3213887
                                     COVID |   1.715321   .4143013     4.14   0.000     .9032407    2.527401
                                   GAAPEPS |   .0206978   .0168235     1.23   0.219    -.0122783    .0536738
                                     1.GFC |          0  (omitted)
                                           |
                             GFC#c.GAAPEPS |
                                        1  |  -.2866625   .0623326    -4.60   0.000    -.4088419   -.1644831
                                           |
                                   GAAPEPS |          0  (omitted)
                                   1.COVID |          0  (omitted)
                                           |
                           COVID#c.GAAPEPS |
                                        1  |  -.0519804   .0227925    -2.28   0.023    -.0966564   -.0073044
                                           |
                                   GAAPEPS |          0  (omitted)
                                        CG |          0  (omitted)
                                           |
                            c.GAAPEPS#c.CG |  -.0072304   .0018884    -3.83   0.000     -.010932   -.0035289
                                           |
                                  GFC#c.CG |
                                        1  |  -.0110013    .010655    -1.03   0.302    -.0318863    .0098837
                                           |
                        GFC#c.GAAPEPS#c.CG |
                                        1  |   .0168293   .0054928     3.06   0.002     .0060627    .0275959
                                           |
                                   GAAPEPS |          0  (omitted)
                                        CG |          0  (omitted)
                                           |
                                COVID#c.CG |
                                        1  |  -.0255031   .0116383    -2.19   0.028    -.0483156   -.0026907
                                           |
                      COVID#c.GAAPEPS#c.CG |
                                        1  |   .0072397   .0024525     2.95   0.003     .0024325    .0120469
                                           |
                               Num_LogTA_w |   .0350231   .0088228     3.97   0.000     .0177293    .0523169
                    NaturalLogarithmofFA_w |  -.0254782   .0132157    -1.93   0.054    -.0513826    .0004263
                                  Num_LR_w |  -.0245809   .0085321    -2.88   0.004    -.0413049    -.007857
                                  Num_SR_w |  -.0028228   .0028168    -1.00   0.316    -.0083439    .0026984
                                     INF_w |  -.0152702   .0086377    -1.77   0.077    -.0322012    .0016608
                               INFGrowth_w |   9.317135   4.603709     2.02   0.043     .2933119    18.34096
                                      UR_w |   .0304478   .0243885     1.25   0.212    -.0173567    .0782523
                                URGrowth_w |  -.0034263    .087293    -0.04   0.969     -.174531    .1676785
                                      IR_w |  -.1400874   .0397134    -3.53   0.000    -.2179304   -.0622444
                                IRGrowth_w |   .1033606   .0857643     1.21   0.228    -.0647476    .2714689
                                     GDP_w |  -.0001371    .000134    -1.02   0.306    -.0003998    .0001256
                               GDPGrowth_w |  -.2230232   1.650276    -0.14   0.893    -3.457763    3.011716
                                           |
                             FiscalYearCCM |
                                     2007  |     .10874   .0450905     2.41   0.016     .0203571    .1971229
                                     2008  |   .0594729   .0756395     0.79   0.432    -.0887896    .2077353
                                     2009  |          0  (omitted)
                                     2010  |   .0831276   .1234739     0.67   0.501     -.158896    .3251513
                                     2018  |   1.206829   .2899916     4.16   0.000     .6384109    1.775248
                                     2019  |   1.169862   .3201219     3.65   0.000     .5423845    1.797339
                                     2020  |  -.4886415     .06704    -7.29   0.000     -.620048    -.357235
                                     2021  |          0  (omitted)
                                     2022  |   1.851714   .4392351     4.22   0.000     .9907599    2.712667
                                           |
                              SIC_Industry |
                                        2  |   .0953184   .1897156     0.50   0.615    -.2765469    .4671836
                                        3  |    .002676   .2224802     0.01   0.990    -.4334119    .4387638
                                        4  |   .2374448   .1870519     1.27   0.204    -.1291994    .6040891
                                        5  |   .0942036   .1878171     0.50   0.616    -.2739404    .4623476
                                        6  |   .2452833    .193118     1.27   0.204    -.1332512    .6238178
                                        7  |   .2960358   .1888819     1.57   0.117    -.0741954    .6662671
                                        9  |   .1679514   .1878889     0.89   0.371    -.2003334    .5362363
                                       10  |   .4052408   .2202281     1.84   0.066    -.0264327    .8369143
                                           |
                                     _cons |   5.628291   1.372383     4.10   0.000     2.938256    8.318327
                    ----------------------------------------------------------------------------------------
                    
                    . 
                    . eststo gaap
                    
                    . 
                    . 
                    . 
                    . reg EarningsPersistenceNONGAAP_w NONGAAPEPS_w CG GFC COVID c.NONGAAPEPS##i.GFC c.NONGAAPEPS##i.COVID c.NONGAAPEPS##i.GFC##c.CG c.NONGAAPEPS##i.COVID##c.CG Num_LogTA_w NaturalLogarithmofFA_w Num_LR_w Num_SR_w INF_w INFGrowth_w UR_
                    > w URGrowth_w IR_w IRGrowth_w GDP_w GDPGrowth_w i.FiscalYearCCM i.SIC_Industry 
                    note: 1.GFC omitted because of collinearity.
                    note: NONGAAPEPS omitted because of collinearity.
                    note: 1.COVID omitted because of collinearity.
                    note: NONGAAPEPS omitted because of collinearity.
                    note: CG omitted because of collinearity.
                    note: NONGAAPEPS omitted because of collinearity.
                    note: CG omitted because of collinearity.
                    note: 2009.FiscalYearCCM omitted because of collinearity.
                    note: 2021.FiscalYearCCM omitted because of collinearity.
                    
                          Source |       SS           df       MS      Number of obs   =    15,233
                    -------------+----------------------------------   F(39, 15193)    =   1178.11
                           Model |  14859.2337        39  381.005992   Prob > F        =    0.0000
                        Residual |   4913.4759    15,193  .323403929   R-squared       =    0.7515
                    -------------+----------------------------------   Adj R-squared   =    0.7509
                           Total |  19772.7096    15,232  1.29810331   Root MSE        =    .56869
                    
                    -----------------------------------------------------------------------------------------
                    EarningsPersistenceNO~w | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                    ------------------------+----------------------------------------------------------------
                               NONGAAPEPS_w |   .8472085   .0086392    98.07   0.000     .8302746    .8641425
                                         CG |   .0006837   .0038382     0.18   0.859    -.0068396    .0082069
                                        GFC |  -.2457142   .1031594    -2.38   0.017    -.4479191   -.0435093
                                      COVID |    .487264   .2261626     2.15   0.031     .0439581    .9305698
                                 NONGAAPEPS |  -.0123792   .0273156    -0.45   0.650    -.0659211    .0411626
                                      1.GFC |          0  (omitted)
                                            |
                           GFC#c.NONGAAPEPS |
                                         1  |   .0223898   .1044742     0.21   0.830    -.1823923    .2271719
                                            |
                                 NONGAAPEPS |          0  (omitted)
                                    1.COVID |          0  (omitted)
                                            |
                         COVID#c.NONGAAPEPS |
                                         1  |   .0946466   .0364757     2.59   0.009     .0231499    .1661433
                                            |
                                 NONGAAPEPS |          0  (omitted)
                                         CG |          0  (omitted)
                                            |
                          c.NONGAAPEPS#c.CG |   .0024844   .0022024     1.13   0.259    -.0018326    .0068013
                                            |
                                   GFC#c.CG |
                                         1  |   .0144133   .0074731     1.93   0.054    -.0002349    .0290615
                                            |
                      GFC#c.NONGAAPEPS#c.CG |
                                         1  |  -.0153606   .0094511    -1.63   0.104    -.0338859    .0031646
                                            |
                                 NONGAAPEPS |          0  (omitted)
                                         CG |          0  (omitted)
                                            |
                                 COVID#c.CG |
                                         1  |   -.000416    .007002    -0.06   0.953    -.0141408    .0133089
                                            |
                    COVID#c.NONGAAPEPS#c.CG |
                                         1  |   -.008021   .0032677    -2.45   0.014    -.0144261    -.001616
                                            |
                                Num_LogTA_w |   .0149708   .0047909     3.12   0.002       .00558    .0243616
                     NaturalLogarithmofFA_w |  -.0150365   .0071365    -2.11   0.035    -.0290249   -.0010482
                                   Num_LR_w |  -.0142566   .0046107    -3.09   0.002    -.0232941   -.0052191
                                   Num_SR_w |  -.0041368   .0015216    -2.72   0.007    -.0071193   -.0011543
                                      INF_w |  -.0145796   .0046562    -3.13   0.002    -.0237064   -.0054528
                                INFGrowth_w |    2.24604   2.484762     0.90   0.366    -2.624392    7.116473
                                       UR_w |    .022627   .0131655     1.72   0.086     -.003179    .0484329
                                 URGrowth_w |   .0883267   .0470551     1.88   0.061    -.0039069    .1805604
                                       IR_w |  -.1579794   .0214373    -7.37   0.000     -.199999   -.1159598
                                 IRGrowth_w |   .1500247    .046294     3.24   0.001     .0592829    .2407664
                                      GDP_w |   .0000292   .0000723     0.40   0.686    -.0001125    .0001708
                                GDPGrowth_w |  -.1382972    .890442    -0.16   0.877    -1.883671    1.607076
                                            |
                              FiscalYearCCM |
                                      2007  |   .0641119   .0243402     2.63   0.008     .0164021    .1118216
                                      2008  |   .0795096   .0406607     1.96   0.051    -.0001902    .1592095
                                      2009  |          0  (omitted)
                                      2010  |   .0378046   .0665557     0.57   0.570    -.0926526    .1682618
                                      2018  |   .4377624   .1565436     2.80   0.005      .130918    .7446067
                                      2019  |   .4013247   .1728043     2.32   0.020     .0626075    .7400418
                                      2020  |  -.2959767   .0361518    -8.19   0.000    -.3668385   -.2251149
                                      2021  |          0  (omitted)
                                      2022  |   .8238776   .2370825     3.48   0.001     .3591674    1.288588
                                            |
                               SIC_Industry |
                                         2  |   .1295933   .1024288     1.27   0.206    -.0711794    .3303661
                                         3  |   .0710786   .1201032     0.59   0.554    -.1643382    .3064954
                                         4  |   .1696505   .1010076     1.68   0.093    -.0283365    .3676374
                                         5  |   .0885041   .1014071     0.87   0.383     -.110266    .2872742
                                         6  |   .1865642   .1042873     1.79   0.074    -.0178514    .3909798
                                         7  |   .1618546   .1019806     1.59   0.113    -.0380397    .3617488
                                         9  |   .1393964   .1014549     1.37   0.169    -.0594674    .3382601
                                        10  |   .2286225   .1189119     1.92   0.055     -.004459     .461704
                                            |
                                      _cons |   3.046185   .7411993     4.11   0.000     1.593345    4.499025
                    -----------------------------------------------------------------------------------------
                    
                    . 
                    . eststo nongaap
                    
                    . 
                    . 
                    . 
                    . estout
                    
                    --------------------------------------
                                         gaap      nongaap
                                            b            b
                    --------------------------------------
                    GAAPEPS_w        .6681901             
                    CG                .012462     .0006837
                    GFC             -.0087051    -.2457142
                    COVID            1.715321      .487264
                    GAAPEPS          .0206978             
                    0.GFC                   0            0
                    1.GFC                   0            0
                    0.GFC#c.GA~S            0             
                    1.GFC#c.GA~S    -.2866625             
                    GAAPEPS                 0             
                    0.COVID                 0            0
                    1.COVID                 0            0
                    0.COVID#c.~S            0             
                    1.COVID#c.~S    -.0519804             
                    GAAPEPS                 0             
                    CG                      0             
                    c.GAAPEPS#~G    -.0072304             
                    0.GFC#c.CG              0            0
                    1.GFC#c.CG      -.0110013     .0144133
                    0.GFC#c.GA~G            0             
                    1.GFC#c.GA~G     .0168293             
                    GAAPEPS                 0             
                    CG                      0             
                    0.COVID#c.CG            0            0
                    1.COVID#c.CG    -.0255031     -.000416
                    0.COVID#c.~G            0             
                    1.COVID#c.~G     .0072397             
                    CG                                   0
                    Num_LogTA_w      .0350231     .0149708
                    NaturalLog~w    -.0254782    -.0150365
                    Num_LR_w        -.0245809    -.0142566
                    Num_SR_w        -.0028228    -.0041368
                    INF_w           -.0152702    -.0145796
                    INFGrowth_w      9.317135      2.24604
                    UR_w             .0304478      .022627
                    URGrowth_w      -.0034263     .0883267
                    IR_w            -.1400874    -.1579794
                    IRGrowth_w       .1033606     .1500247
                    GDP_w           -.0001371     .0000292
                    GDPGrowth_w     -.2230232    -.1382972
                    2006.F~arCCM            0            0
                    2007.F~arCCM       .10874     .0641119
                    2008.F~arCCM     .0594729     .0795096
                    2009.F~arCCM            0            0
                    2010.F~arCCM     .0831276     .0378046
                    2018.F~arCCM     1.206829     .4377624
                    2019.F~arCCM     1.169862     .4013247
                    2020.F~arCCM    -.4886415    -.2959767
                    2021.F~arCCM            0            0
                    2022.F~arCCM     1.851714     .8238776
                    1.SIC_Indu~y            0            0
                    2.SIC_Indu~y     .0953184     .1295933
                    3.SIC_Indu~y      .002676     .0710786
                    4.SIC_Indu~y     .2374448     .1696505
                    5.SIC_Indu~y     .0942036     .0885041
                    6.SIC_Indu~y     .2452833     .1865642
                    7.SIC_Indu~y     .2960358     .1618546
                    9.SIC_Indu~y     .1679514     .1393964
                    10.SIC_Ind~y     .4052408     .2286225
                    NONGAAPEPS_w                  .8472085
                    NONGAAPEPS                   -.0123792
                    0.GFC#c.NO~S                         0
                    1.GFC#c.NO~S                  .0223898
                    NONGAAPEPS                           0
                    0.COVID#c.~S                         0
                    1.COVID#c.~S                  .0946466
                    NONGAAPEPS                           0
                    NONGAAPEPS                           0
                    c.NONGAAPE~G                  .0024844
                    0.GFC#c.NO~G                         0
                    1.GFC#c.NO~G                 -.0153606
                    CG                                   0
                    0.COVID#c.~G                         0
                    1.COVID#c.~G                  -.008021
                    _cons            5.628291     3.046185
                    --------------------------------------
                    
                    . 
                    . 
                    . 
                    . suest gaap nongaap, vce(robust)
                    
                    Simultaneous results for gaap, nongaap                  Number of obs = 15,233
                    
                    -----------------------------------------------------------------------------------------
                                            |               Robust
                                            | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
                    ------------------------+----------------------------------------------------------------
                    gaap_mean               |
                                  GAAPEPS_w |   .6681901   .0351235    19.02   0.000     .5993492     .737031
                                         CG |    .012462   .0087594     1.42   0.155    -.0047062    .0296302
                                        GFC |  -.0087051   .1819251    -0.05   0.962    -.3652718    .3478616
                                      COVID |   1.715321   .5058938     3.39   0.001     .7237874    2.706855
                                    GAAPEPS |   .0206978   .0708347     0.29   0.770    -.1181356    .1595311
                                      1.GFC |          0  (omitted)
                                            |
                              GFC#c.GAAPEPS |
                                         1  |  -.2866625   .1513822    -1.89   0.058    -.5833662    .0100412
                                            |
                                    GAAPEPS |          0  (omitted)
                                    1.COVID |          0  (omitted)
                                            |
                            COVID#c.GAAPEPS |
                                         1  |  -.0519804   .0995265    -0.52   0.601    -.2470488    .1430879
                                            |
                                    GAAPEPS |          0  (omitted)
                                         CG |          0  (omitted)
                                            |
                             c.GAAPEPS#c.CG |  -.0072304   .0074576    -0.97   0.332    -.0218471    .0073862
                                            |
                                   GFC#c.CG |
                                         1  |  -.0110013   .0113085    -0.97   0.331    -.0331656     .011163
                                            |
                         GFC#c.GAAPEPS#c.CG |
                                         1  |   .0168293   .0132493     1.27   0.204    -.0091388    .0427974
                                            |
                                    GAAPEPS |          0  (omitted)
                                         CG |          0  (omitted)
                                            |
                                 COVID#c.CG |
                                         1  |  -.0255031   .0160048    -1.59   0.111     -.056872    .0058658
                                            |
                       COVID#c.GAAPEPS#c.CG |
                                         1  |   .0072397    .009761     0.74   0.458    -.0118914    .0263709
                                            |
                                Num_LogTA_w |   .0350231   .0092024     3.81   0.000     .0169867    .0530595
                     NaturalLogarithmofFA_w |  -.0254782   .0139197    -1.83   0.067    -.0527604     .001804
                                   Num_LR_w |  -.0245809   .0076462    -3.21   0.001    -.0395672   -.0095947
                                   Num_SR_w |  -.0028228    .003259    -0.87   0.386    -.0092102    .0035647
                                      INF_w |  -.0152702   .0086821    -1.76   0.079    -.0322867    .0017463
                                INFGrowth_w |   9.317135   4.090583     2.28   0.023      1.29974    17.33453
                                       UR_w |   .0304478   .0210444     1.45   0.148    -.0107985    .0716941
                                 URGrowth_w |  -.0034263   .0816399    -0.04   0.967    -.1634376     .156585
                                       IR_w |  -.1400874   .0346359    -4.04   0.000    -.2079726   -.0722022
                                 IRGrowth_w |   .1033606   .0793562     1.30   0.193    -.0521746    .2588959
                                      GDP_w |  -.0001371   .0001126    -1.22   0.223    -.0003578    .0000836
                                GDPGrowth_w |  -.2230232   1.625973    -0.14   0.891    -3.409872    2.963826
                                            |
                              FiscalYearCCM |
                                      2007  |     .10874    .035793     3.04   0.002     .0385871    .1788929
                                      2008  |   .0594729    .074722     0.80   0.426    -.0869796    .2059254
                                      2009  |          0  (omitted)
                                      2010  |   .0831276   .1343013     0.62   0.536    -.1800981    .3463534
                                      2018  |   1.206829   .3430556     3.52   0.000     .5344525    1.879206
                                      2019  |   1.169862   .3756789     3.11   0.002     .4335447    1.906179
                                      2020  |  -.4886415   .0764388    -6.39   0.000    -.6384589   -.3388242
                                      2021  |          0  (omitted)
                                      2022  |   1.851714    .530377     3.49   0.000     .8121938    2.891233
                                            |
                               SIC_Industry |
                                         2  |   .0953184   .1706337     0.56   0.576    -.2391175    .4297542
                                         3  |    .002676    .184242     0.01   0.988    -.3584317    .3637836
                                         4  |   .2374448    .164188     1.45   0.148    -.0843577    .5592473
                                         5  |   .0942036   .1652241     0.57   0.569    -.2296298    .4180369
                                         6  |   .2452833   .1728972     1.42   0.156    -.0935889    .5841555
                                         7  |   .2960358   .1664092     1.78   0.075    -.0301202    .6221918
                                         9  |   .1679514    .164978     1.02   0.309    -.1553995    .4913024
                                        10  |   .4052408   .2009133     2.02   0.044     .0114579    .7990237
                                            |
                                      _cons |   5.628291    1.30525     4.31   0.000     3.070048    8.186534
                    ------------------------+----------------------------------------------------------------
                    gaap_lnvar              |
                                      _cons |   .1042814   .0330921     3.15   0.002     .0394221    .1691408
                    ------------------------+----------------------------------------------------------------
                    nongaap_mean            |
                               NONGAAPEPS_w |   .8472085   .0158079    53.59   0.000     .8162256    .8781915
                                         CG |   .0006837   .0034654     0.20   0.844    -.0061083    .0074757
                                        GFC |  -.2457142   .1005351    -2.44   0.015    -.4427594    -.048669
                                      COVID |    .487264   .2802374     1.74   0.082    -.0619911    1.036519
                                 NONGAAPEPS |  -.0123792   .0408702    -0.30   0.762    -.0924833    .0677248
                                      1.GFC |          0  (omitted)
                                            |
                           GFC#c.NONGAAPEPS |
                                         1  |   .0223898    .139456     0.16   0.872    -.2509388    .2957184
                                            |
                                 NONGAAPEPS |          0  (omitted)
                                    1.COVID |          0  (omitted)
                                            |
                         COVID#c.NONGAAPEPS |
                                         1  |   .0946466   .0605949     1.56   0.118    -.0241172    .2134104
                                            |
                                 NONGAAPEPS |          0  (omitted)
                                         CG |          0  (omitted)
                                            |
                          c.NONGAAPEPS#c.CG |   .0024844    .003295     0.75   0.451    -.0039736    .0089424
                                            |
                                   GFC#c.CG |
                                         1  |   .0144133   .0072461     1.99   0.047     .0002113    .0286153
                                            |
                      GFC#c.NONGAAPEPS#c.CG |
                                         1  |  -.0153606   .0133801    -1.15   0.251    -.0415851    .0108639
                                            |
                                 NONGAAPEPS |          0  (omitted)
                                         CG |          0  (omitted)
                                            |
                                 COVID#c.CG |
                                         1  |   -.000416   .0086625    -0.05   0.962    -.0173941    .0165621
                                            |
                    COVID#c.NONGAAPEPS#c.CG |
                                         1  |   -.008021   .0058528    -1.37   0.171    -.0194924    .0034503
                                            |
                                Num_LogTA_w |   .0149708    .004744     3.16   0.002     .0056727    .0242689
                     NaturalLogarithmofFA_w |  -.0150365   .0071397    -2.11   0.035    -.0290302   -.0010429
                                   Num_LR_w |  -.0142566   .0039344    -3.62   0.000    -.0219678   -.0065454
                                   Num_SR_w |  -.0041368   .0019611    -2.11   0.035    -.0079805   -.0002931
                                      INF_w |  -.0145796   .0047466    -3.07   0.002    -.0238828   -.0052764
                                INFGrowth_w |    2.24604   2.358728     0.95   0.341    -2.376982    6.869063
                                       UR_w |    .022627   .0119804     1.89   0.059    -.0008542    .0461082
                                 URGrowth_w |   .0883267   .0455381     1.94   0.052    -.0009263    .1775797
                                       IR_w |  -.1579794   .0199646    -7.91   0.000    -.1971093   -.1188494
                                 IRGrowth_w |   .1500247   .0445229     3.37   0.001     .0627614     .237288
                                      GDP_w |   .0000292   .0000616     0.47   0.635    -.0000915    .0001498
                                GDPGrowth_w |  -.1382972   .8950393    -0.15   0.877    -1.892542    1.615948
                                            |
                              FiscalYearCCM |
                                      2007  |   .0641119   .0195303     3.28   0.001     .0258331    .1023906
                                      2008  |   .0795096   .0396725     2.00   0.045     .0017531    .1572662
                                      2009  |          0  (omitted)
                                      2010  |   .0378046   .0746341     0.51   0.612    -.1084755    .1840847
                                      2018  |   .4377624   .1914529     2.29   0.022     .0625216    .8130032
                                      2019  |   .4013247   .2119479     1.89   0.058    -.0140857     .816735
                                      2020  |  -.2959767    .044296    -6.68   0.000    -.3827954   -.2091581
                                      2021  |          0  (omitted)
                                      2022  |   .8238776   .2983486     2.76   0.006     .2391251     1.40863
                                            |
                               SIC_Industry |
                                         2  |   .1295933   .1699649     0.76   0.446    -.2035318    .4627184
                                         3  |   .0710786   .1757142     0.40   0.686    -.2733149     .415472
                                         4  |   .1696505   .1691783     1.00   0.316     -.161933    .5012339
                                         5  |   .0885041   .1696316     0.52   0.602    -.2439678     .420976
                                         6  |   .1865642   .1705636     1.09   0.274    -.1477343    .5208626
                                         7  |   .1618546   .1701995     0.95   0.342    -.1717304    .4954395
                                         9  |   .1393964   .1695515     0.82   0.411    -.1929184    .4717111
                                        10  |   .2286225   .1716021     1.33   0.183    -.1077115    .5649565
                                            |
                                      _cons |   3.046185   .7501229     4.06   0.000     1.575971    4.516399
                    ------------------------+----------------------------------------------------------------
                    nongaap_lnvar           |
                                      _cons |  -1.128853   .0418945   -26.95   0.000    -1.210965   -1.046742
                    -----------------------------------------------------------------------------------------
                    
                    . 
                    . test [gaap_mean]GAAPEPS_w=[nongaap_mean]NONGAAPEPS_w
                    
                     ( 1)  [gaap_mean]GAAPEPS_w - [nongaap_mean]NONGAAPEPS_w = 0
                    
                               chi2(  1) =   27.00
                             Prob > chi2 =    0.0000
                    
                    . 
                    . test [gaap_mean]GFC=[nongaap_mean]GFC
                    
                     ( 1)  [gaap_mean]GFC - [nongaap_mean]GFC = 0
                    
                               chi2(  1) =    1.92
                             Prob > chi2 =    0.1661
                    
                    . 
                    . test [gaap_mean]COVID=[nongaap_mean]COVID
                    
                     ( 1)  [gaap_mean]COVID - [nongaap_mean]COVID = 0
                    
                               chi2(  1) =    8.47
                             Prob > chi2 =    0.0036
                    
                    . 
                    . test [gaap_mean]c.GAAPEPS##i.GFC=[nongaap_mean]c.NONGAAPEPS##i.GFC
                    invalid matrix stripe;
                    c.GAAPEPS##i.GFC
                    r(198);
                    
                    . 
                    . test [gaap_mean]c.GAAPEPS##i.COVID=[nongaap_mean]c.NONGAAPEPS##i.COVID
                    invalid matrix stripe;
                    c.GAAPEPS##i.COVID
                    r(198);
                    
                    . 
                    . test [gaap_mean]c.GAAPEPS##i.GFC##c.CG=[nongaap_mean]c.NONGAAPEPS##i.GFC##c.CG
                    invalid matrix stripe;
                    c.GAAPEPS##i.GFC##c.CG
                    r(198);
                    
                    . 
                    . test [gaap_mean]c.GAAPEPS##i.COVID##c.CG=[nongaap_mean]c.NONGAAPEPS##i.COVID##c.CG
                    invalid matrix stripe;
                    c.GAAPEPS##i.COVID##c.CG
                    r(198);

                    Comment


                    • #11
                      Will i.year and i.industry capture the fixed effects in the correct way?
                      Yes.

                      Concerning the "invalid matrix stripe" errors, they arise because you cannot use i.whatever in this context. Each of the things that appear in a [gap_mean]something context must be the actual name of a coefficient calculated by -suest-, not the name of a term in the underlying regression command(s). Getting these names right can be tricky, as different commands make them up differently, and even the same command can do it differently in different Stata versions. So, rerun your -suest- command, but this time at the -coeflegend- command. The output will give you the same coefficients you got before, but instead of the associated inferential statistics, you will get the exact names of the coefficients. Use those in your -test- commands to avoid these error messages.

                      Comment


                      • #12
                        Thanks Clyde, I truly appreciate the help. Have a good day!

                        Comment

                        Working...
                        X