Speaking Stata: The largest five—A tale of tail values

3Citations
Citations of this article
9Readers
Mendeley users who have this article in their library.

This article is free to access.

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, cryptography, 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 calculations, indicator variables as a mode of selection, and egen as a Swiss Army knife with many handy functions.

Cite

CITATION STYLE

APA

Cox, N. J. (2022). Speaking Stata: The largest five—A tale of tail values. Stata Journal, 22(2), 446–459. https://doi.org/10.1177/1536867X221106436

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free