Speaking Stata: Matrices as look-up tables
Nicholas Cox
Stata Journal, 2012, vol. 12, issue 4, 748-758
Abstract:
Matrices in Stata can serve as look-up tables. Because Stata will accept references to matrix elements within many commands, most notably generate and replace, users can access and use values from a table in either vector or full matrix form. Examples are given for entry of small datasets, recoding of categorical variables, and quantile-based or similar binning of counted or measured variables. In the last case, the device grants easy exploration of the consequences of different binning conventions and the instability of bin allocation.
Keywords: matrices; vectors; data entry; recoding; quantiles; binning; look-up tables (search for similar items in EconPapers)
Date: 2012
References: View complete reference list from CitEc
Citations:
Downloads: (external link)
http://www.stata-journal.com/article.html?article=pr0054 link to article download
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:v:12:y:2012:i:4:p:748-758
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 ().