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 (July 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
=========================================================================
Date:         Sun, 16 Jul 2006 18:23:33 -0400
Reply-To:     "Snider-Lotz, Tom" <tsnider-lotz@previsor.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Snider-Lotz, Tom" <tsnider-lotz@previsor.com>
Subject:      FW: Identifying cases that almost match
Content-Type: text/html; charset="iso-8859-1"

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD></HEAD><BODY> <DIV id=idOWAReplyText96006 dir=ltr> <DIV dir=ltr><FONT face=Verdana color=#000080 size=2>It just occurred to me that I can easily solve my problem by using the Duplicate Cases utility to find duplicates for the variable ShortWholeName that I've created via the syntax.&nbsp; However, if anyone sees an even easier method, I'd like to hear about it.</FONT></DIV> <DIV dir=ltr><FONT face=Verdana color=#000080 size=2></FONT>&nbsp;</DIV> <DIV dir=ltr><FONT face=Verdana color=#000080 size=2>Thanks, all.</FONT></DIV> <DIV dir=ltr><FONT face=Verdana color=#000080 size=2></FONT>&nbsp;</DIV> <DIV dir=ltr><FONT face=Verdana color=#000080 size=2>&nbsp;-- Tom Snider-Lotz</FONT></DIV> <DIV dir=ltr><FONT color=#000000 size=2><A href="mailto:tsnider-lotz@previsor.com"></A></FONT>&nbsp;</DIV></DIV> <DIV dir=ltr><BR> <HR tabIndex=-1> <FONT face=Tahoma size=2><B>From:</B> Snider-Lotz, Tom<BR><B>Sent:</B> Sun 16-Jul-06 4:38 PM<BR><B>To:</B> SPSSX-L@LISTSERV.UGA.EDU<BR><B>Subject:</B> Identifying cases that almost match<BR></FONT><BR></DIV> <DIV dir=ltr> <DIV id=idOWAReplyText41443 dir=ltr> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2>I'm trying to identify cases that may belong to the same individuals, even though their name might be entered slightly differently in the different records (e.g., Ben Jones and Benjamin Jones).&nbsp; Unless I'm missing something, I don't think the Duplicate Cases utility can do this.</FONT></DIV> <DIV dir=ltr>&nbsp;</DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2>I can mostly accomplish this with the following syntax, where Fname and Lname are the first and last names:</FONT></DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2></FONT>&nbsp;</DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2>SORT CASES BY LNAME$ (A) FNAME$ (A).<BR>String ShortWholeName (a30).<BR>Compute ShortWholeName = Concat (RTRIM(Lname), ", ", SUBSTR(Fname,1,3)).<BR>Compute DuplicateName=0.<BR>If ShortWholeName=Lag(ShortWholeName) DuplicateName=1.</FONT></DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2></FONT>&nbsp;</DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2>The syntax flags the second &amp; subsequent cases that are matches, but not the first one.&nbsp; I.e., if Fname and Lname for the&nbsp;first three cases are:</FONT></DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2></FONT>&nbsp;</DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2>Ben&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Jones<BR>Benjamin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Jones<BR>Benjamin F&nbsp;&nbsp; &nbsp;Jones</FONT></DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2></FONT>&nbsp;</DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2>the syntax reduces them all to "Jones, Ben" and gives DuplicateName a value of 1 for the 2nd &amp; 3rd cases, but not for the first case.</FONT></DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2></FONT>&nbsp;</DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2>My question is, how can I make DuplicateName =1 for the first matching case (Ben Jones) as well?&nbsp; Or, is there a better way to accomplish this?</FONT></DIV> <DIV dir=ltr><FONT face="Courier New" color=#000080 size=2></FONT>&nbsp;</DIV> <DIV dir=ltr><FONT face=Verdana color=#000080 size=2><FONT face="Courier New">Thanks, all.</FONT><BR></DIV></FONT> <DIV dir=ltr><FONT face=Verdana color=#000080 size=2></FONT>&nbsp;</DIV></DIV> <DIV id=idSignature50589 dir=ltr> <DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV> <DIV><FONT color=#000000 size=2>__________</FONT><FONT color=#000000 size=2>_________________________</FONT></DIV> <DIV><FONT color=#000000 size=2>Thomas G. Snider-Lotz, Ph.D.</FONT></DIV> <DIV><FONT color=#000000 size=2>Principal Scientist</FONT></DIV> <DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV> <DIV><FONT color=#ff0000 size=2>PreVisor</FONT></DIV> <DIV><FONT color=#000000 size=2>1805 Old Alabama Road</FONT></DIV> <DIV><FONT color=#000000 size=2>Suite 150</FONT></DIV> <DIV><FONT color=#000000 size=2>Roswell, GA 30076</FONT></DIV> <DIV><FONT color=#000000 size=2>Ph:&nbsp;&nbsp;&nbsp;&nbsp; 678-832-0555</FONT></DIV> <DIV><FONT color=#000000 size=2>Ph:&nbsp;&nbsp;&nbsp;&nbsp; 800-281-9713 x555</FONT></DIV> <DIV><FONT color=#000000 size=2>Fax:&nbsp;&nbsp;&nbsp; 770-642-6115</FONT></DIV> <DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV> <DIV><FONT color=#000000 size=2><A href="http://www.previsor.com">http://www.previsor.com</A></FONT></DIV> <DIV><FONT color=#000000 size=2><A href="mailto:tsnider-lotz@previsor.com">tsnider-lotz@previsor.c


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