webuse grunfeld,clear
g linv = log(invest)
g dlinv = D.linv
g lval = log(mvalue)
g dlval = D.lval
local thres1 0.06
local thres2 -0.02
g both = (dlinv>`thres1') & (dlval<`thres2') if dlinv+dlval<.
l company year dlinv dlval both
Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* 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/