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:         Sun, 23 Jul 2006 02:14:36 -0400
Reply-To:     Glenys Lafrance <glenys.lafrance@SYMPATICO.CA>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Glenys Lafrance <glenys.lafrance@SYMPATICO.CA>
Subject:      Combining Variables--Defining Vector


This is the first time I have used pls excuse my lack of sophistication. I am hoping someone can help me to get this command to work. I have lots of combining of variables to do and don't want to waste time rearranging the data columns. I "lifted" this from the archives and adjusted it for my purpose...but I don't really understand how each part of the command works. I have defined a vector of contiguous variables. There are 6 variables in the vector. But in this instance I only want to combine 5 of the 6 variables to form a new variable. The variable that is left out happens to be in the middle of the vector. I have specified the 5 variables to be combined on Line 1 and Line 14 (count #resps). I'd appreciate help refining this if it is possible to do so.

Second question. How would I write the syntax if I wanted to exclude a variable within the vector and treat it as sysmis?

Third question. How do I include a command that names the new variable. At the moment when it the syntax runs, the new variable is named ENTERED. If I want to run several variations of this command I need unique names for each, or only the first one will run, the others give error messages.

Many thanks.

Glenys Lafrance

MISSING VALUES q29a3 q29a5 q29a6 q29a7 q29a8 (9).

NUMERIC ENTERED (F2). VAR LABELS ENTERED 'Level2D Within Internal Board'. VAL LABELS ENTERED 0 'none' 1 'student' 2 'faculty' 3 'support' 4 'administration' 5 'president' 6 'multi' . VECTOR RESPVAR = q29a3 to q29a8 . COMPUTE ENTERED = 0. COUNT #RESPS = q29a3 q29a5 q29a6 q29a7 q29a8 (0) . DO IF #RESPS GT 1. . COMPUTE ENTERED = 6. ELSE. - LOOP #RESPIDX = 0 TO 5. . IF (RESPVAR(#RESPIDX) EQ 0) ENTERED = #RESPIDX. - END LOOP. END IF.

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