Advanced Search
MyIDEAS: Login to save this paper or follow this series

A diff command for use with data files

Contents:

Author Info

  • Philip Schumm

    ()
    (Department of Health Studies, University of Chicago)

Registered author(s):

    Abstract

    One of the most important tools in a programmer's tool chest is the diff command. This command permits you to determine immediately if two code files are identical and, when they are not, to generate a patch which summarizes the differences and can be used to transform the first file into the second. In this presentation we shall introduce an analogous tool written for use with data files. Unlike code files in which each line is identified by its physical location within the file, records in a data file are typically identified by one or more indices, each composed of one or more distinct variables. Our tool compares two files based on one or more such indices, provides a compact, readable summary of the differences, and can generate a patch (in the form of a do-file) to update the first file based on the second. This tool is useful during data analysis whenever two or more versions of a data file are encountered, and may also be used by a Data Coordinating Center to manage repeated data submissions from multiple sites. The program was developed using Mata, and some of the programming techniques used will also be discussed.

    Download Info

    If you experience problems downloading a file, check if you have the proper application to view it first. In case of further problems read the IDEAS help page. Note that these files are not on the IDEAS site. Please be patient as the files may be large.
    File URL: http://repec.org/nasug2006/Schumm.pdf
    Download Restriction: no

    Bibliographic Info

    Paper provided by Stata Users Group in its series North American Stata Users' Group Meetings 2006 with number 12.

    as in new window
    Length:
    Date of creation: 23 Jul 2006
    Date of revision:
    Handle: RePEc:boc:asug06:12

    Contact details of provider:
    Web page: http://www.stata.com/meeting/5nasug
    More information through EDIRC

    Related research

    Keywords:

    This paper has been announced in the following NEP Reports:

    References

    No references listed on IDEAS
    You can help add them by filling out this form.

    Citations

    Lists

    This item is not listed on Wikipedia, on a reading list or among the top items on IDEAS.

    Statistics

    Access and download statistics

    Corrections

    When requesting a correction, please mention this item's handle: RePEc:boc:asug06:12. See general information about how to correct material in RePEc.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Christopher F Baum).

    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.

    If references are entirely missing, you can add them using this form.

    If the full references list an item that is present in RePEc, but the system did not link to it, you can help with 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 profile, as there may be some citations waiting for confirmation.

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