Announcement

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

  • -xtevent- Stata module to estimate and visualize linear panel event-study models now available on SSC

    It's been a while since I posted anything to Statalist!!!

    Thanks to Kit Baum, -xtevent- is now available on SSC.

    -xtevent- provides commands to estimate linear panel event-study models, create event-study plots, and conduct hypothesis tests after estimation. It implements the plotting suggestions and many of the estimators discussed in Freyaldenhoven et al. (2021).

    Here's the companion paper:

    https://www.nber.org/papers/w29170

    Here's an ungated version:

    https://www.brown.edu/Research/Shapi...EventStudy.pdf

    Here's a Twitter thread summarizing the paper in 4 short tweets:

    https://twitter.com/jorpppp/status/1430592541083062272

    And here you can see it in action!
    Click image for larger version

Name:	Animation.gif
Views:	1
Size:	1.18 MB
ID:	1627509

    Jorge Eduardo Pérez Pérez
    www.jorgeperezperez.com

  • #2
    Hi Jorge Eduardo Perez Perez , thank you for creating this! I am curious to learn more about the policyvar variable. If I have a policy that went into effect in a given year but I don't have any other specific information data (other than year), can I still use this module? Do I make a dummy for the year? Or is it not possible to use the module in this case? And how should I set up the window variable? I keep on getting the error "Window outside event-time range" r(198), no matter what number I put into the window().

    Comment


    • #3
      Originally posted by Jorge Eduardo Perez Perez View Post
      It's been a while since I posted anything to Statalist!!!

      Thanks to Kit Baum, -xtevent- is now available on SSC.

      -xtevent- provides commands to estimate linear panel event-study models, create event-study plots, and conduct hypothesis tests after estimation. It implements the plotting suggestions and many of the estimators discussed in Freyaldenhoven et al. (2021).

      Here's the companion paper:

      https://www.nber.org/papers/w29170

      Here's an ungated version:

      https://www.brown.edu/Research/Shapi...EventStudy.pdf

      Here's a Twitter thread summarizing the paper in 4 short tweets:

      https://twitter.com/jorpppp/status/1430592541083062272

      And here you can see it in action!
      [ATTACH=CONFIG]n1627509[/ATTACH]
      Jorge Eduardo Perez Perez sorry for the question, I am not familiarized with event studies. -xtevent- expects a dichotomous variable for the policy. Can you point to a good reference on how to "convert" a continuous variable to an "event", say, a change in direction in R&D investments or something similar?

      Comment


      • #4
        Dear Jorge Eduardo Perez Perez, I have a question regarding the window option: I have a balanced panel dataset from 2004 to 2020 (and 113 firms as panel variable) and I have also created my policy dummy variable that indicates the firm-year instance where the event took place, similar to the union variable in the example code. Hence, I have 17 time periods in total and the event starts in 2011 and last til 2020 so 10 time periods. When I put w(8) for symmetric time windows or w (-7 9) for assymetric, I get the error "Window outside event-time range". Similarly I also tried to use the year integers to identify the window (i.e. w(2004 2020)) but i get the error "Window can not be negative". I checked and everything else is as in the example (xtset specified, policy variable specified). Do you have an idea what could be wrong with my window specification?

        Comment


        • #5
          Dear Jorge Eduardo Perez Perez, I have a question regarding the window option: I have a balanced panel dataset from 2004 to 2020 (and 113 firms as panel variable) and I have also created my policy dummy variable that indicates the firm-year instance where the event took place, similar to the union variable in the example code. Hence, I have 17 time periods in total and the event starts in 2011 and last til 2020 so 10 time periods. When I put w(8) for symmetric time windows or w (-7 9) for assymetric, I get the error "Window outside event-time range". Similarly I also tried to use the year integers to identify the window (i.e. w(2004 2020)) but i get the error "Window can not be negative". I checked and everything else is as in the example (xtset specified, policy variable specified). Do you have an idea what could be wrong with my window specification?
          I had the same issue. You may want to try window(-6 8)

          Comment


          • #6
            Originally posted by Iuri Gavronski View Post

            Jorge Eduardo Perez Perez sorry for the question, I am not familiarized with event studies. -xtevent- expects a dichotomous variable for the policy. Can you point to a good reference on how to "convert" a continuous variable to an "event", say, a change in direction in R&D investments or something similar?
            Iuri Gavronski -xtevent- works with continuous policy variables too!

            Jorge Eduardo Pérez Pérez
            www.jorgeperezperez.com

            Comment


            • #7
              Originally posted by John Singer View Post
              Hi Jorge Eduardo Perez Perez , thank you for creating this! I am curious to learn more about the policyvar variable. If I have a policy that went into effect in a given year but I don't have any other specific information data (other than year), can I still use this module? Do I make a dummy for the year? Or is it not possible to use the module in this case? And how should I set up the window variable? I keep on getting the error "Window outside event-time range" r(198), no matter what number I put into the window().
              John Singer The policy variable in this case should be an interaction of a dummy for time after the policy and a dummy for the treated units.
              Jorge Eduardo Pérez Pérez
              www.jorgeperezperez.com

              Comment


              • #8
                Thanks to everyone who has been following this thread. Check out the thread for the new version of -xtevent- here:

                https://www.statalist.org/forums/for...updated-on-ssc
                Jorge Eduardo Pérez Pérez
                www.jorgeperezperez.com

                Comment

                Working...
                X