Affiliation:
1. 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.
Subject
Mathematics (miscellaneous)