Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Ordering a dataset by frequency


From   [email protected]
To   [email protected]
Subject   st: Ordering a dataset by frequency
Date   Mon, 05 Mar 2007 12:33:28 -0500

I have a dataset of 50,000 names. I need to order them by frequency so that the names that recur the most are at the top of the list, decreasing by frequency. Thus far I have used bigtab to tabulate the results, but I don't know how to order such a large dataset by freq. , since many commands are refused due to having "too many variables". The names are listed as string variables. I used encode name, gen(firstname) to create a new variable with numerical value, but when I use the sort command it sorts it into alphabetical order. Do you have any idea how I order the data by frequency? Thanks!
*
* 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