Statalist The Stata Listserver


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

st: "unique" with "by"


From   "Shige Song" <[email protected]>
To   [email protected]
Subject   st: "unique" with "by"
Date   Wed, 19 Apr 2006 22:57:41 +0800

Dear Collegues,

I want to get count of unique values of a variable and I want to use
it conjuction with "by" like this:

sort hhid
by hhid: unique id

But unfortunately the UNIQUE command does not allow the use of "by".
Are there other options? Thanks!

Best,
Shige

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