Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Conveniently comparing two datasets?

From   "Svend Juul" <SJ@SOCI.AU.DK>
To   <>
Subject   Re: st: Conveniently comparing two datasets?
Date   Sat, 15 Jul 2006 11:50:27 +0200

Brad Anderson wrote:
We routinely double enter questionnaire data and run comparisons to check
for data entry errors.  We've been using proc compare in SAS and we've
largely automated the process so that we generate an Excel file with
subject_id, variable name, variable label, and responses from first and
second entry.  Only inconsistent responses are generated.  The format is
very convenient for RAs to use in the data cleaning process.  The output
from cf, cf2, cf3, and compdta are much less convenient.  This is about all
we use SAS for and we'd like to become SAS free.  I've tried searching on
different key words but have not found other solutions.  Does anyone know of
any Stata programs that would allow us to generate a data file with the
following structure?

subject_id varname var_label response1 response2

Response1 and Response2 are the inconsistent responses to varname from first
and second entry, respectively.  Thank you very much!

Nick pointed to -merge- and -duplicates- which may be useful.

The data entry program EpiData (downloadable for free from includes a facility for comparing two files after double entry, with excellent documentation of discrepancies, if any.

Even if you created your Stata datasets differently, EpiData may be useful: EpiData can import a Stata dataset.

Hope this helps

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000 Aarhus C,  Denmark
Phone, work:  +45 8942 6090
Phone, home:  +45 8693 7796
Fax:          +45 8613 1580

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index