Announcement

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

  • Difference and Difference for the Pre and Post period Analysis

    Greetings Everyone!

    Hopefully, you all will be fine, Dear all, I have a submitted paper "Board of Directors impact on earnings manipulation after the revised regulation 2017" in which I have received the major revision, in which the reviewer asked me to do the DID on the pre and post period, moreover, the pre-period is consists of 2015, 2016 while the post-period consist of 2018 and 2019. Actually, I did this on sample regression by using the if function, in this regard I want suggestions and recommendations from your side.

    Kind Regards
    Sattar Khan.

  • #2
    Sattar:
    in the DID framework you usually need two groups (say treated and untreated) and two periods (pre post something).
    You seem to have the latter only.
    I would create a categorical pre-post predictor and, according to the number of data waves would try -xtreg- or -regress- with clustered standard errors on panelid.
    As an aside, I would avoid mentioining the exact title of a paper that is currently under asessment...it's a small world, full of snitches !
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Sattar:
      in the DID framework you usually need two groups (say treated and untreated) and two periods (pre post something).
      You seem to have the latter only.
      I would create a categorical pre-post predictor and, according to the number of data waves would try -xtreg- or -regress- with clustered standard errors on panelid.
      As an aside, I would avoid mentioining the exact title of a paper that is currently under asessment...it's a small world, full of snitches !
      Thanks Carlo, for your comment, the reviewer suggests DID in order to settle the issue of endogeneity, while as you mentioned I have interaction term of categorical pre and post-term dummy with the board of directors variables which give the same results as running with fe or re regression

      Comment


      • #4
        Originally posted by Carlo Lazzaro View Post
        Sattar:
        in the DID framework you usually need two groups (say treated and untreated) and two periods (pre post something).
        You seem to have the latter only.
        I would create a categorical pre-post predictor and, according to the number of data waves would try -xtreg- or -regress- with clustered standard errors on panelid.
        As an aside, I would avoid mentioining the exact title of a paper that is currently under asessment...it's a small world, full of snitches !
        Kindly Carlo, elaborate this point, if possible for you

        Comment


        • #5
          Sattar:
          could you please share the code you typed along with an example/excerpt of your data via -dataex-? Thanks.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            If the reviewer suggests DD
            in order to settle the issue of endogeneity
            then they're likely a fool who's in the wrong business. There's no causal design in the world that can truly get around reverse causality- if the outcome is actually causing the intervention, then there's nothing we can do for this (usually).

            We can try and adjust or maybe even account for spillover effects, but just saying "Run DD to adjust for x form of endogenous reverse causality" doesn't make sense

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Sattar:
              could you please share the code you typed along with an example/excerpt of your data via -dataex-? Thanks.
              [CODE]
              Code:
              * Example generated by -dataex-. To install: ssc install dataex
              clear
              input str7 companies int year str50 firmname float(MCDA BIND BEXP BDIV FD ACIND ACEXP) byte(acsize acmeet acchairmanindep firmauditedbybig4 lossdummy) float(ROA leverage FSize SALES INV LBOARDMEET lagged_TA) int(DID_year DID_year_2)
              "ANTM"  2014 "AN Textile Mills Limited"                              .  .0909091         .  .2857143       .25        0        . 3 4 0 0 0   1.459615  .6678604  7.668056 1.9402503   .23540387  1.609438       . . .
              "ANTM"  2015 "AN Textile Mills Limited"                     -.32711095  .2857143         .  .2857143  .4285714 .3333333        . 3 4 1 0 1  -7.754289  .6067408  7.261759  .9536975   .17442235  1.609438 2138.92 0 1
              "ANTM"  2016 "AN Textile Mills Limited"                              .  .2857143         .  .2857143  .4285714 .3333333        . 3 4 1 0 1          .         .         .         .           .  1.609438 1424.76 0 1
              "ANTM"  2017 "AN Textile Mills Limited"                              . .14285715         .  .2857143  .5714286 .3333333        . 3 4 1 0 1   -8.80937  .4181014  7.164674  .8530405    .1130911 1.3862944       . . .
              "ANTM"  2018 "AN Textile Mills Limited"                      .11862646  .2857143         .  .2857143  .5714286       .5        . 3 5 1 0 1  .25011736 .45187625  7.217708  1.172449   .13910486  1.609438 1292.94 1 0
              "ANTM"  2019 "AN Textile Mills Limited"                      .05317419  .2857143         .  .2857143  .5714286       .5        . 3 5 1 0 0   3.831065  .5182462   7.38139 1.1740482   .26356006 1.3862944 1363.36 1 0
              "ABOT"  2014 "Abbot Laboatories (Pakistan) Limited"                  .  .2857143  .5714286         0         0 .3333333 .3333333 3 4 1 1 0   19.89492 .21250607  9.529928 1.4305482   .20507716  1.609438 1605.82 . .
              "ABOT"  2015 "Abbot Laboatories (Pakistan) Limited"         -.06783225  .2857143  .5714286 .14285715         0 .3333333 .6666667 3 4 1 1 0   19.89492 .21463886  9.710406 1.2839677    .1764093 1.3862944 13765.6 0 1
              "ABOT"  2016 "Abbot Laboatories (Pakistan) Limited"         .015079706  .2857143  .5714286 .14285715         0 .3333333 .6666667 3 4 1 1 0   19.89492 .21250607  9.778219  1.325455    .2026574 1.3862944 16488.3 0 1
              "ABOT"  2017 "Abbot Laboatories (Pakistan) Limited"         -.11914735  .2857143  .5714286 .14285715         0 .3333333 .6666667 3 4 1 1 0   19.89492 .25370887  9.864554  1.356198   .18068703 1.3862944 17645.2 . .
              "ABOT"  2018 "Abbot Laboatories (Pakistan) Limited"          .07854157  .2857143  .5714286 .14285715         0 .3333333 .6666667 3 4 1 1 0   19.89492  .3474259  9.917455 1.4653537   .21837308 1.3862944 19236.3 1 0
              "ABOT"  2019 "Abbot Laboatories (Pakistan) Limited"          .08703142  .2857143  .5714286 .14285715         0 .3333333 .6666667 3 4 1 1 0  12.098378  .3556304  9.940432  1.453106    .2914903 1.3862944 20281.3 1 0
              "AGSML" 2014 "Abdullah Shah Ghazi Sugar Mills Limited"               . .14285715         .         0         0        0        . 3 4 0 0 0   3.164827  .7846099  8.184522 .29491803    .3427999 1.3862944 20752.7 . .
              "AGSML" 2015 "Abdullah Shah Ghazi Sugar Mills Limited"      -.16144256 .14285715         .         0         0        0        . 3 4 0 0 0   -8.80937   .910777   8.06464 .55468065   .11064965 1.3862944 3585.03 0 1
              "AGSML" 2016 "Abdullah Shah Ghazi Sugar Mills Limited"       .12092385 .14285715         .         0         0        0        . 3 4 0 0 1   -8.80937  .9236114  8.022999 .14115286   .08088817 1.3862944 3180.01 0 1
              "AGSML" 2017 "Abdullah Shah Ghazi Sugar Mills Limited"     -.012996014  .2857143         .         0         0        0        . 3 4 0 0 0  -6.127638  .9236114  7.958175  .1044336   .04019623 1.3862944 3050.31 . .
              "AGSML" 2018 "Abdullah Shah Ghazi Sugar Mills Limited"     .0017264105  .2857143         .         0         0        0        . 3 4 0 0 1   -8.80937  .9236114  7.938602 .04234798  .006549454 1.3862944 2858.85 1 0
              "AGSML" 2019 "Abdullah Shah Ghazi Sugar Mills Limited"      .000843501  .2857143         .         0         0 .3333333        . 3 4 1 0 1  -6.362999  .8580823  8.310107 .03766776  .004973984 1.3862944 2803.44 1 0
              "ADAMS" 2014 "Adam Sugar Mills Limited"                              .  .3333333  .2857143         0  .5714286 .3333333 .3333333 3 4 0 0 0 -1.7192656  .6652378   8.14824  .9181787  .036992267  1.609438 4064.75 . .
              "ADAMS" 2015 "Adam Sugar Mills Limited"                     -.17751274 .14285715         .         0         0        0        . 3 4 0 0 1 -3.2373226 .57061285  7.844554  .9608864     .231968 1.3862944 3457.29 0 1
              "ADAMS" 2016 "Adam Sugar Mills Limited"                      .04741716 .14285715         .         0         0        0        . 3 4 0 0 0   7.366319  .4672839  7.735307  1.425548    .3586818 1.3862944  2551.8 0 1
              "ADAMS" 2017 "Adam Sugar Mills Limited"                      .28868935  .2857143         .         0         0        0        . 3 4 0 0 1 -.14124398  .7162448 8.3098955  .4552215    .4505164 1.3862944 2287.71 . .
              "ADAMS" 2018 "Adam Sugar Mills Limited"                     -.10712651  .2857143         .         0         0        0        . 3 4 0 0 1 -.07025166  .6959535  8.216352  1.016701    .3363825 1.3862944 4063.89 1 0
              "ADAMS" 2019 "Adam Sugar Mills Limited"                     -.06150299  .2857143         .         0         0 .3333333        . 3 4 1 0 1  -4.469071    .47768  8.778835  .3563525  .014300626 1.3862944 3700.98 1 0
              "ADOS"  2014 "Ados Pakistan Limited"                                 .  .0909091         .  .2857143  .5714286        0        . 3 4 0 0 0   3.908297  .6691024  6.680208  .9092187   .02276377   1.94591 6495.31 . .
              "ADOS"  2015 "Ados Pakistan Limited"                         .07322597 .11111111         .  .2857143  .5555556      .25        . 4 5 0 0 0   1.857098  .5940771  6.490783  .8804593   .10065565   1.94591 796.485 0 1
              "ADOS"  2016 "Ados Pakistan Limited"                        -.13504007 .11111111         .  .2857143  .5555556 .3333333        . 3 5 1 0 0  1.9604052 .49459785  6.373218 1.2900265   .14029609 1.7917595 659.039 0 1
              "ADOS"  2017 "Ados Pakistan Limited"                        .009254986 .11111111         .  .2857143  .5555556 .3333333        . 3 5 1 0 0  -3.821005  .5233763  6.373218  .9796477   .13367556 1.7917595 475.922 . .
              "ADOS"  2018 "Ados Pakistan Limited"                        -.13169782 .11111111         .  .2857143  .5555556 .3333333        . 3 5 1 0 1   -8.80937  .6072503  6.373218  .3695392   .08192624   1.94591 436.168 1 0
              "ADOS"  2019 "Ados Pakistan Limited"                       -.026544956 .11111111         .  .2857143  .5555556 .3333333        . 3 5 1 0 1   -8.80937  .8332708  6.373218 .13594665      .26894 1.7917595 292.153 1 0
              "AGIL"  2014 "Agriauto Industries Limited"                           .  .0909091  .2857143         0         0      .25      .25 4 4 0 1 0  13.014237 .21250607  8.039464 1.0186557   .14269401  1.609438 280.029 . .
              "AGIL"  2015 "Agriauto Industries Limited"                   .14108323 .14285715  .4285714         0         0      .25      .25 4 4 0 1 0   19.89492 .21250607  8.173347   1.38872   .19733696  1.609438 3100.95 0 1
              "AGIL"  2016 "Agriauto Industries Limited"                  -.03071707 .14285715  .4285714         0         0      .25      .25 4 4 0 1 0  18.970385 .21250607  8.232238 1.5313863    .2106682 1.7917595 3545.19 0 1
              "AGIL"  2017 "Agriauto Industries Limited"                 -.026184795 .14285715  .4285714         0         0      .25      .25 4 4 0 1 0  19.466335 .21250607  8.333967 1.3590385   .17915925 1.3862944 3760.24 . .
              "AGIL"  2018 "Agriauto Industries Limited"                   .02798484 .14285715  .4285714         0         0      .25      .25 4 4 1 1 0  17.775503 .21250607  8.377935 1.4052763    .2216638 1.7917595  4162.9 1 0
              "AGIL"  2019 "Agriauto Industries Limited"                   .09707586  .2857143  .5714286 .14285715 .14285715 .3333333 .3333333 3 4 1 1 0  17.249828 .21250607  8.448696  1.525491   .23241907  1.609438 4350.02 1 0
              "AGL"   2014 "Agritech Limited"                                      .  .0909091 .14285715         0         0        0        0 4 4 0 1 1   -8.80937  .8003521 10.759789 .05629053  .007024201   1.94591 4668.98 . .
              "AGL"   2015 "Agritech Limited"                           -.0033643376      .125 .14285715         0         0      .25        0 4 4 1 1 1  -7.516587  .8591401 10.759789 .07232067  .012880643 2.0794415 49646.5 0 1
              "AGL"   2016 "Agritech Limited"                             .015841024      .125         .      .125         0 .3333333        . 3 4 1 1 1 -3.6039126  .9080115 10.759789 .17197895  .007039992 2.0794415 48984.2 0 1
              "AGL"   2017 "Agritech Limited"                            -.015304741  .2857143         .         .         0        .        . . . . 1 1  -8.231997  .9236114 10.759789  .0754219  .008200672         . 47904.6 . .
              "AGL"   2018 "Agritech Limited"                            .0004370282  .2857143         . .14285715         0      .25        . 4 4 1 1 1  -7.876342  .9236114 10.740938 .09810376  .006347648 2.1972246 47088.7 1 0
              "AGL"   2019 "Agritech Limited"                             .019122604  .2857143  .4285714 .14285715         0      .25      .25 4 5 1 0 1  -1.404496  .8447106 10.759789 .17609403   .01139155 2.0794415 46209.4 1 0
              "AHTM"  2014 "Ahmed Hassan Textile Mills Limited"                    .  .0909091  .2857143 .14285715         0        0 .3333333 3 4 0 0 0  2.2452927  .4854042  8.198164 1.0943904   .16135456 1.3862944 69135.9 . .
              "AHTM"  2015 "Ahmed Hassan Textile Mills Limited"           -.08018514  .0909091  .2857143 .14285715         0        0 .3333333 3 4 0 0 1  -1.921782  .4668746  8.207247  .8858684   .14750275 1.3862944 3634.27 0 1
              "AHTM"  2016 "Ahmed Hassan Textile Mills Limited"            .03743488  .0909091  .2857143 .14285715         0        0 .3333333 3 5 0 0 1  .23675595 .47850555  8.209219  .9403702    .1766994  1.609438 3667.43 0 1
              "AHTM"  2017 "Ahmed Hassan Textile Mills Limited"            .03782817  .0909091  .2857143 .14285715         0        0 .3333333 3 5 0 0 1   .2322288  .5353287   8.32279  .9852404   .21727967  1.609438 3674.67 . .
              "AHTM"  2018 "Ahmed Hassan Textile Mills Limited"          -.016577916      .125       .25      .125         0 .3333333 .3333333 3 5 0 0 0  1.5040905 .55433726  8.369829 1.2002596    .2015734  1.609438 4116.63 1 0
              "AHTM"  2019 "Ahmed Hassan Textile Mills Limited"            .07755193      .125       .25      .125         0 .3333333 .3333333 3 5 0 0 0   2.717768 .59114134  8.467881 1.5283355  .023291914  1.609438  4314.9 1 0
              "ASL"   2014 "Aisha Steel Mills Limited"                             .  .0909091  .5714286         0      .375        0 .6666667 3 4 0 1 1  -2.511726  .8443624  9.697705 .56872934   .20560497 1.3862944 4759.42 . .
              "ASL"   2015 "Aisha Steel Mills Limited"                     .05931627 .22222222 .44444445         0 .22222222      .25      .75 4 4 0 1 1   -8.80937  .8167302  9.638017  .6188831     .158667 1.3862944 16280.2 0 1
              "ASL"   2016 "Aisha Steel Mills Limited"                    -.05994911 .22222222 .44444445         0 .22222222      .25      .75 4 4 0 1 1  -1.249461  .8270376  9.639021  .6275474  .005015405  1.609438 15336.9 0 1
              "ASL"   2017 "Aisha Steel Mills Limited"                   -.011415967  .3333333 .44444445         0 .22222222      .25      .75 4 4 0 1 0   4.851413  .6315141  9.808291  .7740845    .2043544  1.609438 15352.3 . .
              "ASL"   2018 "Aisha Steel Mills Limited"                     .10150144  .3333333  .5555556 .11111111 .22222222       .5      .75 4 4 1 1 0   9.378237  .5842944  9.924554  .9254916   .21111827 1.7917595 18183.9 1 0
              "ASL"   2019 "Aisha Steel Mills Limited"                     .12644023  .3333333  .5555556 .11111111 .22222222       .5      .75 4 4 1 1 0   -1.26006  .7327657 10.396075  .6180947    .2114204 1.7917595 20425.8 1 0
              "AKZO"  2014 "Akzo Nobel Pakistan Limited"                           .  .2857143  .5714286         0         0      .25       .5 4 5 0 1 0  17.075975  .3470866  8.287368 1.2336637   .09050275  1.609438 32730.9 . .
              "AKZO"  2015 "Akzo Nobel Pakistan Limited"                           . .14285715  .4285714         0         0      .25      .25 4 5 0 1 0          .         .         .         .           .  1.609438 3973.36 0 1
              "AKZO"  2016 "Akzo Nobel Pakistan Limited"                           .  .2857143  .5714286         0         0      .25      .25 4 5 0 1 0  14.846066  .3408561 8.6568165   .989802    .0814896 1.7917595       0 0 1
              "AKZO"  2017 "Akzo Nobel Pakistan Limited"                  .036925886  .2857143  .5714286         0         0      .25        0 4 4 0 1 0  10.669405  .3241286  8.650183 1.0177809   .10278068 1.3862944  5749.2 . .
              "AKZO"  2018 "Akzo Nobel Pakistan Limited"                           .  .2857143  .5714286 .14285715         0      .25       .5 4 4 1 1 0   9.325613 .21644107 9.0378475   .666799   .07948297  1.609438 5711.19 1 0
              "AKZO"  2019 "Akzo Nobel Pakistan Limited"                           .  .2857143  .5714286 .14285715         0      .25       .5 4 4 1 1 0          .         .         .         .           .  1.609438 8415.64 1 0
              "AABS"  2014 "Al-Abbas Sugar Mills Limited"                          . .11111111 .22222222 .22222222         0 .3333333        0 3 4 1 0 0   8.826463 .49371645  8.388728  1.255507    .3265541  1.609438       . . .
              "AABS"  2015 "Al-Abbas Sugar Mills Limited"                  -.1166878 .11111111         . .22222222 .11111111 .3333333        0 3 4 1 0 0  15.698702  .3681829  8.168033  1.663821    .2406945 1.7917595 4397.22 0 1
              "AABS"  2016 "Al-Abbas Sugar Mills Limited"                -.026581226 .11111111         . .22222222         0 .3333333        0 3 4 1 0 0   15.83402 .29515263  8.105588   1.74886     .213447 1.7917595  3526.4 0 1
              "AABS"  2017 "Al-Abbas Sugar Mills Limited"                  .46790385      .125         .       .25         0      .25        0 4 4 1 0 0  4.0019803  .5149329  8.550848 1.0302206    .3795449 1.7917595 3312.93 . .
              "AABS"  2018 "Al-Abbas Sugar Mills Limited"                 -.28837895      .125         .       .25         0      .25        0 4 4 1 0 0   19.89492  .3589711  8.631696 1.3366575    .3397954 1.3862944 5171.14 1 0
              "AABS"  2019 "Al-Abbas Sugar Mills Limited"                 -.04649674  .3333333         . .22222222         0       .5        0 4 4 1 0 0   18.73228  .4967346  8.766024 1.1173065    .2100062  1.609438 5606.58 1 0
              "AASM"  2014 "Al-Abid Silk Mills Limited"                            .       .25 .14285715      .125      .375       .5        0 3 4 1 0 1   -8.80937  .9236114  8.559438 .09379092  .005942961 1.3862944 6412.62 . .
              "AASM"  2015 "Al-Abid Silk Mills Limited"                  -.016287243       .25 .14285715      .125      .375       .5        0 3 4 1 0 1   -8.80937  .9236114  8.462826 .05208197 .0038412644 1.3862944 5215.75 0 1
              "AASM"  2016 "Al-Abid Silk Mills Limited"                  -.007815252       .25 .14285715      .125      .375       .5        0 3 4 1 0 1   -8.80937  .9236114  8.377414         0 .0038481976 1.7917595 4735.42 0 1
              "AASM"  2017 "Al-Abid Silk Mills Limited"                  .0006930385       .25 .14285715      .125      .375       .5        0 3 4 1 0 1  -8.137987  .9236114  8.293559         0 .0036397835 2.6390574 4347.75 . .
              "AASM"  2018 "Al-Abid Silk Mills Limited"                   -.03581823       .25 .14285715      .125      .375       .5        0 3 4 1 0 1 -1.3095858  .9236114  7.815776         0  .005135496 2.3025851 3998.04 1 0
              "AASM"  2019 "Al-Abid Silk Mills Limited"                    .07675657       .25 .14285715      .125      .375       .5        0 3 4 1 0 1   -5.59072  .9236114  7.717165         0   .00485805 2.6390574 2479.41 1 0
              "AGTL"  2014 "Al-Ghazi Tractors Limited"                             .      .125      .375      .125         0 .3333333 .6666667 3 4 1 1 0   19.89492 .21250607 9.2092085  .8790627    .2162796  1.609438 2246.58 . .
              "AGTL"  2015 "Al-Ghazi Tractors Limited"                    .025461184      .125      .375         0         0 .3333333 .6666667 3 4 1 1 0   19.89492 .21250607  8.764783 1.5045443    .3302325 1.3862944 9988.69 0 1
              "AGTL"  2016 "Al-Ghazi Tractors Limited"                    -.25874373      .125       .25         0         0 .3333333 .3333333 3 4 1 1 0   19.89492 .27664977    8.4434  2.605081    .3033577 1.3862944 6404.67 0 1
              "AGTL"  2017 "Al-Ghazi Tractors Limited"                   -.008199766      .125        .5         0         0 .3333333 .6666667 3 4 1 1 0   19.89492  .6385494  8.679538  3.208704     .388339  1.609438 4644.32 . .
              "AGTL"  2018 "Al-Ghazi Tractors Limited"                      .5053018      .125       .25      .125         0 .3333333 .3333333 3 4 1 1 0   19.89492  .7981861  8.822537  2.855005   .51240885  1.609438 5881.33 1 0
              "AGTL"  2019 "Al-Ghazi Tractors Limited"                     -.4141749      .125       .25      .125         0 .3333333 .3333333 3 4 1 1 0   19.89492  .8349503  8.608017   2.55551   .50337327  1.609438 6785.46 1 0
              "ALNRS" 2014 "Al-Noor Sugar Mills Limited"                           .        .1 .14285715         0        .4        0        0 3 4 0 1 0   1.160986  .6246384  8.789524 1.1727283   .27339986 1.7917595 5475.38 . .
              "ALNRS" 2015 "Al-Noor Sugar Mills Limited"                 -.006044766        .1 .14285715         0        .4      .25        0 4 4 0 0 0   3.092305  .6332455  8.874778  .9743907    .3491166 1.3862944 6565.11 0 1
              "ALNRS" 2016 "Al-Noor Sugar Mills Limited"                 -.002133531        .1 .14285715         0        .4      .25        0 4 4 0 0 0  3.2294085   .609208   8.85407 1.1571237   .28106636 1.3862944 7149.36 0 1
              "ALNRS" 2017 "Al-Noor Sugar Mills Limited"                 -.016909465        .1 .14285715         0        .4      .25        0 4 4 0 0 1  -1.332969  .7230148  9.160687  .7246742   .04128169 1.3862944 7002.83 . .
              "ALNRS" 2018 "Al-Noor Sugar Mills Limited"                   .03964373        .1 .14285715         0        .4      .25        0 4 4 0 0 1  -2.577426    .68208   9.15288  .9617966  .023507694 1.3862944  9515.6 1 0
              "ALNRS" 2019 "Al-Noor Sugar Mills Limited"                  .005252177        .1 .14285715        .1        .4      .25        0 4 4 1 0 0   4.937258   .661628  9.132781 1.0093272   .02326632 1.3862944 9441.59 1 0
              "ASC"   2014 "Al-Shaheer Corporation Limited"                        .         .         .         .         .        .        . . . . 1 .   4.791622  .5250776  7.512246 2.4248815   .02229173         . 9253.72 . .
              "ASC"   2015 "Al-Shaheer Corporation Limited"                 .0445247  .2857143  .4285714 .14285715 .14285715 .3333333 .6666667 3 5 0 1 0   3.826842  .3260834  8.383708 1.1393198  .007126302  1.609438 1830.32 0 1
              "ASC"   2016 "Al-Shaheer Corporation Limited"                .16251858  .3333333      .375      .125      .125       .5 .6666667 3 5 1 1 0   6.872365 .23133583  8.512298 1.3858846  .033695567  1.609438  4375.2 0 1
              "ASC"   2017 "Al-Shaheer Corporation Limited"               -.11432333  .3333333        .3        .1        .2       .5 .6666667 3 4 1 1 1  -.1420071  .3481553   8.66932 1.0987886  .020032156 1.7917595 4975.58 . .
              "ASC"   2018 "Al-Shaheer Corporation Limited"              -.032593377  .3333333        .3        .1        .2       .5 .6666667 3 4 1 1 1  -.2942775  .3985448  8.901327   .731866  .014704885 1.7917595 5821.54 1 0
              "ASC"   2019 "Al-Shaheer Corporation Limited"               -.05016986  .3333333  .3333333 .11111111 .22222222       .5 .6666667 3 4 1 1 0  3.0737975  .3928256  8.932312  .5531244  .011152224 1.3862944 7341.71 1 0
              "AWTX"  2014 "Allawasaya Textile & Weaving Mills Limited"            .  .0909091  .5714286      .125      .375        0 .6666667 3 4 0 1 0   3.493249  .2982024  7.010952  1.954686   .12666522  1.609438 7572.75 . .
              "AWTX"  2015 "Allawasaya Textile & Weaving Mills Limited"   .008984846 .11111111 .44444445 .11111111  .3333333 .3333333 .3333333 3 4 0 0 1  -4.987038  .3384683  7.036983  1.545903   .15781097  1.609438 1108.71 0 1
              "AWTX"  2016 "Allawasaya Textile & Weaving Mills Limited"    .04784651 .11111111 .44444445 .11111111  .3333333 .3333333 .3333333 3 4 0 0 1  -2.645522 .37328205  7.206051 1.2416145    .1874796 1.3862944 1137.95 0 1
              "AWTX"  2017 "Allawasaya Textile & Weaving Mills Limited"   -.06549711 .11111111 .44444445 .11111111  .3333333 .3333333 .3333333 3 4 0 0 1  -2.538368  .3618834  7.143128 1.5537072    .1272511 1.3862944 1347.56 . .
              "AWTX"  2018 "Allawasaya Textile & Weaving Mills Limited"    .07234246 .27272728  .3636364  .0909091 .27272728 .3333333 .3333333 3 4 1 0 1   2.648612  .3908854  7.214931 1.5949484   .19309053  1.609438 1265.38 1 0
              "AWTX"  2019 "Allawasaya Textile & Weaving Mills Limited"  -.021483924 .27272728  .3636364  .0909091 .27272728 .3333333 .3333333 3 4 1 0 1  -.4464564  .4778426  7.642673 1.0025128    .1401077  1.609438 1359.58 1 0
              "ALTN"  2014 "Altern Energy Limited"                                 . .11111111  .3333333         0         0        0 .3333333 3 4 0 1 0   19.89492 .26621428   8.65854  .3050725           0 2.0794415 2085.31 . .
              "ALTN"  2015 "Altern Energy Limited"                       -.035610124      .125      .375         0         0        0 .3333333 3 4 0 1 0  2.2178755 .21250607  8.571435 .27192378           0  1.609438 5759.12 0 1
              "ALTN"  2016 "Altern Energy Limited"                        .028261794      .125      .375         0         0 .3333333 .3333333 3 4 0 1 0  18.719685  .2179374  8.674351 .27447677           0  1.609438  5278.7 0 1
              "ALTN"  2017 "Altern Energy Limited"                       -.002061387 .14285715  .4285714         0         0 .3333333 .3333333 3 4 0 1 0   19.89492 .26749927  8.778236 .25026205           0   1.94591  5850.9 . .
              end
              format %ty year
              label values firmauditedbybig4 BIG4
              label def BIG4 0 "Not Audited by BIG4", modify
              label def BIG4 1 "Audited by BIG4", modify
              label values lossdummy LOSSD
              label def LOSSD 0 "Firm not Reported Net Loss", modify
              label def LOSSD 1 "Firm  Reported Net Loss", modify

              Comment


              • #8
                Originally posted by Carlo Lazzaro View Post
                Sattar:
                could you please share the code you typed along with an example/excerpt of your data via -dataex-? Thanks.
                The Codes which I have been applied for regression analysis
                xtreg MCDA BIND BEXP BDIV FD ACIND ACEXP FSize firmauditedbybig4 acsize acmeet acchairmanindep ROA leverage SALES INV LBOARDMEET CFO_Lagg lagged_TA lossdummy
                xtreg MCDA BIND BEXP BDIV FD ACIND ACEXP FSize firmauditedbybig4 acsize acmeet acchairmanindep ROA leverage SALES INV LBOARDMEET CFO_Lagg lagged_TA lossdummy if year>2017

                *****pre period****
                xtreg MCDA BIND BEXP BDIV FD ACIND ACEXP FSize firmauditedbybig4 acsize acmeet acchairmanindep ROA leverage SALES INV LBOARDMEET CFO_Lagg lagged_TA lossdummy if year<2017, fe cluster()
                xtreg MCDA BIND BEXP BDIV FD ACIND ACEXP FSize firmauditedbybig4 acsize acmeet acchairmanindep ROA leverage SALES INV LBOARDMEET CFO_Lagg lagged_TA lossdummy if year<2017, re cluster()
                *****post period*****
                xtreg MCDA BIND BEXP BDIV FD ACIND ACEXP FSize firmauditedbybig4 acsize acmeet acchairmanindep ROA leverage SALES INV LBOARDMEET CFO_Lagg lagged_TA lossdummy if year>2017, fe cluster()
                xtreg MCDA BIND BEXP BDIV FD ACIND ACEXP FSize firmauditedbybig4 acsize acmeet acchairmanindep ROA leverage SALES INV LBOARDMEET CFO_Lagg lagged_TA lossdummy if year>2017, re cluster()
                *****full period*****
                xtreg MCDA BIND BEXP BDIV FD ACIND ACEXP FSize firmauditedbybig4 acsize acmeet acchairmanindep ROA leverage SALES INV LBOARDMEET CFO_Lagg lagged_TA lossdummy, fe cluster()

                generate didyear_d1 = year>2017
                generate didyear_d2 = year<2017
                recode year (2015/2016 =0)(2018/2019=1) (2017=.) (2014=.), gen(DID_year)
                recode year (2015/2016 =1)(2018/2019=0) (2017=.) (2014=.), gen(DID_year_2)

                gen BIND_POST_17= BIND*DID_year
                gen BEXP_POST_17= BEXP*DID_year
                gen FD_POST_17= FD*DID_year
                gen BDIV_POST_17= BDIV*DID_year
                gen ACIND_POST_17= ACIND*DID_year
                gen ACEXP_POST_17= ACEXP*DID_year

                gen BIND_PRE_17= BIND*DID_year_2
                gen BEXP_PRE_17= BEXP*DID_year_2
                gen FD_PRE_17= FD*DID_year_2
                gen BDIV_PRE_17= BDIV*DID_year_2
                gen ACIND_PRE_17= ACIND*DID_year_2
                gen ACEXP_PRE_17= ACEXP*DID_year_2

                Comment


                • #9
                  Sattar:
                  I find your regression code too dififcult to follow.
                  I would go:
                  Code:
                  encode companies, g(panelid)
                  xtset panelid year
                  g time_watershed=0 if year<2017
                  replace time_watershed=1 if year>=2017
                  xtreg MCDA BIND BEXP BDIV FD ACIND ACEXP FSize firmauditedbybig4 acsize acmeet acchairmanindep ROA leverage SALES INV LBOARDMEET  lagged_TA lossdummy i.time_watershed, fe
                  Fixed-effects (within) regression               Number of obs     =         51
                  Group variable: panelid                         Number of groups  =         12
                  
                  R-squared:                                      Obs per group:
                       Within  = 0.2950                                         min =          1
                       Between = 0.1383                                         avg =        4.3
                       Overall = 0.0000                                         max =          5
                  
                                                                  F(19,20)          =       0.44
                  corr(u_i, Xb) = -0.9952                         Prob > F          =     0.9602
                  
                  -----------------------------------------------------------------------------------
                               MCDA | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                  ------------------+----------------------------------------------------------------
                               BIND |  -.9501594   1.791587    -0.53   0.602    -4.687344    2.787025
                               BEXP |  -1.250921   1.195816    -1.05   0.308     -3.74535    1.243508
                               BDIV |   1.534133   1.446802     1.06   0.302    -1.483844     4.55211
                                 FD |  -1.562313   2.922337    -0.53   0.599      -7.6582    4.533574
                              ACIND |  -.0379977   .4607423    -0.08   0.935    -.9990893    .9230939
                              ACEXP |   1.313535   .9842235     1.33   0.197    -.7395192    3.366589
                              FSize |   .3114916   .2557355     1.22   0.237    -.2219634    .8449465
                  firmauditedbybig4 |   .0917555   .5748207     0.16   0.875      -1.1073    1.290811
                             acsize |  -.2704691   .6789823    -0.40   0.695    -1.686801    1.145863
                             acmeet |   .0737226    .186996     0.39   0.698    -.3163442    .4637895
                    acchairmanindep |  -.0710823   .1253715    -0.57   0.577    -.3326027    .1904381
                                ROA |   .0030032   .0103975     0.29   0.776    -.0186857    .0246921
                           leverage |  -.1991482   .4114346    -0.48   0.634    -1.057386    .6590894
                              SALES |   .1722751   .1408688     1.22   0.236    -.1215722    .4661223
                                INV |   .3932232   .4155165     0.95   0.355    -.4735291    1.259976
                         LBOARDMEET |   .1281982   .1649666     0.78   0.446    -.2159161    .4723126
                          lagged_TA |   3.72e-06   .0000283     0.13   0.897    -.0000554    .0000628
                          lossdummy |   .0456893   .1120048     0.41   0.688    -.1879485    .2793271
                   1.time_watershed |  -.0226422   .0829519    -0.27   0.788    -.1956767    .1503924
                              _cons |  -2.267244   3.498304    -0.65   0.524    -9.564578    5.030089
                  ------------------+----------------------------------------------------------------
                            sigma_u |  .69216808
                            sigma_e |  .15177099
                                rho |  .95412665   (fraction of variance due to u_i)
                  -----------------------------------------------------------------------------------
                  F test that all u_i=0: F(11, 20) = 0.46                      Prob > F = 0.9046
                  that unfrtunately does not show any evidence ofa panel-wise effect (but it may be due to small subsample shared via -dataex-).
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment

                  Working...
                  X