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

st: RE: counting unique ids


From   "FEdMerchant" <[email protected]>
To   <[email protected]>
Subject   st: RE: counting unique ids
Date   Tue, 7 Sep 2004 18:54:24 -0700

-findit count unique- points to the following FAQ: How do I compute the
number of distinct observations? Do you have an additional requirement
that's not covered in the FAQ?

..Frank

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kang, Eugene
Sent: Tuesday, September 07, 2004 6:48 PM
To: '[email protected]'
Subject: st: counting unique ids

Hi,

I have a cross-section panel data that is unbalanced. For instance:
id	year		x1
111	1999		3
111	2000		5
111	2001		6
123	2000		4
123	2001		2

For the above example, there are 2 unique ids (111 and 123). Since my
dataset has over 6000 observations, what commands should I use to
generate a
count of unique ids?

Any help would be appreciated. Thanks!

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

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