EconPapers    
Economics at your fingertips  
 

Speaking Stata: Tables as lists: From rounding to binning

Nicholas Cox

Stata Journal, 2018, vol. 18, issue 3, 741-754

Abstract: This is a basic review of how to bin variables in Stata, meaning how to divide their range or support into disjoint intervals. I survey rounding functions with emphasis on floor and ceiling functions as tools to get clearly defined intervals of equal width. Using a specific display format is usually a better idea than rounding to multiples of a fraction. Quantile binning is popular in several fields. I give tips and tricks on how to produce such bins and also on how to show their limitations. Experimentation with the display command or Mata is a good way to learn about functions and to test binning rules.

Keywords: binning; rounding; format; display; quantiles (search for similar items in EconPapers)
Date: 2018
Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-3/dm0095/
References: Add references at CitEc
Citations:

Downloads: (external link)
http://www.stata-journal.com/article.html?article=dm0095 link to article purchase

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:tsj:stataj:y:18:y:2018:i:3:p:741-754

Ordering information: This journal article can be ordered from
http://www.stata-journal.com/subscription.html

Access Statistics for this article

Stata Journal is currently edited by Nicholas J. Cox and Stephen P. Jenkins

More articles in Stata Journal from StataCorp LLC
Bibliographic data for series maintained by Christopher F. Baum () and Lisa Gilmore ().

 
Page updated 2025-03-29
Handle: RePEc:tsj:stataj:y:18:y:2018:i:3:p:741-754