Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: the fastest way to check if unique values of a variable > 100
From
László Sándor <[email protected]>
To
[email protected]
Subject
st: the fastest way to check if unique values of a variable > 100
Date
Sun, 25 Aug 2013 12:18:23 -0400
Hi,
Currently I think it is worth a quiet -cap tab- to catch the error
r(134) or r(r). But it still can be a wasteful operation, as tabbing
does work for many thousands of observations. And of course it does
more than simply count the unique values.
However, -inspect- or -codebook- are even worse as they keep counting
even if I mistakenly throw in a continuous variable, plus they also
calculate many things extra.
Is there a fast approach I am not aware of?
Thanks,
Laszlo
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/