Hi all,
I'm new to the list. Can anyone direct me to an efficient, preferrably
already existing way to get the unique values of a categorical variable into
a macro. The goal is just like creating a "by", but I need to have the
unique values list. Let's say I can get the unique values in the macro
uniqlist.
I then want to be able to loop over all unique values in the list
Foreach uniqval of local `uniqlist' {
execute code
}
Thanks,
Steve
Stephen R. Hale, Ph.D.
Complex Systems Research Center
Institute for Study of Earth, Oceans, and Space
Morse Hall
University of New Hampshire
Durham, NH 03824-3525
Work 603.862.4758
Fax 603.862.0188
Home 603.664.4036
[email protected]
*
* 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/