Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Binary variable after first-differencing


From   "Austin Nichols" <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Binary variable after first-differencing
Date   Mon, 5 Mar 2007 15:48:34 -0500

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/



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