Announcement

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

  • Test Significance of the difference between two coefficients for regressions run using different time periods

    Hello,

    I am working with a panel data set of companies for the years 1998 - 2003. I do two difference-in-difference regressions for two different time periods and I would like to test the significance of the difference between the two coefficients of interest (treat x post).This is what I do in practical terms:

    - First I run this regression for the period 1998-2001 where "post" is a dummy taking the value 1 for the years 2000 and 2001 and zero otherwise and "treat" is a dummy taking the value one for my treated group and zero for the companies in the control group. The interaction term "treat_post" is my variable of interest

    xtreg y treated_post treat post if year>=1998 & year<=2001, fe cluster(id) robust

    - Secondly, I run the same regression for the period 2000-2003. Here the variable "post" takes the value 1 for the years 2002 and 2003 and zero otherwise. My treatment group remains the same.

    xtreg y treated_post treat post if year>=2000 & year<=2003, fe cluster(id) robust

    The first regression corresponds to the introduction of a new legislation and the second regression to its repeal.

    What I would like to do is to test whether the difference in absolute value between the coefficients associated to the variable "treated_post" is statistically significant. I get a positive coefficient in the first regression and a negative one in the second regression. That is why I would like to do the test for the absolute value of the coefficient.

    Thank you in advance

    Jose

  • #2
    You didn't get a quick answer. You'll increase your chances of a helpful answer if you follow the FAQ on asking questions - provide Stata code in code delimiters, Stata output, and sample data using dataex. Try to cut your code down to that which is necessary to demonstrate the problem.

    You can use dummy variables (look at the factor notation section of the documentation) to run both sets of regressions in one xtreg. G p1dum=(year>=2000 & year<=2003). Then you can probably run xtreg y i.p1dum##(treated_post treat post) , fe cluster(id) robust. This would impose some additional assumptions (e.g., that the fe are the same in both), but that's probably not a problem. You will need to have c. before any continuous variables. If you really care, you can generate a new set of panel identifiers that have different values for each panel in the two time periods and use that as your xtset. This would also let you have the different clusters on errors.

    Alternatively, you could use sur with i.id as a rhs variable which should be equivalent to xtreg fe. I don't think you can do this with the robust se's though.

    Comment

    Working...
    X