Date: Tue, 22 Apr 2008 17:01:38 -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: SPSS syntax for comorbidity
In-Reply-To: A<7.0.1.0.2.20080422172148.03aade80@mindspring.com>
Content-Type: text/plain; charset="UTF-8"
Nor would ANY:
COMPUTE chf = ANY(dx, '39891, etc)
That seems to me to be the clearest syntax (at least if you are not using Python :-)).
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Richard Ristow
Sent: Tuesday, April 22, 2008 4:28 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: [SPSSX-L] SPSS syntax for comorbidity
At 02:05 PM 4/22/2008, ViAnn Beadle wrote:
[Regarding]
>>+ IF (dx='39891' or dx='4280' or dx='4281' or dx='4289') chf = 1.
>
>The ANY function might be easier to use here.
Quite right. RECODE ... INTO could be easier still; among other
things, it wouldn't require pre-setting the target variables to 0:
RECODE dx
('39891', '4280', '4281', '4289' = 1)
(ELSE = 0)
INTO chf.
=====================
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
=====================
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
|