Create Primary variable from 2 sets of variables

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Create Primary variable from 2 sets of variables

Mike Pritchard
Here is syntax that (I think) works for generating something for Primary
without regard to duplication.  It will pick the last in the list.

* Primary based on recent - choosing last in list.
COMPUTE PrimaryRecent = $SYSMIS.
DO REPEAT X=S2R_1 TO S2R_8 /Y=1 2 3 4 5 6 7 8.
  IF (X = MAX(S2R_1 TO S2R_8)) PrimaryRecent = Y.
END REPEAT.
EXECUTE .

Thanks
Mike
_________________________________________________________________________
Mike Pritchard | [hidden email] | 5 Circles Research | 425-444-3410 (c)
| 425-968-3883 (o)
Research to help companies build products that people buy

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD