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

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



Subscribe to the Stata Journal
cover

Speaking Stata: Self and others

Nicholas J. Cox
Department of Geography
Durham University
Durham, UK
n.j.cox@durham.ac.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.
Buy article (PDF): $11.75 View cart
Buy entire issue (PDF): $24.75

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