Announcement

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

  • eventstudy2 (Thomas Kaspereit) changing number of included events

    Dear Stata Community,

    I am rather new to Stata and try to incorporate it into my empirical study on crypto-currency forking. In my analysis, I intend to use the eventstudy2 package by Thomas Kaspereit. My analysis actually includes 126 events. However, I am confused because the number of events (from the 126) changes with each iteration of running the code because I think the number of events that the command is able to incorporate in the analysis should be constant (an example is depicted below):

    Example Iteration 1:
    Code:
    Number of events in the event file: 126
    -- thereof: Number of events for which security identifiers and event dates are available: 126
    -- thereof: Number of events for which event dates are in the range of dates in the security file: 126
    -- thereof: Number of events in the analysis (not deleted because of any insufficient data in the estimation or event period): 105
    
    List of security identifiers for which no security market data was available: 
    
    ANALYSIS OF ESTIMATION PERIOD
    
    Number of events with insufficient security return data: 0
    
    ANALYSIS OF EVENT PERIOD
    
    Number of events with insufficient security return data: 0
    Events for which the IPO (deletion) date of the event firm is later (earlier) than the first (last) day of the event window: 21
    Example Iteration 2:
    Code:
    Number of events in the event file: 126
    -- thereof: Number of events for which security identifiers and event dates are available: 126
    -- thereof: Number of events for which event dates are in the range of dates in the security file: 126
    -- thereof: Number of events in the analysis (not deleted because of any insufficient data in the estimation or event period): 88
    
    List of security identifiers for which no security market data was available: 
    
    ANALYSIS OF ESTIMATION PERIOD
    
    Number of events with insufficient security return data: 0
    
    ANALYSIS OF EVENT PERIOD
    
    Number of events with insufficient security return data: 0
    Events for which the IPO (deletion) date of the event firm is later (earlier) than the first (last) day of the event window: 38


    To obtain this result I used the following command:
    Code:
    eventstudy2 fork_id date using Indicators, returns(ret) model(COMEAN) evwlb(-30) evwub(30) eswlb(-200) eswub(-31)  car1LB(-20) car1UB(20) car2LB(-10) car2UB(10) car3LB(0) car3UB(5) car4LB(0) car4UB(10) parallel replace

    Data frame containing the events
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float fork_id long date
      1 19067
      2 19084
      3 19442
      4 19476
      5 19760
      6 19768
      7 19824
      8 19855
      9 19886
     10 19955
     11 20177
     12 20177
     13 20273
     14 20423
     15 20528
     16 20640
     17 20640
     18 20640
     19 20655
     20 20745
     21 20756
     22 20781
     23 21023
     24 21032
     25 21032
     26 21032
     27 21032
     28 21033
     29 21108
     30 21116
     31 21125
     32 21131
     33 21138
     34 21147
     35 21154
     36 21163
     37 21164
     38 21165
     39 21165
     40 21165
     41 21167
     42 21167
     43 21168
     44 21168
     45 21168
     46 21170
     47 21170
     48 21171
     49 21171
     50 21171
     51 21171
     52 21172
     53 21173
     54 21178
     55 21179
     56 21180
     57 21180
     58 21181
     59 21181
     60 21181
     61 21182
     62 21184
     63 21184
     64 21184
     65 21186
     66 21187
     67 21195
     68 21196
     69 21196
     70 21196
     71 21203
     72 21204
     73 21208
     74 21209
     75 21215
     76 21215
     77 21216
     78 21220
     79 21227
     80 21227
     81 21233
     82 21235
     83 21243
     84 21250
     85 21254
     86 21266
     87 21270
     88 21272
     89 21280
     90 21292
     91 21295
     92 21300
     93 21302
     94 21304
     95 21304
     96 21305
     97 21308
     98 21321
     99 21324
    100 21353
    end
    format %tdnn/dd/CCYY date



    Data Frame containing returns (Table name: Indicators)

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(fork_id date ret)
    1 18867            0
    1 18868            0
    1 18869   -.22314355
    1 18870            0
    1 18871   .027128667
    1 18872    .07723135
    1 18873            0
    1 18874  .0011254925
    1 18875            0
    1 18876    -.1054855
    1 18877    .06062462
    1 18878   -.13858616
    1 18879            0
    1 18880            0
    1 18881            0
    1 18882            0
    1 18883    -.2147331
    1 18884   -.07655911
    1 18885   -.07508215
    1 18886   -.05612696
    1 18887  .0041152323
    1 18888   .010214593
    1 18889 -.0040733255
    1 18890    .14418869
    1 18891            0
    1 18892   .010544913
    1 18893            0
    1 18894  -.007017573
    1 18895   .063107036
    1 18896   -.23144235
    1 18897    .02469261
    1 18898  -.020534603
    1 18899            0
    1 18900            0
    1 18901            0
    1 18902            0
    1 18903    .01032001
    1 18904   .022335954
    1 18905   -.01212136
    1 18906   -.02469261
    1 18907   -.04038806
    1 18908   -.14443663
    1 18909  -.025382074
    1 18910    .14788799
    1 18911   -.09531018
    1 18912   -.04234755
    1 18913    .01012667
    1 18914   .019950787
    1 18915            0
    1 18916            0
    1 18917   -.03262523
    1 18918            0
    1 18919            0
    1 18920    -.5596158
    1 18921   .013303965
    1 18922            0
    1 18923            0
    1 18924     .2518038
    1 18925   -.07095174
    1 18926  -.011090687
    1 18927            0
    1 18928     .4455433
    1 18929   -.06136895
    1 18930   -.12095261
    1 18931    -.0588405
    1 18932   .009049836
    1 18933            0
    1 18934            0
    1 18935     .0639753
    1 18936    -.1683353
    1 18937  -.016807118
    1 18938            0
    1 18939    .04312443
    1 18940    .06899287
    1 18941            0
    1 18942            0
    1 18943   .015037877
    1 18944            0
    1 18945    -.3047422
    1 18946    .01207258
    1 18947    .18232156
    1 18948  -.003338901
    1 18949   -.17898266
    1 18950  -.028399475
    1 18951    -.0250013
    1 18952   -.05195974
    1 18953    .14072765
    1 18954            0
    1 18955    .14695442
    1 18956   -.08701137
    1 18957   .007246409
    1 18958            0
    1 18959    -.0405212
    1 18960   .022305757
    1 18961    .15938903
    1 18962    .06961963
    1 18963   -.11778303
    1 18964  -.036855094
    1 18965            0
    1 18966            0
    end
    format %td date

    Thank you very much in advance and kindest regards,
    Niklas



  • #2
    Dear Niklas,

    This is most likely due to the non-stable sorting of nearmrg. Please search the Statalist on eventstudy2 and nearmrg. You will find solutions.

    Best Thomas Kaspereit

    Comment

    Working...
    X