Announcement

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

  • Event study analysis

    Hello!

    I want to perform and event study analysis in Stata. However, I do not know how to do it. Could you please guide me on the basics?

    Thank you.

    Nikos

  • #2
    A web search of event study analysis stata turns up this as its first result, which may be a useful place to start.

    http://dss.princeton.edu/online_help...ventstudy.html

    Comment


    • #3
      Hi Nikos,

      If you want you can try to use this stata program that we have create to perform event studies. You find the .ado file, the companion help file and a stata journal paper that illustrates both the technique and the program functioning at the following link: https://www.researchgate.net/project...estudy-command.

      If you need any other help feel free to ask.

      Best,

      Andrea

      Comment


      • #4
        Hello,

        Code:
        * Example generated by -dataex-. To install: ssc install dataex
        clear
        input long location float lconsum byte(randomgrp heatscore) float(calday calmonth daymntemp tp treatalt tr_alt_heat treat_numb_of_month tr_alt_heat_month)
        500001  4.332319 0 8 20820 684        -12 0 0 0 -397 0
        500001  4.396276 0 8 20821 684     -17.85 0 0 0 -396 0
        500001 4.4473995 0 8 20822 684 -22.141666 0 0 0 -395 0
        500001 4.4349075 0 8 20823 684   -15.2875 0 0 0 -394 0
        500001 4.3301753 0 8 20824 684    -10.625 0 0 0 -393 0
        500001  3.985716 0 8 20825 684        -14 0 0 0 -392 0
        500001 4.2141517 0 8 20826 684 -18.729166 0 0 0 -391 0
        500001 4.4054755 0 8 20827 684   -18.2625 0 0 0 -390 0
        500001 4.2378565 0 8 20828 684  -19.46667 0 0 0 -389 0
        500001 4.3244976 0 8 20829 684    -18.925 0 0 0 -388 0
        end
        format %td calday
        format %tm calmonth
        I have panel data for 2017-2018. It is a RCT. The treatment (started on February 2, 2018) is actually a specific type of a bill sent to a household which includes a comparison between a household’s energy use and its neighbors, as well as contains a specific photograph of a household’s home showing its energy use. It is expected that the treatment will reduce the energy use of treated households.

        My model specification is a diff-in-diff estimator that models energy use conditional on treatment group indicator, post-treatment indicator, heatscore indicator, month-of-year indicators, linear time trend indicators, non-linear control for temperature (‘mkspline’ command), as well as household fixed effects. This is to be estimated in OLS using standard fixed effects estimator, using robust standard errors, clustered by household.

        My variables:

        location; household’s location id
        lconsum; log of energy consumption
        tp; post-treatment variable; gen tp = (calday >= td(02feb2018))
        randomgr; one of three treatment groups (can be 0,1,2,3)
        heatscore; score of a household based on its photograph (can be 1,2,…,10);
        calday; day and year 01jan2017
        calmonth; month and year 2017m1
        daymntemp; temperature
        treatalt; gen treatalt = (calday >= td(02feb2018) & randomgrp>0)
        tr_alt_heat; treatment indicator; gen tr_alt_heat = treatalt*heatscore

        I have the following code for a diff-in-diff model of my data (as discussed https://www.statalist.org/forums/for...erences-model/, the estimation can be done in a different way – for example, with xtreg and/or using a full factorial – but I was asked to use this code):
        mkspline daymntemp1 17.222221 daymntemp2 21.111111 daymntemp3 23.888889 daymntemp4 = daymntemp
        areg lconsum tr_alt_heat tp daymntemp1-daymntemp4 i.month c.calmonth, absorb(location) vce(cluster location)

        Now, I need to do an event study.

        First, I generate a variable showing the number of days before/after the date when the treatment starts:
        gen treat_numb_of_month = calday-td(02feb2018)

        Then, I guess, I should generate the interaction between my treatment variable, tr_alt_heat, and the one I have just created:
        gen tr_alt_heat_month = tr_alt_heat*treat_numb_of_month

        Now, the code for the event-study regression:
        areg lconsum tr_alt_heat_month tp daymntemp1-daymntemp4 i.month c.calmonth, absorb(location) vce(cluster location)

        1. I am not sure about the code above.
        2. In addition, I need to draw an event-study figure; if I am not mistaken, it should have treat_numb_of_month on the x-axis and the coefficient for the interaction variable, tr_alt_heat_month, on the y-axis. I do not know how to plot the figure. Actually, I tried using coefplot but it only plots the coefficient value, without treat_numb_of_month on the x-axis; I also tried scatter, but I cannot plot the coefficient in this case.

        Thank you in advance!

        Comment


        • #5
          - ssc install eventstudy2 - User-written program, very helpful and with many tests (both parametric and non-parametric) in order to assess the significance of AARs or CAARs.

          Comment


          • #6
            Nicu, thank you. I read the command's description, but I am not sure if this command can be applied to non-financial data.

            Comment


            • #7
              Hi
              I want to run eventstudy2 in stata but can't understand the 'date' variable at the beginning, is it the specific eventdate or the usual dates dates assigned against each id.
              In STAT help window it says ''date is the name of the of the event date variable in the event list that is currently held in memory".

              Comment


              • #8
                Hello!
                In the context of event study discussion I would like to find out whether it is possible to conduct event study in Stata using panel data with year time dimention. In particular, whether some similar to estudy command exits and whether in general it makes sense to use methodology of event studies to the yearly data for IDs?
                My research question is related to the effect of introduction of tradability restriction (in particular year) on the productivity.

                I would be very grateful for your help.
                Thank you.

                Olha

                Comment


                • #9
                  Hi Statalists,
                  Can someone assist me with the Command on how to calculate AAR and CAAR as well as the t-test for all the companies?

                  Comment


                  • #10
                    Hi all,

                    My study: I have two periods that I will evaluate; 2008 - 2013 and then 2014 - 2018. I have a total of 63 baseline events - 23 in the 2008 - 2013 period and 40 in the 2014 - 2018 period - and I am using open/close data. Due to data access, I was unable to obtain intraday data (for less than £1500) but I feel using the open/close data will enable me to provide a broad view and still comment on any pre-announcement drift and lasting effects of FOMC news (thus commenting on efficient market theory). To that end, I would like to evaluate the way in which the Dow anticipates FOMC news 3 days prior to the announcement and the way in which news is incorporated, 3 days after the event.

                    The majority of event studies I have seen appear to evaluate a stock against an index (eg. apple against the S&P 500 is very common) to thus estimate normal performance, abnormal and cumulative abnormal returns, as well as being able to test for significance. Is it possible to conduct an event study with just the Dow Jones?

                    I am unsure whether anyone has any direction regarding the use of stata but I also had the idea to evaluate the effects of unscheduled meetings - so effectively, another set of events. I considered using dummies/ changing (d.var d2.var etc) for x days – leading and lagging (1, 2,3, 4 ) to see if there is any reaction and whether it is more dramatic or not of the scheduled meetings. I suppose they would be in reaction to shocks and a such not working in the same way as the schedule ones. I have done something similar on a project that was not finance related so excuse the novice approach but is this something that could still be done using for example, eventstudy2?

                    I have read the 'help eventstudy2' and when setting up my data, I cannot figure what my security_id should be, as I presume the it is not the price of the DJIA.

                    Attached in a copy of my data prepared for excel. I have manually calculated cumulative returns for the whole index, for both periods and I have further calculated cumulative returns for the index over the whole period and removed the event days - this will allow me to compare event-days versus all other trading days.

                    Thanks in advance.
                    Attached Files

                    Comment

                    Working...
                    X