Announcement

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

  • Changing base category in xtdidregress command

    Hi everyone. I am using the command xtdidregress to estimate a diff-in-diff regression on Stata. It looks like this:

    Code:
    xtdidregress (score) (treat_variable), group(firm) time(year) aequations allbaselevels
    My time variable, year, goes from 2008 to 2017. I am using fixed effects for year in my regression. When I use the command xtdidregress, it takes the first year, 2008, as the base (omitted) category in my regression. However, I would like Stata to take 2013 as my base category. Is there a way I can do that? Typing help xtdidregress did not help me much.

    Thank you!

  • #2
    Hi Federico,

    You could use the -nogteffects- option. This option tells the command to not include time fixed effects by default in this case. You would then have to include the time dummies on the first parenthesis. In your case it would look something like:

    Code:
     xtdidregress (score ib2013.year) (treat_variable ), group(firm) time(year) aequations allbaselevels nogteffects
    Last edited by Enrique Pinzon (StataCorp); 17 Feb 2022, 08:52.

    Comment


    • #3
      It worked, thank you so much Enrique!

      Comment

      Working...
      X