Date: Thu, 31 Oct 2002 07:20:21 -0500
Reply-To: Raynald Levesque <rlevesque@videotron.ca>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Raynald Levesque <rlevesque@videotron.ca>
Subject: Re: Combining data files
In-Reply-To: <401805FA22874944BA9FFD06D5B60464046F74@msmex02.domain.msmary.edu>
Content-type: text/plain; charset=us-ascii
Hi
* Create 2 data files to illustrate solution.
DATA LIST LIST /id idsup rating.
BEGIN DATA
1 1 4
2 1 5
3 1 5
4 2 2
5 2 3
6 3 4
END DATA.
LIST.
SAVE OUTFILE='c:\temp\employees.sav'.
DATA LIST LIST /idsup sales.
BEGIN DATA
1 100
2 150
3 112
4 200
END DATA.
LIST.
* file must be sorted to do the MATCH below.
SORT CASES BY idsup.
SAVE OUTFILE='c:\temp\supervisors.sav'.
*** Start job.
GET FILE='c:\temp\employees.sav'.
AGGREGATE OUTFILE=*
/BREAK=idsup
/rating=MEAN(rating).
MATCH FILES TABLE=*
/FILE='c:\temp\supervisors.sav'
/BY=idsup.
EXECUTE.
HTH
Raynald Levesque rlevesque@videotron.ca
Visit my SPSS Pages http://pages.infinit.net/rlevesqu/index.htm
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of
Keefer, Robert P.
Sent: October 30, 2002 10:21 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Combining data files
Hi,
I have two data files. The first is responses from employees (about
200), and includes comments about their supervisors. There are 16
different supervisors. In a second file, other information about the 16
supervisors (16 lines of data). I would like to take the summary
information about the supervisors from the first file and merge it with
the second file. I looked over Raynald's site, but couldn't decided if
any of those were appropriate. Thanks for any help.
bob k.
PS: I'm on Digest; a CC: to my address appreciated.
----------------------- -------------------------
Robert Keefer Associate Professor
Psychology Department Office Phone:
Mt. St. Mary's College (301) 447-5394, Ext. 4251
Emmitsburg, MD 21727 e-mail: keefer@msmary.edu
[Speaking for myself.] fax: 301-447-5021
----------------------- -------------------------