Announcement

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

  • How to account for time specific effects?

    Dear Statalist,

    I am looking at the effect of an environmental treaty on greenhouse gas emissions, using 140 countries across a 24 year period (1990-2013).

    Using a panel model (fe estimator), I run xtreg yit x1it ...xnit, fe, where "xnit" is my treaty variable, a dummy which takes the value 1 from the year a country has ratified this treaty.

    I am interested in a specific period of time (2008-2012) for which the treaty was active, and so add another dummy, which will capture this period effect. However, I would like to introduce a time trend, or some year specific effect that I can interact with this dummy, to see what it's contribution was over and above the time effect. I am unsure as to how I would do this.

    Thank you in advance, and apologies if I have not been clear.

    Usman

  • #2
    You'll get more helpful responses if you follow the FAQ on asking questions - provide Stata code using code delimiters, Stata output, and sample data using dataex. Also, simplify your code to the minimum needed to demonstrate the problem.

    If you want annual dummies, just include i.year among your regressors. You also can easily create a dummy for years 2008-2012 by "g treaty=(year>2007 & year<2013)". A time trend can be done simply by including the year variable as a regressor. You can interact any of these with your variables by using the factor variable notation (look it up in the documentation - for two discrete variables it would be i.x1#i.x2 ).

    Comment

    Working...
    X