Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: -levels- available from SSC


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: -levels- available from SSC
Date   Tue, 16 Jul 2002 23:10:02 +0100

Thanks to Kit Baum, a -levels- program is now
available from SSC.

-levels- displays a sorted list of the distinct values of varname,
which should be a variable taking on integer or string values, or in
other words, a categorical variable, very broadly so defined.

It may be useful when it is desired to cycle through the
distinct values of varname with (say) -foreach-. -levels-
leaves behind a list in r(levels) which may be used in a
subsequent command. Optionally, the list may be inserted
as a local macro within the calling program's space.
-levels- is considered to be -vallist- (STB-60, same author) done
better.

Stata 7 is required.

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