Announcement

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

  • Propensity Score Matching (Problem in interaction term)

    Greetings!

    Hopefully, you will be doing great. I wanted to do PSM on the following data, while the treatment variable is affiliation1, outcome variables is CE_UE_w and covariates are CFO_TA_w Boardinde_w ACinde_w LEVEARAGE_w. I wanted interaction of affiliation1##c.NOe_w on the outcome variable, but there arose the problem. Therefore, I need help that how to conduct PSM. Kindly help me out. Thanks in Advance


    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str52 firmname byte affiliation1 int(year psxsectorcode) byte(SNA_BIG4 thesamenetworkauditor) double(CE_UE_w NOe_w CFO_TA_w Boardinde_w ACinde_w LEVEARAGE_w)
    "Abbott Laboratories (Pakistan) Limited"       0 2012 823 0 0  .0153649 -.1121966  .2689968 .2857143 .3333333  28.1083
    "Abbott Laboratories (Pakistan) Limited"       0 2013 823 0 0  .0130593  -.122523  .2224084 .2857143 .3333333  21.6756
    "Abbott Laboratories (Pakistan) Limited"       0 2014 823 0 0  .0089481 -.1286586   .241986        0        0  21.0233
    "Abbott Laboratories (Pakistan) Limited"       0 2015 823 0 0  .0115476 -.1139662  .2463589 .2857143 .3333333  21.4639
    "Abbott Laboratories (Pakistan) Limited"       0 2016 823 0 0  .0153176 -.1170267   .176793 .2857143 .3333333  17.2961
    "Abbott Laboratories (Pakistan) Limited"       0 2017 823 0 0  .0050459 -.1118236  .3004209        0        0  25.1836
    "Abbott Laboratories (Pakistan) Limited"       0 2018 823 0 0 -.0160185 -.1089124  .1448243        0        0  34.7426
    "Abbott Laboratories (Pakistan) Limited"       0 2019 823 0 0 -.0193649 -.0781766  -.007716        0        0   35.563
    "Abdullah Shah Ghazi Sugar Mills Limited"      0 2012 826 0 0 -.0113358 -.2242685     .0577 .1428571        0        0
    "Abdullah Shah Ghazi Sugar Mills Limited"      0 2013 826 0 0 -.0329947 -.0741914     .0577 .1428571        0        0
    "Abdullah Shah Ghazi Sugar Mills Limited"      0 2014 826 0 0  -.037918  .1592145     .0577 .1428571        0        0
    "Abdullah Shah Ghazi Sugar Mills Limited"      0 2015 826 0 0 -.0837105  .0332377     .0577        0        0        0
    "Abdullah Shah Ghazi Sugar Mills Limited"      0 2016 826 0 0  .0283471  -.022075     .0577 .2857143        0        0
    "Abdullah Shah Ghazi Sugar Mills Limited"      0 2017 826 0 0  .1781318  .3984125  .0215762 .1428571        0 101.0283
    "Abdullah Shah Ghazi Sugar Mills Limited"      0 2018 826 0 0 -.3409265 -.5622638  .0014009      .14     .233 112.2975
    "Abdullah Shah Ghazi Sugar Mills Limited"      0 2019 826 0 0  .0397937  .3984125  .0019066 .2857143        0  85.8681
    "Adam Sugar Mills Limited"                     1 2012 826 0 0  .0024712 -.0584753 -.0970422 .2857143 .3333333  76.4924
    "Adam Sugar Mills Limited"                     1 2013 826 0 0  .0345881 -.0943535  -.111534 .1428571        0  80.8617
    "Adam Sugar Mills Limited"                     1 2014 826 0 0 -.0105746  .0047666 -.0294942        0        0  66.5237
    "Adam Sugar Mills Limited"                     1 2015 826 0 0 -.0604203 -.0404715  .2412874        0        0  57.0613
    "Adam Sugar Mills Limited"                     1 2016 826 0 0  .0412117  -.049184  .2007043 .2857143        0  46.3292
    "Adam Sugar Mills Limited"                     1 2017 826 0 0 -.0150885  .0032771 -.2107747 .2857143        0  71.6243
    "Adam Sugar Mills Limited"                     1 2018 826 0 0 -.0075723 -.0045293   .093409 .4285714 .3333333  69.8782
    "Adam Sugar Mills Limited"                     1 2019 826 0 0 -.0269884 -.0438383  .0435996 .1428571        0  48.4539
    "Agriauto Industries Limited"                  1 2012 802 1 1  .0078992 -.0962991  .1619582 .1428571      .25  12.1332
    "Agriauto Industries Limited"                  1 2013 802 1 1 -.0282231 -.0583407  .0429423 .2857143 .3333333  11.6208
    "Agriauto Industries Limited"                  1 2014 802 1 1 -.0091837 -.0368464  .1708659 .1428571      .25  10.9311
    "Agriauto Industries Limited"                  1 2015 802 1 1  .0306175 -.0950315  .0295913        0        0  14.6174
    "Agriauto Industries Limited"                  1 2016 802 1 1   .006789  -.071551  .2178305 .1428571      .25  11.4892
    "Agriauto Industries Limited"                  1 2017 802 1 1  .0030577  -.087714  .1372384        0      .25  13.3117
    "Agriauto Industries Limited"                  1 2018 802 1 1   .008063 -.0634257  .1092641        0        0  11.5578
    "Agriauto Industries Limited"                  1 2019 802 1 1  .0063972 -.0439141  .0261702        0     .233  11.6693
    "Agritech Limited"                             0 2012 805 1 1 -.0260993   -.37837 -.0128888     .125      .25  70.7957
    "Agritech Limited"                             0 2013 805 1 1 -.0449571 -.4230668  .0198291        0        0  79.1134
    "Agritech Limited"                             0 2014 805 1 1 -.3409265 -.5536481 -.0071213        0        0  80.0352
    "Agritech Limited"                             0 2015 805 1 1 -.0532703 -.5154696  .0023995 .2857143     .233  85.9139
    "Agritech Limited"                             0 2016 805 0 1  .0470853 -.4443341   .005934 .2857143      .25  90.8011
    "Agritech Limited"                             0 2017 805 1 1 -.2674304 -.7274761  .0016147     .125 .3333333 103.5378
    "Agritech Limited"                             0 2018 805 1 1  .0297882 -.4690557  .0052673        0        0  110.579
    "Agritech Limited"                             0 2019 805 1 1  -.026049 -.1479493  .0074573        0        0   84.471
    "Ahmad Hassan Textile Mills Limited"           0 2012 828 0 0 -.0152856 -.0783335  .1219969        0        0  57.2633
    "Ahmad Hassan Textile Mills Limited"           0 2013 828 0 0 -.0053375 -.0376196  .0860703        0        0  43.3052
    "Ahmad Hassan Textile Mills Limited"           0 2014 828 0 0 -.0055804 -.0179764 -.0208575     .125 .3333333  48.5404
    "Ahmad Hassan Textile Mills Limited"           0 2015 828 0 0 -.0192068 -.0000265  .0546249        0        0  49.5504
    "Ahmad Hassan Textile Mills Limited"           0 2016 828 0 0  .0037052 -.0462525  .0010119        0        0  50.7079
    "Ahmad Hassan Textile Mills Limited"           0 2017 828 0 0 -.0006423 -.0315051  -.016693        0        0  56.0836
    "Ahmad Hassan Textile Mills Limited"           0 2018 828 0 0  .0001311 -.0434983  .0625614     .125 .3333333  57.8671
    "Ahmad Hassan Textile Mills Limited"           0 2019 828 0 0  .0017842 -.0499583  .0341267        0        0  61.3201
    "Aisha Steel Mills Limited"                    1 2012 808 1 1    -.0026    -.0616  -.071057        0        0  72.6179
    "Aisha Steel Mills Limited"                    1 2013 808 1 1  .0125349 -.0315305 -.1478632     .125      .25  84.3092
    "Aisha Steel Mills Limited"                    1 2014 808 1 1  .0060677 -.0189458 -.0399718      .14     .233  84.4361
    "Aisha Steel Mills Limited"                    1 2015 808 1 1  .0024925  -.085586 -.1151393 .3333333      .25  81.6732
    "Aisha Steel Mills Limited"                    1 2016 808 1 1  .0278217 -.0958083 -.0008851 .4444444       .8  82.7039
    "Aisha Steel Mills Limited"                    1 2017 808 1 1  .0250296 -.0475249  .0621507 .4444444       .5  63.1515
    "Aisha Steel Mills Limited"                    1 2018 808 1 1  .0282459 -.1233584 -.0355122        0        0  58.4294
    "Aisha Steel Mills Limited"                    1 2019 808 1 1  -.016473 -.0259738  -.116126 .2222222      .25  73.2765
    "Al Shaheer Corporation Limited"               0 2012 810 0 0    -.0026    -.0616     .0577      .14     .233        0
    "Al Shaheer Corporation Limited"               0 2013 810 0 0  .0210592 -.0324167     .0577      .14     .233        0
    "Al Shaheer Corporation Limited"               0 2014 810 0 0   .001913 -.0213583  .1396305      .14     .233  52.5078
    "Al Shaheer Corporation Limited"               0 2015 810 0 0  .0034834 -.0030188  .0410004       .5 .6666667   32.379
    "Al Shaheer Corporation Limited"               0 2016 810 0 0  .0045285  .0058777 -.0938832      .14     .233  23.0344
    "Al Shaheer Corporation Limited"               0 2017 810 0 0 -.0092112 -.0165108  .0604546       .4 .6666667  34.5447
    "Al Shaheer Corporation Limited"               0 2018 810 0 0 -.0131236  .0038694  .0398856 .2857143 .3333333  39.9511
    "Al Shaheer Corporation Limited"               0 2019 810 0 0  .0126626 -.0018832  .0665432      .14     .233  39.3596
    "Al-Abbas Sugar Mills Limited"                 1 2012 826 0 1  .0056545 -.0595249  .1155295 .3333333       .5  63.6476
    "Al-Abbas Sugar Mills Limited"                 1 2013 826 0 1 -.0208781 -.0498509  .1965456        0        0  53.1415
    "Al-Abbas Sugar Mills Limited"                 1 2014 826 0 1 -.0029765 -.0541328  .0835532        0        0  49.2781
    "Al-Abbas Sugar Mills Limited"                 1 2015 826 0 1  .0028993 -.0194395  .2979169     .125      .25  36.8181
    "Al-Abbas Sugar Mills Limited"                 1 2016 826 0 1 -.0148688 -.0263056  .2713651 .1111111 .3333333  29.5153
    "Al-Abbas Sugar Mills Limited"                 1 2017 826 0 1 -.0007471 -.0414108 -.2539706        0        0  51.4931
    "Al-Abbas Sugar Mills Limited"                 1 2018 826 0 1  .0584735 -.0263499  .2368962 .1111111 .3333333  35.8971
    "Al-Abbas Sugar Mills Limited"                 1 2019 826 0 1 -.0063492 -.0235519  .2000032 .1111111 .3333333  49.6734
    "Al-Abid Silk Mills Limited"                   0 2012 826 0 0 -.1976777 -.1098976  .0030098      .25 .3333333  90.4106
    "Al-Abid Silk Mills Limited"                   0 2013 826 0 0  .1369279  .0464117 -.0362267        0        0 124.8869
    "Al-Abid Silk Mills Limited"                   0 2014 826 0 0  .1914081    .34667 -.0258393      .25 .6666667 138.6511
    "Al-Abid Silk Mills Limited"                   0 2015 826 0 0 -.0612543 -.0000463 -.0062978      .25 .6666667 153.9021
    "Al-Abid Silk Mills Limited"                   0 2016 826 0 0    -.0026    -.0616  -.004352      .25 .6666667 174.4351
    "Al-Abid Silk Mills Limited"                   0 2017 826 0 0    -.0026    -.0616 -.0042143      .25 .6666667 181.9889
    "Al-Abid Silk Mills Limited"                   0 2018 826 0 0    -.0026    -.0616  .0752484        0        0 181.9889
    "Al-Abid Silk Mills Limited"                   0 2019 826 0 0    -.0026    -.0616 -.0013232      .25 .6666667 181.9889
    "Al-Ghazi Tractors Limited"                    0 2012 801 0 0  .0229761 -.0932579   .224021        0        0  16.3032
    "Al-Ghazi Tractors Limited"                    0 2013 801 0 0 -.0250847 -.0973505  .1196452        0        0  16.3586
    "Al-Ghazi Tractors Limited"                    0 2014 801 0 0  .0144089 -.1023338  .1079853     .125 .3333333  14.3882
    "Al-Ghazi Tractors Limited"                    0 2015 801 0 0  .0135404  -.116289  .0967783     .125 .3333333   9.6193
    "Al-Ghazi Tractors Limited"                    0 2016 801 0 0  .0181172 -.1445075  .4480943     .125 .3333333  27.6649
    "Al-Ghazi Tractors Limited"                    0 2017 801 0 0  .0275139 -.1473463  .4480943     .125 .3333333  63.8548
    "Al-Ghazi Tractors Limited"                    0 2018 801 0 0 -.0038647 -.1358813 -.1703175        0        0  79.8186
    "Al-Ghazi Tractors Limited"                    0 2019 801 0 0 -.0562575 -.0770979  .3537283     .125 .3333333  83.4949
    "Al-Noor Sugar Mills Limited"                  1 2012 826 0 0 -.0071135 -.0496484 -.0206844        0        0  70.9691
    "Al-Noor Sugar Mills Limited"                  1 2013 826 0 0  .0081464 -.0684927 -.0594494        0        0  60.8028
    "Al-Noor Sugar Mills Limited"                  1 2014 826 0 0 -.0037714 -.0554149  .0438922       .1        0  62.4639
    "Al-Noor Sugar Mills Limited"                  1 2015 826 0 0  .0126137 -.0587043  .0169818       .1      .25  63.3244
    "Al-Noor Sugar Mills Limited"                  1 2016 826 0 0 -.0098303 -.0437931  .0487866       .1      .25  60.9208
    "Al-Noor Sugar Mills Limited"                  1 2017 826 0 0 -.0172705 -.0166164  .0184814      .14     .233  72.6902
    "Al-Noor Sugar Mills Limited"                  1 2018 826 0 0  -.055147  .1512055  .0054971        0        0   68.208
    "Al-Noor Sugar Mills Limited"                  1 2019 826 0 0   .058021 -.0603916  .0023973       .1      .25  66.1627
    "Allawasaya Textile & Finishing Mills Limited" 1 2012 829 1 1 -.0102766 -.0460232  .2584254        0        0  60.1111
    "Allawasaya Textile & Finishing Mills Limited" 1 2013 829 1 1  .0011555  -.046251  .1398134 .1111111 .3333333  31.9903
    "Allawasaya Textile & Finishing Mills Limited" 1 2014 829 1 1 -.0185289 -.0110126  .0507109 .2727273 .3333333  29.8206
    "Allawasaya Textile & Finishing Mills Limited" 1 2015 829 1 1 -.0214124  .0346552 -.0470578 .1111111 .3333333  33.8468
    end
    format %ty year

  • #2
    What exactly is the problem or error message? I suggest you are using an entropy balancing approach, which is usually superior to PSM. You create a weight and use it in an OLS (or any other kind) of regression model. For example:
    Code:
    ssc install kmatch, replace        //Install ado
    
    global treatment affiliation1
    global controls CFO_TA_w Boardinde_w ACinde_w LEVEARAGE_w
    kmatch eb $treatment $controls, wgen(weight) replace target(2) comsup
    kmatch sum          //Check balancing of control variables
    sum weight if weight > 0    //Check weights, very large weights are potentially problematic
    regress CE_UE_w i.$treatment##c.NOe_w [pweight=weight], vce(robust)
    This is a first idea how to start. Of course, depending on the data and research question, this can be tweaked and adjusted.
    Best wishes

    Stata 18.0 MP | ORCID | Google Scholar

    Comment


    • #3
      Originally posted by Felix Bittmann View Post
      What exactly is the problem or error message? I suggest you are using an entropy balancing approach, which is usually superior to PSM. You create a weight and use it in an OLS (or any other kind) of regression model. For example:
      Code:
      ssc install kmatch, replace //Install ado
      
      global treatment affiliation1
      global controls CFO_TA_w Boardinde_w ACinde_w LEVEARAGE_w
      kmatch eb $treatment $controls, wgen(weight) replace target(2) comsup
      kmatch sum //Check balancing of control variables
      sum weight if weight > 0 //Check weights, very large weights are potentially problematic
      regress CE_UE_w i.$treatment##c.NOe_w [pweight=weight], vce(robust)
      This is a first idea how to start. Of course, depending on the data and research question, this can be tweaked and adjusted.
      Thank you so much Felix Bittmann, I do not know about it. The reviewer ask to use PSM instead of 2SLS on one of my manuscripts. But when I ran the psm command then it report error.

      Comment


      • #4
        Originally posted by Sattar Khan View Post

        Thank you so much Felix Bittmann, I do not know about it. The reviewer ask to use PSM instead of 2SLS on one of my manuscripts. But when I ran the psm command then it report error.
        there is problem in installing
        ssc install kmatch, replace, "remote connection failed could not load kmatch.pkg from http://fmwww.bc.edu/repec/bocode/k/"

        Comment


        • #5
          Are you working in a secure environment, without access to the internet? Maybe kmatch is already installed, you can test this typing:
          Code:
          help kmatch
          Still, you need to show the exact command you have typed with PSM so it is clear what exactly is going on.
          Last edited by Felix Bittmann; 16 Jul 2025, 05:16. Reason: Typo fixed
          Best wishes

          Stata 18.0 MP | ORCID | Google Scholar

          Comment


          • #6
            Originally posted by Felix Bittmann View Post
            Are you working in a secure environment, without access to the internet? Maybe kmatch is already installed, you can test this typing:
            Code:
            help kmach
            Still, you need to show the exact command you have typed with PSM so it is clear what exactly is going on.
            I am using STATA17, may be it is already installed.

            Comment


            • #7
              "eststo clear
              eststo: reg CE_UE_w NOe_w Boardinde_w ACinde_w Log_BZ InstitOwnAggreg_w CFO_TA_w LEVEARAGE_w BIG4 ReturnonAssets_w FS_CS_w PROFIT_w TANG_w LOAN_Size_w i.year i.psxsectorcode, cluster()
              eststo: xtreg CE_UE_w NOe_w Boardinde_w ACinde_w Log_BZ InstitOwnAggreg_w CFO_TA_w LEVEARAGE_w BIG4 ReturnonAssets_w FS_CS_w PROFIT_w TANG_w LOAN_Size_w i.year i.psxsectorcode, fe cluster()
              eststo: reg CE_UE_w NOe_w Boardinde_w ACinde_w Log_BZ InstitOwnAggreg_w CFO_TA_w LEVEARAGE_w BIG4 ReturnonAssets_w FS_CS_w PROFIT_w TANG_w LOAN_Size_w i.year i.psxsectorcode if affiliation1==0, cluster()
              eststo: xtreg CE_UE_w NOe_w Boardinde_w ACinde_w Log_BZ InstitOwnAggreg_w CFO_TA_w LEVEARAGE_w BIG4 ReturnonAssets_w FS_CS_w PROFIT_w TANG_w LOAN_Size_w i.year i.psxsectorcode if affiliation1==0, fe cluster()
              eststo: reg CE_UE_w NOe_w Boardinde_w ACinde_w Log_BZ InstitOwnAggreg_w CFO_TA_w LEVEARAGE_w BIG4 ReturnonAssets_w FS_CS_w PROFIT_w TANG_w LOAN_Size_w i.year i.psxsectorcode if affiliation1==1, cluster()
              eststo: xtreg CE_UE_w NOe_w Boardinde_w ACinde_w Log_BZ InstitOwnAggreg_w CFO_TA_w LEVEARAGE_w BIG4 ReturnonAssets_w FS_CS_w PROFIT_w TANG_w LOAN_Size_w i.year i.psxsectorcode if affiliation1==1, fe cluster()
              esttab using example901l606.rtf, star(** 0.10 *** 0.05 *** 0.01) stats(N N_g r2_o r2_a F chi2) b(2) t(2) label title("Regression Results of SPI") mtitle("OLS Without Controll Variables" "OLS Robust with Control Variables" "Fixed Effect Without Controll Variables" "Fixed Effect with Controll Variables" "OLS Without Controll Variables in FBG" "PLS With Controll Variables in FBG" "Random Effect Without Controll Variables" "Random Effect With Controll Variables") scalars(F)"

              These commands actually I have used for regression analysis, can you suggest how to run Kmatch command on it.

              Comment


              • #8
                I see that these are the commands you used with OLS and the FE regressions. What have you tried for PSM?
                As soon as you get kmatch to run, you can run the basic example code from post #2. You can also try the installation via Github:
                Code:
                net install kmatch, replace from(https://raw.githubusercontent.com/benjann/kmatch/master/)
                net install moremata, replace from(https://raw.githubusercontent.com/benjann/moremata/master/)
                Best wishes

                Stata 18.0 MP | ORCID | Google Scholar

                Comment


                • #9
                  Originally posted by Felix Bittmann View Post
                  I see that these are the commands you used with OLS and the FE regressions. What have you tried for PSM?
                  As soon as you get kmatch to run, you can run the basic example code from post #2. You can also try the installation via Github:
                  Code:
                  net install kmatch, replace from(https://raw.githubusercontent.com/benjann/kmatch/master/)
                  net install moremata, replace from(https://raw.githubusercontent.com/benjann/moremata/master/)
                  I have installed it, could you simplify the code from post#2 (as I don't understand "global")

                  Comment


                  • #10
                    I used globals to make it easier for you to identify what goes where. After treatment you write the treatment variable. After controls you specify all control variables. I have used the variable names you specified in your original post.
                    Best wishes

                    Stata 18.0 MP | ORCID | Google Scholar

                    Comment


                    • #11
                      Originally posted by Felix Bittmann View Post
                      I used globals to make it easier for you to identify what goes where. After treatment you write the treatment variable. After controls you specify all control variables. I have used the variable names you specified in your original post.
                      Thank you so much Felix, for your time, let me do it, then I there is any problem, I will discuss with you.
                      Regards

                      Comment


                      • #12
                        Originally posted by Felix Bittmann View Post
                        I used globals to make it easier for you to identify what goes where. After treatment you write the treatment variable. After controls you specify all control variables. I have used the variable names you specified in your original post.
                        global treatment affiliation1
                        global affiliation1 NOe_w thesamenetworkauditor Boardinde_w ACinde_w Log_BZ InstitOwnAggreg_w CFO_TA_w LEVEARAGE_w BIG4 ReturnonAssets_w FS_CS_w PROFIT_w TANG_w LOAN_Size_w
                        kmatch eb affiliation1 NOe_w thesamenetworkauditor Boardinde_w ACinde_w Log_BZ InstitOwnAggreg_w CFO_TA_w LEVEARAGE_w BIG4 ReturnonAssets_w FS_CS_w PROFIT_w TANG_w LOAN_Size_w, wgen(weight) replace target(2) comsup
                        kmatch sum //Check balancing of control variables
                        sum weight if weight > 0 //Check weights, very large weights are potentially problematic
                        regress CE_UE_w i.affiliation1##c.NOe_w##i.thesamenetworkauditor [pweight=weight], vce(robust)
                        I have used the above code for analysis but the results show error "-moremata- is required; type ssc install moremata"

                        Comment


                        • #13
                          Originally posted by Felix Bittmann View Post
                          I used globals to make it easier for you to identify what goes where. After treatment you write the treatment variable. After controls you specify all control variables. I have used the variable names you specified in your original post.
                          Thank you so much Felix Bittmann, it worked after installing moremata. Thank you so much again

                          Comment


                          • #14
                            You can install this dependency as follows:
                            Code:
                            net install moremata, replace from(https://raw.githubusercontent.com/benjann/moremata/master/)
                            Your code should be as follows:

                            Code:
                            global treatment affiliation1
                            global controls Boardinde_w ACinde_w Log_BZ InstitOwnAggreg_w CFO_TA_w LEVEARAGE_w BIG4 ReturnonAssets_w FS_CS_w PROFIT_w TANG_w LOAN_Size_w
                            kmatch eb $treament $controls, wgen(weight) replace target(2) comsup
                            kmatch sum //Check balancing of control variables
                            sum weight if weight > 0 //Check weights, very large weights are potentially problematic
                            regress CE_UE_w i.affiliation1##c.NOe_w##i.thesamenetworkauditor [pweight=weight], vce(robust)
                            If NOe_w and thesamenetworkauditor are interacting variables, they must be removed from the entropy balancing variables as they are accounted for in the regression setup.
                            Best wishes

                            Stata 18.0 MP | ORCID | Google Scholar

                            Comment


                            • #15
                              Originally posted by Felix Bittmann View Post
                              You can install this dependency as follows:
                              Code:
                              net install moremata, replace from(https://raw.githubusercontent.com/benjann/moremata/master/)
                              Your code should be as follows:

                              Code:
                              global treatment affiliation1
                              global controls Boardinde_w ACinde_w Log_BZ InstitOwnAggreg_w CFO_TA_w LEVEARAGE_w BIG4 ReturnonAssets_w FS_CS_w PROFIT_w TANG_w LOAN_Size_w
                              kmatch eb $treament $controls, wgen(weight) replace target(2) comsup
                              kmatch sum //Check balancing of control variables
                              sum weight if weight > 0 //Check weights, very large weights are potentially problematic
                              regress CE_UE_w i.affiliation1##c.NOe_w##i.thesamenetworkauditor [pweight=weight], vce(robust)
                              If NOe_w and thesamenetworkauditor are interacting variables, they must be removed from the entropy balancing variables as they are accounted for in the regression setup.
                              Thanks, I have a question that why at last step we didnot include control variables (regress CE_UE_w i.affiliation1##c.NOe_w##i.thesamenetworkauditor [pweight=weight], vce(robust))

                              Comment

                              Working...
                              X