Speaking Stata: The largest five-—A tale of tail values
Nicholas Cox
Stata Journal, 2022, vol. 22, issue 2, 446-459
Abstract:
How do you work with the largest five, or smallest five, or any other fixed number of values in a tail of a distribution? In this column, I give examples of problems and code for basic calculations as a prelude to graphics, tables, and more detailed analysis. The main illustration is analysis of concentration among firms or companies, with wider discussion mentioning hydrology, climatology, cryptog- raphy, and ecology. The examples allow a tutorial covering sorting and ranking and using if and in to select observations, by: as a framework for groupwise cal- culations, indicator variables as a mode of selection, and egen as a Swiss Army knife with many handy functions.
Keywords: by:; egen; if; in; ranking; sorting; tails; concentration; diversity; inequality (search for similar items in EconPapers)
Date: 2022
Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj22-2/dm0108/
References: Add references at CitEc
Citations:
Downloads: (external link)
http://www.stata-journal.com/article.html?article=dm0108 link to article purchase
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:tsj:stataj:v:22:y:2022:i:2:p:446-459
Ordering information: This journal article can be ordered from
http://www.stata-journal.com/subscription.html
DOI: 10.1177/1536867X221106436
Access Statistics for this article
Stata Journal is currently edited by Nicholas J. Cox and Stephen P. Jenkins
More articles in Stata Journal from StataCorp LLC
Bibliographic data for series maintained by Christopher F. Baum () and Lisa Gilmore ().