Re: How to calculate maximun value within fields

2014-02-06 Thread Frans Houweling
Hi Carlos, as no one seems to answer, here is my go at it. DATA LIST FREE / A B C D. BEGIN DATA 0.1 0.5 0.4 0.0 0.2 0.2 0.1 0.5 0.9 0.1 0.0 0.0 END DATA. COMPUTE HiVar = 0. COMPUTE #HiVal = -1. VECTOR val = A TO D. LOOP #i = 1 TO 4. + DO IF val(#i) GT #HiVal. + COMPUTE #HiVal = val(#i). + COMP

How to calculate maximun value within fields

2014-02-04 Thread Carlos Rivas
Besides finding the maximum value within a set of fields (let´s say 10 fields,that sum 100%), I need to create a new variable that indicates which one of the 10 fields has the maximum value. Sorry if this is too basic, but I am beginning using this amazing software. Best regards Carlos Rivas S.