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

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



Subscribe to the Stata Journal
cover

Speaking Stata: Compared with ...

Nicholas J. Cox
Department of Geography
Durham University
Durham, UK
n.j.cox@durham.ac.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.

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

Contact StataCorp

Contact service@stata-journal.com if you have questions about the Stata Journal.

© Copyright 2001–2014 StataCorp LP.   Terms of use.   Privacy policy.