Date: Mon, 14 Feb 2005 10:29:50 -0800
Reply-To: VKogler <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: VKogler <firstname.lastname@example.org>
Subject: Match Command
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
There was recent discussion on the list regarding the use of the Match
command as an alternative to a lengthy Recode operation to create a
'State' variable on the basis of zip code values. I thought this was
just the approach to deal with a problem I was working on, but to no
From a file of about 90,000 admission records, I have identified 2,700
patients that have received a particular type of care in a particular
group of clinics. In our system, these 2,700 people have had multiple
treatment episodes. These could have occurred at any of 35 different
clinics over the past 5 years. What I wanted to do, on the basis of a
unique patient ID, was to create an SPSS file containing a record for
each treatment episode these patients have had in the overall system.
In database terms [where I eventually solved the problem in SQL 2k] I
wanted to create a table based on the one-to-many relationship between
the patient ID table and the complete patient admission record table.
The end result would be a table containing a record for each treatment
admission for these 2,700 persons - 2,700 unique patient ID's with
multiple admission records, for a total of 5,500 cases.
I fooled around with the Match and Add commands in every possible
permutation without success. The documentation and GUI indicated that a
one-to-many match on the basis of paired and sorted key variables was
doable, but this function was available only to add variables, not to
add cases. It wasn't really that big a deal to swap the data back and
forth between applications, but I would have preferred to have dealt
with the matter entirely from within SPSS.
Any thoughts on what I might have been doing incorrectly?