Date: Tue, 13 May 2003 09:38:28 -0500
Reply-To: "Peck, Jon" <peck@spss.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Peck, Jon" <peck@spss.com>
Subject: Re: New Var from 3 vars
Content-Type: text/plain; charset="us-ascii"
... and the bad, which is why you guys don't have it yet.
-----Original Message-----
From: Bob Walker [mailto:spss@surveys-forecasts.com]
Sent: Tuesday, May 13, 2003 9:22 AM
To: Peck, Jon
Subject: RE: Re: [SPSSX-L] New Var from 3 vars
Hey Jon,
Yes, you guys have access to all the good stuff...!
Bob
Surveys & Forecasts, LLC
2323 North Street
Fairfield, CT 06824-1738 USA
T +1.203.255.0505
F +1.203.255.0517
www.surveys-forecasts.com
|-----Original Message-----
|From: Peck, Jon [mailto:peck@spss.com]
|Sent: Tuesday, May 13, 2003 10:00 AM
|To: spss@surveys-forecasts.com
|Subject: RE: Re: [SPSSX-L] New Var from 3 vars
|
|I ran my example in the forthcoming SPSS 12, where variable names can
be up
|to 64 bytes long, but users will have to wait a little longer to take
|advantage of this.
|
|-----Original Message-----
|From: Bob Walker [mailto:spss@surveys-forecasts.com]
|Sent: Tuesday, May 13, 2003 8:33 AM
|To: SPSSX-L@LISTSERV.UGA.EDU
|Subject: Re: [SPSSX-L] New Var from 3 vars
|
|
|Jon:
|
|Yes, a good upgrade, since ANY assigns a zero to non-matching values,
|including system missing, so no need for a RECODE statement. Peter
|should choose a variable name (8 chars or less) for use in syntax,
|though. So:
|
|NEWVAR = ANY(16, VAR1 TO VAR3).
|
|Bob
|
|Surveys & Forecasts, LLC
|2323 North Street
|Fairfield, CT 06824-1738 USA
|T +1.203.255.0505
|F +1.203.255.0517
|www.surveys-forecasts.com
|
|
||-----Original Message-----
||From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf
|Of
||Peck, Jon
||Sent: Tuesday, May 13, 2003 8:49 AM
||To: SPSSX-L@LISTSERV.UGA.EDU
||Subject: Re: New Var from 3 vars
||
||If you don't know about the "any" function, here's a tip for your bag
|of
||tricks:
||
||compute SweetSixteen = any(16, var1, var2, var3).
||
||Peter,
||
||Unless I'm misunderstanding you, this should suffice...
||
||IF (VAR1 = 16 OR VAR2 = 16 OR VAR3 = 16) NEWVAR = 1.
||RECODE NEWVAR (1=1) (ELSE=0).
||
||Bob Walker
||Surveys & Forecasts, LLC
||www.surveys-forecasts.com
||
||
|||-----Original Message-----
|||From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf
||Of
|||Peter Fagan
|||Sent: Monday, May 12, 2003 5:50 PM
|||To: SPSSX-L@LISTSERV.UGA.EDU
|||Subject: New Var from 3 vars
|||
|||The solution offered by Jim Marks to James Moffitt recently should
|have
|||enabled me to solve this, but I have not be able. So....
|||
|||If any of three existing vars has the value of 16, I would like to
|||create a new var that would have value of "1" if 16 was present in
|any
|||one of the three, or "0" if absent.
|||
|||Thanks in advance.
|||
|||Peter
|||
|||Peter J. Fagan, Ph.D.
|