IDEAS home Printed from https://ideas.repec.org/a/tsj/stataj/v12y2012i4p748-758.html
   My bibliography  Save this article

Speaking Stata: Matrices as look-up tables

Author

Listed:
  • Nicholas J. Cox

    (University of Durham, UK)

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.

Suggested Citation

  • Nicholas J. Cox, 2012. "Speaking Stata: Matrices as look-up tables," Stata Journal, StataCorp LP, vol. 12(4), pages 748-758, December.
  • Handle: RePEc:tsj:stataj:v:12:y:2012:i:4:p:748-758
    as

    Download full text from publisher

    File URL: http://www.stata-journal.com/article.html?article=pr0054
    File Function: link to article download
    Download Restriction: no
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:tsj:stataj:v:12:y:2012:i:4:p:748-758. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum or Lisa Gilmore (email available below). General contact details of provider: http://www.stata-journal.com/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.