LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 13 Oct 2005 19:31:48 -0400
Reply-To:     Raynald Levesque <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Raynald Levesque <>
Subject:      Re: Compare two files
In-Reply-To:  <>
Content-type: text/plain; charset=us-ascii


For examples see - Files 2 and 3 in - File 24 of


Raynald Levesque Visit my SPSS site:

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of Sent: October 13, 2005 12:08 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: Comapre two file


I think the newest or newer versions 13 or 14 have or will have some sort of 'function' for doing this. One old way is this

If you haven't done this already, make sure each file has a 'file source' tag. Something like a variable called file with values of 1 for file 1 (an arbitrary designation) and 2 for file 2. If you recorded data entry id--always a good idea--you could use that, provided exactly one person did first entry and exactly one different person did second entry.

Add the files and sort by id and your file source variable, call it 'file'.

* This assumes that user missing values may have been set and there might be sysmis values. Compute errs=0. Do repeat x=v1 to v500. + Do if (id eq lag(id)). + Do if (missing(x) eq lag(missing(x))). + Compute errs=errs+0. + Else. + Compute errs=errs+1. + End if. + End if. End repeat.

* You need to pull both records for examination. So you have to sort the records and pull the data from one record to another so that both records in a pair have the same value for the err variable.

sort cases by id (a) file (d).

Do if (id eq lag(id)). + Compute errs=lag(errs). End if.

Improvements. One improvement is to use a vector to record the variable number--not the name--with the error. There are other improvements that could be done just depends on how much time you have. Check Raynalds website.

Gene Maguin

Back to: Top of message | Previous page | Main SPSSX-L page