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

Re: st: tab diagnoses


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
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: roger.newson@kcl.ac.uk

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