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

Re: st: tab diagnoses


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: tab diagnoses
Date   Mon, 11 Nov 2002 20:33:01 +0000

At 14:17 11/11/02 -0600, Rodrigo Brice�o wrote:
Hi friends!
From an hospital database I need to obtain the frequency of caesareans and
fisiologic deliveries (in spanish: Puerperio quir�rgico, Puerperio
fisiol�gico). My problem is that not all the diagnoses have a correct
spelling, so I need to make the tabulates choosing only the word "Puerperio"

I think that I only need the end of this command:

tab diagn if diagn=="PUERPERIO....
If you type

tab diagn if index(lower(diagn),"puerperio")>0

then you will get a tabulation of all diagnoses containing the word "puerperio" in upper and/or lower case, assuming that people have spelt "puerperio" right. If people sometimes mis-spell "puerperio" as "perperio", then you might type

tab diagn if (index(lower(diagn),"puerperio")>0)|(index(lower(diagn),"perperio")>0)

The various string functions (including -index-) are listed in -[U] 16.3.5 String Functions-. I do not know if it is possible to list all possible mis-spellings of "puerperio".

I hope this helps.

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]

Opinions expressed are those of the author, not the institution.

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