How to Sort in Ascending and Descending Order in Stata

Published: 29 August 2022
on channel: The Data Hall
2,753
11

Soting a variable in Ascending order is done using sort command in stata, however, sort command cannot be used for descending order. For sorting in descending order we use gsort in stata. Further we can also sort on multiple varaibles or keep the missing values first or generate a variable based on sorting.

00:00 Intro to sort command
0:57 Sort in ascending order single
1:21 Sort on multiple variables
3:00 Stable option
7:15 gsort for descending order

Download Do/Data file from the following link:
https://thedatahall.com/using-sort-co...

Best 10 Introductory Econometrics Books
https://thedatahall.com/best-10-intro...

Data Management Using Stata: A Practical Handbook by Michael N. Mitchell
https://amzn.to/3HEULlc

A Gentle Introduction to Stata, by Alan C. Acock
https://amzn.to/3HBgdY4
https://amzn.to/3LWOALz (paperback)

A Visual Guide to Stata Graphics, by Michael N. Mitchell
https://amzn.to/42qLpkG

Regression Models for Categorical Dependent Variables Using Stata, by J. Scott Long and Jeremy Freese
https://amzn.to/3NDoFtC

STATA Guide for Introductory Econometrics for Finance by Chris Brooks
https://amzn.to/3LzONmB

Website: thedatahall.com

Disclaimer: Some links are affiliate links that help the channel at no cost to you.


Watch video How to Sort in Ascending and Descending Order in Stata online without registration, duration hours minute second in high quality. This video was added by user The Data Hall 29 August 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,753 once and liked it 11 people.