Home  >>  Archives  >>  Volume 14 Number 2  >>  dm0075

The Stata Journal
Volume 14 Number 2: pp. 432-444

Subscribe to the Stata Journal

Speaking Stata: Self and others

Nicholas J. Cox
Department of Geography
Durham University
Durham, UK
Abstract.  Data for people in a family, firms in a sector, or members of any kind of group are often analyzed using data for the other members in each group. Examples are the number of older children for each child in a family or the mean investment of other firms in the same year. Many such problems yield to simple logic, spelled out here in terms of useful Stata functions and commands. Operations under by:, or an equivalent by() option, are frequently called for, while the egen command offers a key tool for many calculations. Even when looping is needed, some helpful tricks can be identified.
Terms of use     View this article (PDF)

View all articles by this author: Nicholas J. Cox

View all articles with these keywords: groups, families, firms, counts, totals, means, by, egen

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS