Listmembers...
I just tried two related commands that I thought should yield
the same result... both should set the generated variable to 1
if -id- contains one of the numbers in -v()-:
. egen sex =eqany(id), v(1 2 7 8 17/22 25 26 39/42 45 46 53/58 61 62)
. egen sex1=eqany(id), v(1 2 7 8 17:22 25 26 39:42 45 46 53:58 61 62)
Note that the only difference (other than varname)
is the use of the colon vs slash in the -v(numlist)-.
The resulting Stata-generated var labels are:
sex: id == 1 2 7 8 17 18 19 20 21 22 25 26 39 40 41 42 45 46 53 54 55 56 57 58 61 62
sex1: id == 1 2 7 8 17 25 26 39 45 46 53 61 62
Unfortunately, the labels properly echo the values of the variables!
Is this an error or a misconception by me?
Tom Steichen
CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution, or reproduction of this message and/or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful.