Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Descriptive statistics - counting aspects of a variable


From   Amal Khanolkar <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Descriptive statistics - counting aspects of a variable
Date   Sun, 3 Jun 2012 14:24:07 +0000

Hello all,

I have a variable XX that describes various diagnoses that my subjects might have. Diagnoses are coded using the usual ICD 8-10 codes. While most diagnoses are just numerical, some end with an alphabet, for e.g. 618A or 720H.

I can ask Stata to tell me how many subjects in my dataset have diagnoses 618 by:

count if XX==616

However how do I find out how many have a diagnoses with numbers in combination with letters (like 618A). Stata isn't able to tell me using the 'count' or 'sum' commands as above.

Thanks,

/Amal.



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index