Date: Thu, 11 Sep 2008 18:24:51 +0200
Reply-To: Spousta Jan <JSpousta@CSAS.CZ>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Spousta Jan <JSpousta@CSAS.CZ>
Subject: Re: Syntax: when did it happend for the last time?
In-Reply-To: A<848b2c410809110921h50d1ea58t511f2ec158228add@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-2"
compute change = 0.
do repe v = var1 to var5 / i = 1 to 5.
- if v = -1 change = i.
end repe.
exe.
Best regards,
Jan
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Sungeun Chung
Sent: Thursday, September 11, 2008 6:21 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Syntax: when did it happend for the last time?
Dear experts.
I have a problem in creating syntax command; please help me. I appreciate your help.
I have a data set like this:
DATA LIST FREE/ var1 var2 var3 var4 var5.
BEGIN DATA
+1 -1 +1 +1 +1
+1 -1 -1 +1 +1
+1 -1 -1 -1 + 1
+1 +1 -1 +1 + 1
END DATA.
For all variables, +1 indicate no change, - 1 indicates change.
For each case, I want to know when "-1" (change) happend for the last time.
For example, I expect
+1 -1 +1 +1 +1 2
+1 -1 -1 +1 +1 3
+1 -1 -1 -1 + 1 4
+1 +1 -1 +1 + 1 3
in which the last variable indicate when "-1" occurred for the last time.
I want to creat a syntax file (probably using "vector and loop" command").
Can anyone help me out here?
Thank you very much for your help!
Sungeun
Sungeun Chung, Ph.D.
Assistant Professor
Department of Communication
Sallee Hall 215
1 University Circle
Western Illinois University
Macomb, IL 61455
Tel: 309-298-2219; FAX: 309-298-2369
=====================
To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (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
_____________
Tato zpráva a všechny připojené soubory jsou důvěrné a určené výlučně adresátovi(-ům). Jestliže nejste oprávněným adresátem, je zakázáno jakékoliv zveřejňování, zprostředkování nebo jiné použití těchto informací. Jestliže jste tento mail dostali neoprávněně, prosím, uvědomte odesilatele a smažte zprávu i přiložené soubory. Odesilatel nezodpovídá za jakékoliv chyby nebo opomenutí způsobené tímto přenosem.
Jste si jisti, že opravdu potřebujete vytisknout tuto zprávu a/nebo její přílohy? Myslete na přírodu.
This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee is prohibited. If you receive this in error please contact the sender and delete the message as well as all attached documents. The sender does not accept liability for any errors or omissions as a result of the transmission.
Are you sure that you really need a print version of this message and/or its attachments? Think about nature.
-.- --
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (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