Statalist The Stata Listserver


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

Re: st: Can Stata -generate- a dummy variable with 2+ 'overlapping' -if- conditions?


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: Can Stata -generate- a dummy variable with 2+ 'overlapping' -if- conditions?
Date   Sun, 24 Sep 2006 20:45:54 +0100 (BST)

Philipp Rehm proposed:

> . g cl1=1 if clmarg>=.95 & clmarg<=1.05 & conlab==1

and Ronnie Babigumira followed up with:

> . g cl1 = conlab == 1 & (clmarg>=.95 & clmarg<=1.05)

Both of these solve my puzzle, but Ronnie's solution is the prizewinner
for filling in those zeroes: just what I needed!

Thanks to both of you.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index