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

st: st : creating a variable that counts frequencies of specific strings in a set of variables


From   "Jose Ignacio Pijoan Zubizarreta" <[email protected]>
To   <[email protected]>
Subject   st: st : creating a variable that counts frequencies of specific strings in a set of variables
Date   Thu, 4 Nov 2004 14:13:25 +0100

Dear statalist supporters,
I apologize for asking a question about a problem that probably is not very
difficult to solve given the flexibility of Stata 8 but, after looking into
several FAQ I cannot manage to find out the solution to it.

I have got a database with several secondary diagnoses dia2-dia13 coded
according to the ICD9-CM code system (the icd9 commands work well in all of
them). Some people have a given diagnosis ( e.g. 43840) as dia2 whereas
other patients can have it included in dia3 or  dia4 an so forth. Each
individual can have only once a specific diagnostic code. What I would like
to get is a new variable that counts the frequencies of every single
diagnostic code across all patients and variables no matter in which
position it does appear. This way I would be able to say that there are n
different patients with a specific code ( e.g. 43840) out of the total
sample.

Thanks a lot for your attention

Jose I Pijo�n
Unidad de Epidemiolog�a Cl�nica
Hospital de Cruces
Tel: 946006452
Fax: 946006451
email: [email protected]

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