Statalist The Stata Listserver


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

st: alt to inlist?


From   "Danielle H. Ferry" <dferry@nber.org>
To   statalist@hsphsun2.harvard.edu
Subject   st: alt to inlist?
Date   Mon, 23 Jan 2006 17:00:00 -0500

Hi all,
Is there something like inlist which does not require that all arguments
exist? I would like to keep observations where varname = a or b or c or d or
... But  it could be that varname never takes the value of d. Another issue is
that my list of arguments is v. long (~145), so a simple or statement is not
possible. I found a stata faq that suggested using inlist, but this doesn't
like it when one of the arguments in the list doesn't exist, and my varname is
a string, so I'd have to write many of these inlist statements (b/c the limit
is 10). 
Thanks.
Danielle H Ferry

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