Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: How to figure out the most common value


From   "Dudekula, Anwar" <dudekulaan@upmc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: How to figure out the most common value
Date   Mon, 28 Nov 2011 10:19:49 +0000

Thank you Nick for the reply

I am trying to work on the solution that you suggested

You are right, these are ICD 9 codes ( as strings) .

Also, some of the patients have repeat admissions(I found  out while working on the dataset)

Hence, the new/updated dataset  is as follows

----------------------------------------------------
Observation   var1 var2 var3 var4   var5
----------------------------------------------------
Patient 1     560.9 596.1 568 . 305.1
Patient 2     355.8 441.4 496 . 530.81
Patient 1     530.81 . . .
Patient 3     568 530.81 . 414
Patient 4     701.9 565.1 . . .
Patient 3     714 . 530.81 493.9 729.1
Pateint 3     564 . 305.1 789.04 .

----------------------------------------------------

Question: Is there a stata code which can tell me the top 5 most common values  occuring among the all the variables (var1-var)


Thank you

Sincerely
Anwar

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