Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: DiD with panel data


From   Fiorenzo Bovenzi <fiorenzo.bovenzi@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: DiD with panel data
Date   Wed, 18 Feb 2009 13:21:01 +0000

Dear list,

I am trying to estimate a difference-in-difference model with panel
data, i.e. Yist (where s indicates the treatment/control group) as a
function of a dummy Dist equal to 1 for the treatment group after the
treatment occurs, and 0 otherwise.

The basic steps I follow to do this are:

tsset id_var t_var

xtreg Yist Dist, i(id_var) fe

However, when I use tsset, I receive the message "repeated time values
in sample" because units i are called the same in both the treatment
and control groups - e.g. same firm in country A (treatment) and
country B (control).

Is there a way to fix this, other than assigning a different id to
each unit in the treatment and control groups?  Many thanks,

fiorenzo
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index