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:         Tue, 25 Jul 2006 10:51:20 -0500
Reply-To:     John Norton <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         John Norton <>
Subject:      Re: Finding the Lowest Value
Content-Type: text/plain; charset=US-ASCII

Hi List, Last week I requested help with locating the lowest value across several variables. The heart of my solution below rests with comparing whether the value of measure(#i) = MIN(wbc1 TO wbc9). I use a loop such that when that argument is true, I record the iteration (the week) to the target variable. Placed within a macro, I can call the macro as many times as I have measurements. DEFINE low_week (first = !CHAREND(';')/last = !CHAREND(':') /target = !CMDEND). VECTOR measure = !first TO !last. LOOP #i = 1 TO 9. DO IF (measure(#i) = MIN(!first TO !last)). !CONCAT('COMPUTE ',!target,' = #i.'). END IF. END LOOP. EXE. !ENDDEFINE. low_week first = WBC1; last = WBC9: target = wbc_lowest_week. low_week first = gran1; last = gran9: target = gran_lowest_week.

My thanks to Gene Maguin for his suggested solutions from last week. Best, John Norton Biostatistician Oncology Institute Loyola University Medical Center (708) 327-3095 "Absence of evidence

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