|
⇤ ← Revision 1 as of 2023-06-08 19:50:36
Size: 538
Comment:
|
← Revision 2 as of 2025-10-24 17:16:50 ⇥
Size: 560
Comment: Rewrite
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| The '''`sort`''' command re-orders rows of data. | '''`-sort-`''' re-orders cases. See also [[Stata/GSort|-gsort-]]. |
| Line 25: | Line 27: |
| [[https://www.stata.com/manuals/dsort.pdf|Stata manual for sort]] | [[https://www.stata.com/manuals/dsort.pdf|Stata manual for -sort-]] |
Stata Sort
-sort- re-orders cases.
See also -gsort-.
Contents
Usage
sort foo bar baz
Cases are sorted according to each key variable in ascending order. Missing values are treated as arbitrarily high. Labeled missing values (i.e. .a through .z) are ordered alphabetically (in terms of the label) after the unlabeled missing values (.).
