Announcement

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

  • Event Study on Panel data

    I have a panel data set and I would like to conduct an event study. The variable dif shows the relative time to the event date and ASVI represents the variable of interest and Treatment refers to the group of control and matched firms.
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int index byte Treatment float(dif ASVI)
    1 1 -30    .22171944
    1 1 -29   -.22033897
    1 1 -28   -.17682925
    1 1 -27    .14551088
    1 1 -26    -.1666667
    1 1 -25     .7151162
    1 1 -24    -.3425606
    1 1 -23    1.3333333
    1 1 -22     .2585034
    1 1 -21   -.52076674
    1 1 -20   -.19642852
    1 1 -19   -.18644068
    1 1 -18   -.26892948
    1 1 -17    -.2910448
    1 1 -16    .21457487
    1 1 -15  -.003436437
    1 1 -14    .04166662
    1 1 -13    .18012413
    1 1 -12    -.5714286
    1 1 -11    .09375003
    1 1 -10   .015037644
    1 1  -9          .36
    1 1  -8     .0238908
    1 1  -7   -.05084744
    1 1  -6    -.3154762
    1 1  -5     3.032258
    1 1  -4   .072386004
    1 1  -3   -.28030306
    1 1  -2    .26865673
    1 1  -1    -.2253521
    1 1   0    -.0405904
    1 1   1     .2647059
    1 1   2    .05431316
    1 1   3    -.4516971
    1 1   4     .6460904
    1 1   5   -.16058394
    1 1   6    -.3233083
    1 1   7  -.025270775
    1 1   8    -.0532544
    1 1   9    -.1743119
    1 1  10    -.3956044
    1 1  11     .7509728
    1 1  12    -.2936803
    1 1  13     .1857707
    1 1  14   -.11877392
    1 1  15   -.28571433
    1 1  16   -.11585365
    1 1  17    .09289608
    1 1  18    1.7586207
    1 1  19    .52985084
    1 1  20     .2053572
    1 1  21     .1923077
    1 1  22    -.4478528
    1 1  23  -.064327486
    1 1  24    -.2063492
    1 1  25     -.153605
    1 1  26     .4527027
    1 1  27            1
    1 1  28     .3953488
    1 1  29    .56351787
    1 1  30   .005747146
    1 1  31    .14130443
    1 1  32    -.3059937
    1 1  33     .2389381
    1 1  34     .6666667
    1 1  35     .0791367
    1 1  36    -.3655589
    1 1  37    .54069763
    1 1  38    -.4277929
    1 1  39     .8327973
    1 1  40    .05263154
    1 1  41    .12903221
    1 1  42    1.1611722
    1 1  43    -.6129032
    2 1 -30     -.591195
    2 1 -29   -.04605259
    2 1 -28    -.6721311
    2 1 -27    -.4940476
    2 1 -26   -.13580249
    2 1 -25   -.13043475
    2 1 -24    -.3181818
    2 1 -23    -.3079584
    2 1 -22  -.026217313
    2 1 -21    -.2982456
    2 1 -20    -.3602694
    2 1 -19   -.17695473
    2 1 -18    -.2473118
    2 1 -17   -.09433959
    2 1 -16           -1
    2 1 -15    .11111107
    2 1 -14   -.09722224
    2 1 -13    1.7931035
    2 1 -12     .4403292
    2 1 -11    .14130434
    2 1 -10     .3919413
    2 1  -9      .686747
    2 1  -8      .958042
    2 1  -7    2.4013605
    2 1  -6     .7318435
    2 1  -5    .08527134
    2 1  -4    -.4871795
    2 1  -3     .5331011
    2 1  -2     .3235295
    2 1  -1      .234568
    2 1   0    .09289618
    2 1   1    .22448985
    2 1   2    .09022566
    2 1   3   .027026966
    2 1   4   .009771936
    2 1   5    .17437728
    2 1   6   -.23976614
    2 1   7    -.3157895
    2 1   8    -.1099477
    2 1   9    -.6428571
    2 1  10          .25
    2 1  11    -.2387543
    2 1  12    .26482219
    2 1  13   -.04024766
    2 1  14    -.5041322
    2 1  15   -.14893618
    2 1  16    -.3697479
    2 1  17    -.0909091
    2 1  18    -.1891892
    2 1  19   .007462648
    2 1  20    .26934984
    2 1  21    -.3353474
    2 1  22     .3385827
    2 1  23   -.25373137
    2 1  24    -.2045454
    2 1  25    -.1970803
    2 1  26    .03448269
    2 1  27   -.24418607
    2 1  28      -.53125
    2 1  29    .06965175
    2 1  30   -.50248754
    2 1  31     .5243903
    2 1  32    1.1942444
    2 1  33     .7307692
    2 1  34    .13149843
    2 1  35     .1551155
    2 1  36    .07913663
    2 1  37     .2437811
    2 1  38    .06145253
    2 1  39    -.7096774
    2 1  40   -.12727271
    3 1 -30   -.07894732
    3 1 -29   -.14361002
    3 1 -28   -.19885553
    3 1 -27  -.068322964
    3 1 -26   -.11924127
    3 1 -25   -.11725954
    3 1 -24   .013024614
    3 1 -23    .20426828
    3 1 -22  -.013157982
    3 1 -21    .11441304
    3 1 -20   -.03785486
    3 1 -19   -.08602154
    3 1 -18    -.1149274
    3 1 -17   -.04209001
    3 1 -16   .014040508
    3 1 -15   -.19098145
    3 1 -14    .06351553
    3 1 -13   -.12836766
    3 1 -12    .13543093
    3 1 -11    .27005348
    3 1 -10    .14243324
    3 1  -9  -.014539526
    3 1  -8     .1756757
    3 1  -7    .05726878
    3 1  -6    .16693684
    3 1  -5   -.16323733
    3 1  -4    .24183013
    3 1  -3    .23906708
    3 1  -2    .07890496
    3 1  -1    -.1379311
    3 1   0    .06194697
    3 1   1    -.0569106
    3 1   2  -.002770007
    3 1   3   -.21086675
    3 1   4   -.08192094
    3 1   5    .09177213
    3 1   6   -.02306643
    3 1   7    -.1310751
    3 1   8    .41176465
    3 1   9    .26721758
    3 1  10    .05820104
    3 1  11   .001451339
    3 1  12    -.1219512
    3 1  13   -.11564633
    3 1  14    .13981755
    3 1  15 -.0032154145
    3 1  16    -.0921228
    3 1  17    .06159905
    3 1  18    .14825577
    3 1  19    .16591924
    3 1  20     .1111111
    3 1  21    -.0895522
    3 1  22    .08832807
    3 1  23   -.21438085
    3 1  24     .1898395
    end
    Also, I would like to graph ASVI both treated and control the same timeline(-30 to +20 ) but different lines for treated and control firms.

    Thank you
    Last edited by Bilal Hafeez; 02 Jun 2019, 01:52.

  • #2
    You didn't get a quick answer. Having been on this list for many years, you should know the FAQ on posting questions. If you search this list or google the issue, you'll also find a great many postings about event studies.

    Folks are more likely to help you if show that you've tried to solve your problems.

    Comment

    Working...
    X