Announcement

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

  • Difference in Difference Regression using xtdidregress comand

    Hi all,

    I am doing a diff- in diff regression model and currently use the xtdidregress command. While the xtreg command allows for the option cluster to cluster the standard error on my randomization unit, the xtdidregress command does not allow any options. Are there workaround to use the xtdidregress command while clustering the standard errors on the unit of randomization to fight autocorrelation? Or is the new xtdidregress command already including clustering based on treatment groups?

    Thanks,

    Felix

  • #2
    You have the -group()- option that allows you to specify the cluster variable.

    Code:
    xtset id year
    xtdidregress (y x1 x2 ...) (treatvar), group(groupvar) time(timevar)

    In the output, you should see "(Std. err. adjusted for XX clusters in groupvar)".

    Comment

    Working...
    X