Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: RE: RE: RE: Comparison operator, similar to "IN" in SAS?
From
"Martin Weiss" <[email protected]>
To
[email protected]
Subject
RE: st: RE: RE: RE: Comparison operator, similar to "IN" in SAS?
Date
Tue, 21 Sep 2010 01:05:48 +0200
<>
I am not sure, Anisa, that this is a good recommendation. The request was to have a qualifier set to one whenever a variable matches one of several values. How does the greater than operator address this issue?
HTH
Martin
-original message-
Subject: Re: st: RE: RE: RE: Comparison operator, similar to "IN" in SAS?
From: Anisa Shyti <[email protected]>
Date: 21-09-2010 00:41
Try the cond(.) function:
cond( x>y, 1, 0) where x>y can be anything you wish (including
multiple conditions in your list) and it returns 1 (or any
thing else) for true and 0 (or anything else) for false.
*
* 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/
*
* 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/