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 (March 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 2 Mar 2005 19:08:36 -0000
Reply-To:     "Hetter, Rebecca D,,DMDCWEST" <rebecca.hetter@osd.pentagon.mil>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Hetter, Rebecca D,,DMDCWEST" <rebecca.hetter@osd.pentagon.mil>
Subject:      Re: Break Variable - Reply
Comments: To: Harding Faulk <HFaulk@cheyney.edu>
Content-Type: text/plain

The SORT CASES statement has to include the total score variable ...

SORT CASES BY SSN TOTALSC. MATCH FILES FILe=*/BY SSN/LAST= LASTOTAL. SELECT IF LASTOTAL EQ 1. EXECUTE.

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Harding Faulk Sent: Wednesday, March 02, 2005 8:26 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: FW: Break Variable - Reply

-----Original Message----- From: Harding Faulk Sent: Wednesday, March 02, 2005 11:08 AM To: 'Kurt Wilkening' Subject: RE: Break Variable - Reply

Assuming that your variables are in one record: SSN, var1, var2, var3, var4, var5 and total score, you can sort by SSN and total scores in ascending order. The highest total scores should be last. Then select the last SSN. Using the following syntax:

SORT CASES BY SSN. MATCH FILES FILE=*/BY=SSN/LAST=last. EXECUTE.

Use the "Select if" function to select the LAST=1 and delete all other records. You have to set the Delete option in order to delete records not chosen or selected. This is how I select the highest SAT scores for students. It is simple quick and fast.

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Kurt Wilkening Sent: Wednesday, March 02, 2005 9:38 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Break Variable

I have a data file that contains SSN, five subtest scores (variables 1 through 5) and an overall total score. Some test takers took the test more than once, so they have multiple records in the file. I want to create a new datafile so that only one occurrence of SSN exists, and where multiple SSNs are found, I'd like the program to select the SSN (record) with the highest total score.

Aggregate function will give me the SSN with the highest total score, but I want the five other variables to come over, too, that were associated with the highest total score. Aggregate won't do that.

Any help to a syntax challenged individual?

Thx,

Kurt Wilkening Personnel Research Manager Hillsborough County Civil Service Office 601 E. Kennedy Blvd., 17th Floor Tampa, Florida 33602 http://www.hccsb.org (813) 272-5625 x 336


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