Yes. You _can_ omit == 1 in this circumstance, but you need not do so if
you do not want to.
See also
FAQ . . . . . . . . . . . . . . . . . . . . . . . True and false in
Stata
2/03 What is true and false in Stata?
http://www.stata.com/support/faqs/data/trueorfalse.html
Nick
[email protected]
Ekaterina Hertog
Thank you again for the advice!
Sorry I am a bit confused where can I omit "==1"? The only place where I
see "==1" is in these lines:
replace mindesinc=7000 if desired_income_above_7000==1
Would it work if I write:
replace mindesinc=7000 if desired_income_above_7000
Or did you mean I should omit the "==1" bit when writing to the list?
Martin Weiss wrote:
> On your method, I would say this is the best way for a beginner to
think
> about such a problem and see how logically values get replaced based
on some
> condition. You can omit the "==1" part, btw.
>
*
* 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/