Speaking Stata: How best to generate indicator or dummy variables
- 14 March 2019
- journal article
- research article
- Published by SAGE Publications in The Stata Journal: Promoting communications on statistics and Stata
- Vol. 19 (1) , 246-259
Abstract
Indicator or dummy variables record whether some condition is true or false in each observation by a value of 1 or 0. Values may also be missing if truth or falsity is not known, and that fact should be flagged. Such indicators may be created on the fly by using factor-variable notation. tabulate also offers one method for automating the generation of indicators. In this column, we discuss in detail how otherwise to best generate such variables directly, with comments here and there on what not to do.Keywords
This publication has 13 references indexed in Scilit:
- Speaking Stata: Truth, Falsity, Indication, and NegationThe Stata Journal: Promoting communications on statistics and Stata, 2016
- Speaking Stata: Fun and Fluency with FunctionsThe Stata Journal: Promoting communications on statistics and Stata, 2011
- Speaking Stata: RowwiseThe Stata Journal: Promoting communications on statistics and Stata, 2009
- Statistical Models2009
- Stata Tip 39: In a List or Out? In a Range or Out?The Stata Journal: Promoting communications on statistics and Stata, 2006
- Probability via Expectation2000
- Two Notes on NotationThe American Mathematical Monthly, 1992
- A programming language1962
- Estimating Patterns of Savings Behavior from Sample Survey DataEconometrica, 1951
- An Application of Sequential Analysis to Whitefish Sampling1950