EconPapers    
Economics at your fingertips  
 

A diff command for use with data files

Philip Schumm ()
Additional contact information
Philip Schumm: Department of Health Studies, University of Chicago

North American Stata Users' Group Meetings 2006 from Stata Users Group

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.

Date: 2006-07-23
References: Add references at CitEc
Citations:

Downloads: (external link)
http://repec.org/nasug2006/Schumm.pdf (application/pdf)

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:asug06:12

Access Statistics for this paper

More papers in North American Stata Users' Group Meetings 2006 from Stata Users Group Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().

 
Page updated 2025-03-19
Handle: RePEc:boc:asug06:12