Home  >>  Archives  >>  Volume 11 Number 2  >>  dm0055

The Stata Journal
Volume 11 Number 2: pp. 305-314

Subscribe to the Stata Journal

Speaking Stata: Compared with ...

Nicholas J. Cox
Department of Geography
Durham University
Durham, UK
Abstract.  Many problems in data management center on relating values to values in other observations, either within a dataset as a whole or within groups such as panels. This column reviews some basic Stata techniques helpful for such tasks, including the use of subscripts, summarize, by:, sum(), cond(), and egen. Several techniques exploit the fact that logical expressions yield 1 when true and 0 when false. Dividing by zero to yield missings is revealed as a surprisingly valuable device.
Terms of use     View this article (PDF)

View all articles by this author: Nicholas J. Cox

View all articles with these keywords: data management, panels, subscripting, summarize, by, sum(), cond(), egen, logical expressions

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS