Home  >>  Archives  >>  Volume 16 Number 1  >>  dm0087

The Stata Journal
Volume 16 Number 1: pp. 229-236



Subscribe to the Stata Journal
cover

Speaking Stata: Truth, falsity, indication, and negation

Nicholas J. Cox
Department of Geography
Durham University
Durham, UK
[email protected]
Abstract.  Many problems in Stata call for selection of observations according to true or false conditions, indicator variables flagging the same, groupwise calculations, or a prearranged sort order. The example of finding the first (earliest) and last nonmissing value in panel or longitudinal data is used to explain and explore these devices and how they may be used together. Negating an indicator variable has the special virtue that selected observations may be sorted easily to the top of the dataset.
Terms of use     View this article (PDF)

View all articles by this author: Nicholas J. Cox

View all articles with these keywords: true or false, logical, Boolean, indicator variable, dummy variable, sort, by, panel data, longitudinal data, programming, data management

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS