Announcement

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

  • Setting base year with interaction of continuous variable - panel data

    Hi.

    I am working with panel data, and have a continuous treatment variable x. I am interested in the effect a policy change in 2015. X is interacted with time-dummy for 2015.

    I have run this regression xtreg y i.year X*2015, fe vce(cluster id).

    I also want to look at the years prior to and after the policy change of the continuous treatment group, and I want to set 2014 as the base year.

    I have tried doing the following: xtreg y ib2014.year#c.x, fe vce(cluster id). But 2014 is not set as the base year, and year2016#x is omitted from the regression.


    Wanted output:

    Y
    year#c.x
    2009
    2010
    2011
    2012
    2013
    2015
    2016

    Thanks you in advance.



  • #2
    See https://www.statalist.org/forums/for...nuous-variable

    Comment


    • #3
      Espen:
      as as aside to Andrew's helpful link, being this one not the first post of yours on this forum, you should be already familiar with what follows:
      - please provide interested listers with an excerpt/example of your dataset via -dataex-;
      -please be clearer about the way you want to code -year-: are you looking for turning points? do you want to treat -year- as a categorical variable?
      Thanks.

      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Thank you Andrew.

        I am sorry for not using the dataex Carlo, and will do it the next time.

        I want to look at the pre and post trends of this variable X, and my assumption is that prior the the 2014 the estimates should be zero. And post policy shall be positive.

        X is a continuous treatment variable taking four values. I want to treat the year as a categorical variable yes, just an identification of the year.

        This is probably known as ATEs (not entirely sure).
        Last edited by Espen Hoff; 09 Apr 2021, 02:36.

        Comment

        Working...
        X