Amess Kevin --
Do you mean to
bys firm (year): gen difdummy=sum(dummy)
?
On 3/5/07, Amess Kevin <Kevin.Amess@nottingham.ac.uk> wrote:
I would very much appreciate help on the following problem. My panel
data contain both continuous and binary variables. I want to estimate a
model in first differences but would like to incorporate a binary
variable. So that the binary variable is not first-differenced out of
the equation I want to create difdummy (see below). Basically, I do not
know how to create difdummy. Below illustrates my data:
Firm year dummy difdummy
1 1993 0 0
1 1994 0 0
1 1995 1 1
1 1996 1 2
1 1997 0 2
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/