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

Re: st: Counting unique strings


From   Philip Ryan <philip.ryan@adelaide.edu.au>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Counting unique strings
Date   Thu, 26 Feb 2004 09:16:21 +1030

Michael Hills' program -unique- (available from SSC) should help here.

see also -duplicates tag- and -egen..group()- (both part of official Stata) for other possible approaches.

Phil

At 09:48 PM 25/02/2004 +0000, you wrote:

Hi,

I have a database of 40,000 clinic visits, with multiple visits by each patient (patient_id). How do I count the number of patients seen?

Thanks

patient_id
CGHC:FP:0002
CGHC:FP:0002
CGHC:FP:0002
CGHC:FP:0002
CGHC:FP:00144
CGHC:FP:00144
CGHC:FP:00150
CGHC:FP:00150
CGHC:FP:00150
CGHC:FP:00150
CGHC:FP:00155
CGHC:FP:00155
CGHC:FP:00159
CGHC:FP:00159
CGHC:FP:00160
CGHC:FP:00160
CGHC:FP:00162
CGHC:FP:00162
CGHC:FP:00163
CGHC:FP:00163
CGHC:FP:00175
CGHC:FP:00175
CGHC:FP:0018
CGHC:FP:0018
CGHC:FP:0018
CGHC:FP:00185
CGHC:FP:00185
CGHC:FP:0020
CGHC:FP:0020
CGHC:FP:00217
CGHC:FP:00219
CGHC:FP:00219

Dr Paul O'Brien
Westside Contraceptive Services
Raymede Clinic, Exmoor St, London
W10 6DZ
020 8962 4450 - tel
020 8962 4451 - fax
07900 495 118 - mob

*
* 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/
Philip Ryan
Associate Professor,
Department of Public Health
Associate Dean (Information Technology)
Faculty of Health Sciences
University of Adelaide 5005
South Australia
tel 61 8 8303 3570
fax 61 8 8223 4075
http://www.public-health.adelaide.edu.au/
CRICOS Provider Number 00123M
-----------------------------------------------------------
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index