3
$\begingroup$

I have a panel data set with yearly observations of various firms over a period of 5 years. I am running a fixed effects model in Stata using xtreg. Is it problematic to include a dummy variable for individual years, since I have yearly observations? (I would exclude a reference dummy.)

Here is the Stata code I would be using:

xtreg y x i.year, fe
$\endgroup$
3
  • $\begingroup$ Have you xtset your data? $\endgroup$ Dec 9, 2014 at 19:59
  • $\begingroup$ He must have, otherwise xtreg provides an error message. $\endgroup$
    – Andy
    Dec 9, 2014 at 20:05
  • $\begingroup$ Yes, the xtset command has been performed. $\endgroup$ Dec 9, 2014 at 20:28

1 Answer 1

3
$\begingroup$

It's not problematic and is even a good idea. The year dummies will pick up any variation in the outcome that happen over time and that is not attributed to your other explanatory variables. The other thing with fixed effects estimation in Stata is that many people are deceived by the xtset command where you can set a panel and a time variable. Only the panel variable is used to eliminate the individual (or in this case firm) fixed effects but it does nothing about the time fixed effects. So xtreg will perform the within transformation using the specified panel id but if you want to control for year fixed effects you need to include the dummies as you suggest.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.