Statalist


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

st: RE: Testing equality of multiple values


From   "Newson, Roger B" <[email protected]>
To   <[email protected]>
Subject   st: RE: Testing equality of multiple values
Date   Tue, 18 Sep 2007 22:15:56 +0100

The -inlist()- function might possibly be useful here, if the macros'
names are not very long, and if there are not too many of them. In
Stata, type

whelp function

for help on functions (such as -inlist()-).

I hope this helps.

Roger


Roger Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected] 
Web page: www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/pop
genetics/reph/

Opinions expressed are those of the author, not of the institution.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Zachary Neal
Sent: 18 September 2007 21:55
To: [email protected]
Subject: st: Testing equality of multiple values

Hi,

I have 26 local macros defined, named a-z.  Is there a
simpler way to test whether `a' is equal to any of the
other macros b-z than: `a'==`b' | `a'==`b' | ... |
`a'==`z'?

Thanks
Zachary

-----------------
Zachary Neal, ABD
Managing Editor, City & Community
University of Illinois at Chicago
[email protected]


       
________________________________________________________________________
____________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+ki
ds&cs=bz 

*
*   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/

*
*   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