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 at the end of May, 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 09:14:32 +0000

Dear Stata List reader

I am working on a dataset with varaibles/values as shown below.

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


----------------------------------------------------
Observation   var1 var2 var3 var4   var5
----------------------------------------------------
Observation1  560.9 596.1 568 . 305.1
Observation2  355.8 441.4 496 . 530.81
Observation3  530.81 . . .
Observation4  568 530.81 . 414
Observation5  701.9 565.1 . .
Observation6  714 . 530.81 493.9 729.1
Observation7  564 . 305.1 789.04 .

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

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