DICHOCT: Stata module to dichotomizes a variable at a specified centile and generates a new variable containing the dichotomized values
Dirk Enzmann
Statistical Software Components from Boston College Department of Economics
Abstract:
dichoct dichotomizes varname at the specified centile and generates newvar containing the dichotomized values (0, 1). Dichotomizing a variable at a specific centile will not always result in an optimal split (for example, dichotomizing at values > or >= the centile value will yield different results -- especially if the value of the centile is frequent and is not exactly at the boundary of the interval including this value. dichoct chooses to include or to not include the centile value in the upper interval of the split (i.e. dichotomizes at values >= or > the centile value) so that an optimal split is achieved. "Optimal" means that the resulting percentages of the values of the dichotomized variable are closest to the desired percentages.
Language: Stata
Requires: Stata version 9.2
Keywords: data management; binary variables; percentiles (search for similar items in EconPapers)
Date: 2020-11-29
Note: This module should be installed from within Stata by typing "ssc install dichoct". The module is made available under terms of the GPL v3 (https://www.gnu.org/licenses/gpl-3.0.txt). Windows users should not attempt to download these files with a web browser.
References: Add references at CitEc
Citations:
Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/d/dichoct.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/d/dichoct.sthlp help file (text/plain)
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:boc:bocode:s458879
Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php
Access Statistics for this software item
More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().