Hi, is there any way to show the frequency table by descending order of frequency?
For, example, I want to see the below table from the highest frequency to the lowest frequency.
Thank you.
|
| A B | Total
-----------+----------------------+----------
-1 | 94 24 | 118
64 | 1 0 | 1
160 | 579 65 | 644
329 | 1 0 | 1
635 | 155 172 | 327
...
6970 | 44 7 | 51
7138 | 0 1 | 1
715
-----------+----------------------+----------
Total | 3,057 713 | 3,770
Pearson chi2(61) = 782.0937 Pr = 0.000
For, example, I want to see the below table from the highest frequency to the lowest frequency.
Thank you.
|
| A B | Total
-----------+----------------------+----------
-1 | 94 24 | 118
64 | 1 0 | 1
160 | 579 65 | 644
329 | 1 0 | 1
635 | 155 172 | 327
...
6970 | 44 7 | 51
7138 | 0 1 | 1
715
-----------+----------------------+----------
Total | 3,057 713 | 3,770
Pearson chi2(61) = 782.0937 Pr = 0.000

(the last comment is from 2015). I used the solution proposed by Nick in his post#6 and it worked (thanks Nick). The table I get by using this method is good but I need to ask Stata to: (i) show only those observations that have a frequency higher than a certain number, and (ii) to display the table in let's say 10 lines with breaks (I know how to do this with "list" but not with groups) because it is very long so when stata produces it then I can scroll up from the bottom and cannot see the entire table. I hope my explanation is not too confusing. Thank you. Juan
Comment