Date: Mon, 9 Jun 2003 10:41:21 -0500
Reply-To: "Marks, Jim" <Jim.Marks@lodgenet.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Marks, Jim" <Jim.Marks@lodgenet.com>
Subject: Re: Fw: SPSS question-Juan Albertorio
Content-Type: text/plain; charset="iso-8859-1"
here is a solution:
** dummy data.
DATA LIST FREE /D1 TO D8 (8a5).
BEGIN DATA
49300 49307 48000 10100 50006 46000 32000 44000
49322 44000 30000 34001 35678 12345 22111 34000
33002 45000 78900 54098 48308 44555 43210 45678
56789 34567 87905 49354 44455 66567 76555 66789
23145 33222 44567 49366 44411 45322 45000 67009
END DATA.
** Find cases with at least 1 diagnosis starting with '493'.
** ADD files will drop the asthma variables.
STRING asth1 TO asth8 (a3).
DO REPEAT y = d1 to d8 /x = asth1 TO asth8.
COMPUTE x = substr(y,1,3).
END REPEAT.
COMPUTE asthma EQ ANY('493',asth1 TO asth8).
ADD FILES FILE = * /DROP = asth1 TO asth8.
EXECUTE.
cheers
Jim Marks
Senior Market Analyst
LodgeNet Entertainment Corporation
-----Original Message-----
From: ??????? ??????? [mailto:eugen@KCPIK.ORG.UA]
Sent: Monday, June 09, 2003 10:23 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Fw: SPSS question-Juan Albertorio
This was posted on SRSMNET.
I hope someone will help to "Albertorio, Juan R." <jna8@CDC.GOV>.
----- Original Message -----
From: "Albertorio, Juan R." <jna8@CDC.GOV>
To: <SRMSNET@LISTSERV.UMD.EDU>
Sent: Monday, June 09, 2003 6:04 PM
Subject: SPSS question-Juan Albertorio
> Hello All. I have a SPSS question. Any help is deeply appreciated.
>
> This is the scenario: I have eight variables that are alphanumeric data-
D1
> to D8. This variables contains information about various diagnostics- e.g.
> Asthma code is 49300 to 49391. I need write a command that indicates to
SPSS
> to identify in each variable -D1 to D8- that every time the computer
> identified the asthma range code create a singular dummy variable of "0"
and
> "1".
>
> In SAS they called this procedure "array", but I don't neither the
procedure
> name nor the programming in SPSS.
>
> The idea of this procedure is to identify all cases of asthma in the range
> of diagnosis- from D1 to D8 and creates a singular dummy variable- 0 or
1-
> for identify such cases.
>
>
> ________________________________________________
> Juan R. Albertorio-Díaz, MA
> Statistician
> Office of International Statistics, Office of the Center Director
> National Center for Health Statistics
> Center for Disease Control and Prevention
> 3311 Toledo Road - Metro IV- Suite 2427
> Hyattsville, MD 20782
> Tel. 301.458.4634
> Fax. 301.458.4043
> Email: JAlbertorio@cdc.gov
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To subscribe/unsubscribe SRMSNet:
> http://listserv.umd.edu/cgi-bin/wa?A0=srmsnet
>
> SRMS website: http://amstat.org/sections/srms/
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
|