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: How to figure out the most common value


From   "Dudekula, Anwar" <[email protected]>
To   "[email protected]" <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index