Announcement

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

  • Difference in Difference with PSMmatching - psmatch2

    Dear All,

    I am struggling with a problem implementing Difference in Difference after doing psm - matching. Below is my initial data. Would be grateful for any help/suggestion i can get.


    The problem :

    If my understanding is ok, then the interaction term highlighted below is given by : ( 1 1) which is omitted but (0 1 ) which is the year fixed effects has a coefficient. Can someone please explain how i can address this problem I should have only the interaction term coefficient and the other firm-fixed and year-fixed effects should have been omitted by Stata. Is there a problem with my data or the process?


    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input double WACC byte BoardSize double ACI byte PBI double HRscore float(Size NCF LEV BS)
    5.63347003345844  .                . .                . 19.290005 15.484914 21.705027         .
    4.59750967526028  .                . .                . 19.128357         . 12.320194         .
    3.77746605445323  .                . .                .  19.16905  17.13997 20.359585         .
    6.74970390474236  .                . .                . 19.516685         . 13.391864         .
    5.68245315193138  6              100 0                0  19.72842 17.977201  3.763319 1.7917595
                   .  6              100 0                0 19.929853  14.36767  3.090212 1.7917595
                   .  6              100 0                0  21.36582  20.19997  2.491998 1.7917595
    11.0367841629065 11              100 1 2.94117647058823 24.926525         .  19.92407  2.397895
    7.42778730583102 10              100 1                5 24.942846  21.04099  27.93765 2.3025851
    6.85336268326181 11              100 1               45  25.07941         .  25.16291  2.397895
    8.88741714566398 12              100 1 42.2413793103448  24.99975         . 25.280954  2.484907
    8.83297672162851 11              100 1 67.9487179487179  24.97898         . 22.765116  2.397895
    8.91684464693637 12          85.7143 1 63.9784946236559 24.754173         . 27.159397  2.484907
    1.63851168926627  8          85.7143 1               80 24.471216         .  39.79356 2.0794415
    3.03482720075186 12            57.14 1                0  23.05303         . 15.667521  2.484907
    4.50144015921441 11               75 1                0 23.096205         . 14.724265  2.397895
    5.28739191721452 11               75 1 88.5135135135135 23.062994         .   13.7408  2.397895
    7.15192349252946 11               75 1               88  23.12607         . 11.705832  2.397895
     5.5585411628984 11              100 1  88.034188034188 23.171474         .  11.78576  2.397895
    3.04419067939655 11              100 1               87 23.228857         . 11.609084  2.397895
    6.33456036571886 11              100 1 90.9340659340659  23.21931         .  9.526661  2.397895
    3.53638060476357  .                . .                .  20.39232  18.69183 29.726347         .
    4.01970293821479  .                . .                .  20.31512  16.61693 34.305134         .
    7.86900127648993  .                . .                .  20.34547 16.639326 35.789616         .
    11.8281471985644  .                . .                .  20.37166         .  34.88611         .
    10.2352673420125 12               75 1 57.5757575757575  20.29175 17.207869  49.97998  2.484907
    3.34899955302836 15             62.5 0                0  21.36102         .  26.03443   2.70805
    3.29601028570595 15             62.5 0                0  21.49841         . 25.502306   2.70805
    4.74315407253743 15 66.6666666666667 0                0 21.425535         .  22.80241   2.70805
     5.2652908138888 15 66.6666666666667 1 7.14285714285714  21.44742         . 19.540096   2.70805
    4.60120100222842 14 66.6666666666667 1 5.68181818181818 21.492495         . 16.543085 2.6390574
    4.53001837432825 15              100 1 2.67857142857142 21.556454         .  15.46859   2.70805
    8.37286533639052 14              100 1          5.46875  21.49952  18.30185 20.606524 2.6390574
     3.9967319373643 15             62.5 1                0  25.52318         . 12.163132   2.70805
    4.07545065145723 15               50 0 6.57894736842105   25.4632         . 10.195136   2.70805
     6.5767930128793 18               50 0 6.87830687830687  25.44055         .  9.698236  2.890372
    6.58129092939593 18               50 0 79.7665369649805 25.629623 20.219606  7.257854  2.890372
    5.24778884851918 19 90.9090909090909 0 79.4212218649517  25.66573 23.290575  7.384805  2.944439
     1.7292543181647 18 90.9090909090909 0  79.054054054054  25.74846  22.74264  7.761476  2.890372
    3.99441798383061 19          91.6667 0 79.3991416309012 25.835007  23.47293  7.398479  2.944439
    1.96303569644967  .                . .                . 21.486885         . 16.922829         .
    1.33344452400725  .                . .                .  21.55791 15.956283 21.119514         .
     1.8212809513979  .                . .                .   21.5828         . 17.840862         .
    5.40964446472065 12 33.3333333333333 1             22.5  21.78272 18.490654 17.457354  2.484907
    6.08052050637608 12 33.3333333333333 1 62.3931623931623  21.85941         . 15.020727  2.484907
    4.88707972509067 12 33.3333333333333 1               87 22.022076 18.617579  25.24518  2.484907
    3.86207510770832 12          28.5714 1 88.4615384615384  21.97873         .  21.54509  2.484907
    3.47951201277907  .                . .                . 22.023714         . 33.483242         .
    3.15032957834524  .                . .                .  22.10555         . 35.240864         .
    3.91079106323129  .                . .                . 22.182623 17.921982 36.383183         .
    3.97224000882967 14          66.6667 1 8.72093023255814 22.281355 18.233013 36.830048 2.6390574
    3.04355256545648 13 66.6666666666667 1 5.24193548387096  22.40139 18.572319  36.28779  2.564949
    1.93760250678369 14 71.4285714285714 1 3.10734463276836   22.4963 16.862696 35.616444 2.6390574
    3.77812400896733 12 71.4285714285714 1 43.7799043062201  22.64317  20.34605  41.45663  2.484907
    3.81550763619072  .                . .                . 21.588285         . 30.726835         .
    4.48532388440522  .                . .                . 21.603155         .  28.34304         .
    5.64986515558811  .                . .                . 21.688456         .  21.99808         .
    5.97269940157363 14 88.8888888888889 1 56.4814814814814 21.638464         .  15.32073 2.6390574
    4.45585806255746 14 88.8888888888889 1 54.1436464088397   21.6906         . 18.007689 2.6390574
    2.86782669461171 14 88.8888888888889 1 54.1860465116279  21.86144  19.62441 31.450516 2.6390574
    4.77191483896722 14              100 1 52.1276595744681   22.1495 20.849983 37.292732 2.6390574
    3.64405319956127 18             62.5 1 17.4242424242424 26.002846         . 13.858513  2.890372
    4.03595810120947 17 84.6153846153846 1 16.1184210526315   26.0203         . 12.743857  2.833213
    4.34280230051186 17 84.6153846153846 1 70.6349206349206 26.061895         .  10.94178  2.833213
    4.68333507986634 17 84.6153846153846 1 65.1750972762645 26.119886         .  9.670925  2.833213
    3.12112557414141 19 84.6153846153846 1 64.6302250803858 26.190447  21.83939 11.310903  2.944439
    1.44703655634591 18 84.6153846153846 1 63.7837837837837  26.22735 20.682444 11.392248  2.890372
    4.41401163386838 18 84.6153846153846 1 60.0858369098712 26.348703  21.72658 10.097959  2.890372
    2.64366594021844  .                . .                .  21.36231         .    59.533         .
    2.37727843344038  .                . .                .  21.44954 18.478855  60.49601         .
    3.76038796570812  .                . .                .  21.54696 16.542055  55.71561         .
     4.8265556398599  .                . .                .  21.54404         .  49.60236         .
    4.10273342109141  8          83.3333 0 67.3387096774193  21.72395  19.19361  50.35373 2.0794415
    2.95826422433188  8          83.3333 0 60.7344632768361  21.86675 17.746964  47.21852 2.0794415
    5.39648729751116  4          83.3333 0 72.0095693779904 21.861935 17.666084  46.62478 1.3862944
    2.95367269037017 16            66.67 1 8.92857142857142 22.841496  20.36164  43.67682  2.772589
    3.26454703911456 16               60 1                0 22.840067         .  40.87607  2.772589
    4.64689117992175 16               60 1                0  22.79558         . 35.295135  2.772589
    4.30926003400701 15 63.6363636363636 1                0  22.75644         . 33.177284   2.70805
    3.03952500737106 15 63.6363636363636 1                0 22.852747         .  44.99614   2.70805
    1.18342143136046 16 63.6363636363636 1 65.7342657342657 22.861685         .  49.82801  2.772589
    2.23560561863016 15               70 1 63.1578947368421  22.82886         .  41.37491   2.70805
     4.9357851097579  9               50 0 51.3071895424836  22.51423         . 10.959435 2.1972246
     5.5220516138626  9          83.3333 0 46.3483146067415  22.47733         .  8.364236 2.1972246
    6.59904025791957  9 83.3333333333333 0 42.4170616113744 22.547586         .  9.307668 2.1972246
    7.00387763412047  9               60 0 93.5251798561151   22.5583 18.716719 13.947094 2.1972246
    7.21026579175758  9               60 0 92.9230769230769  22.65748         .  20.41698 2.1972246
    2.96832119557709  9               60 0 92.8741092636579  22.70207         . 22.388277 2.1972246
    6.59576776660252  9               75 0 92.5162689804772 22.677246         . 21.723436 2.1972246
    2.59260535411755  .                . .                . 22.595253         .  26.02289         .
    2.38573191894073  .                . .                . 22.603724         . 23.913673         .
    3.63722066654162  .                . .                . 22.588106         . 18.413918         .
    5.33260703890684 15          42.8571 1 93.8016528925619  22.78137         . 14.485832   2.70805
    4.43926440701282 17             37.5 1 92.6174496644295  22.82601         . 12.977798  2.833213
    2.50261676142696 17             37.5 1 92.6229508196721 22.847406         .  14.74234  2.833213
    5.32397592528207 15          28.5714 1 92.5233644859813  23.13379         .  9.852062   2.70805
    3.90359946748709 15            44.44 1 85.4651162790697  24.24535         .  16.36095   2.70805
    4.50664545413555 16 66.6666666666667 1 85.0515463917525  24.20954 20.446194 16.461548  2.772589
    6.16715102896599 16 66.6666666666667 1 78.5046728971962 24.192495         . 16.429995  2.772589
    8.01513239590314 15 66.6666666666667 1               75 24.175663 17.111347 18.957436   2.70805
    end
    The command i am using for psmatch is as follows :

    Code:
     psmatch2 treated ROA Beta NCF Size LEV in_id , out(WACC) n(1) caliper( 0.01) logit
    where treated is a dummy which takes value of 1 = for treated firms , 0 = control sample
    in_id is the industry classification

    then i use the following commands
    Code:
    drop if _pscore==.
    drop if _weight==.
    tab treated
    after dropping the variables, I only use the new "matched_sample" containing the treated and control and run the fe regression using the following code
    Code:
     xtreg WACC i.treated#i.treatment    BGD  PBI  HRscore ROA Beta BS Size NCF LEV i.in_id i.year if matched_sample ==1 , fe robust



    Click image for larger version

Name:	Capture1.PNG
Views:	1
Size:	124.1 KB
ID:	1697101



  • #2
    Clyde Schechter Any advice please?

    Comment

    Working...
    X