Statalist The Stata Listserver


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

st: RE: Conveniently comparing two datasets?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Conveniently comparing two datasets?
Date   Mon, 10 Jul 2006 16:19:46 +0100

You can -merge- two files and then do the comparison. 

Alternatively, you can -append- two files and then 
use -duplicates-. 

A little care with variable names and/or dataset 
identifiers is needed in each case. 

Nick 
[email protected] 

Anderson, Bradley J
 
> 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.  

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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