Date: Fri, 11 May 2007 21:54:51 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: question on combining several variables in a dataset
In-Reply-To: <200705112151.l4BGC626000412@mailgw.cc.uga.edu>
Content-Type: text/plain; format=flowed
CatX Function, CountC function, and One lonely Data Step is all that is
needed.
Toby Dunn
On the other hand, you have different fingers. ~ LCG
The early bird may get the worm, but the second mouse gets the cheese in the
trap. ~ LCG
What happens if you get scared half to death, twice? ~ LCG
From: Farooq Ghouri <fghouri@KDHE.STATE.KS.US>
Reply-To: Farooq Ghouri <fghouri@KDHE.STATE.KS.US>
To: SAS-L@LISTSERV.UGA.EDU
Subject: question on combining several variables in a dataset
Date: Fri, 11 May 2007 17:51:12 -0400
Hello SAS users
I have six questions in a BRFSS dataset that are used to determine a
respondent’s knowledge of symptom of heart attack.
The six questions that are used to assess the knowledge of heart attack are
a. Do you think pain or discomfort in the jaw, neck, or back are symptoms
of a heart attack?
1 Yes
2 No
7 Don't know / Not sure
9 Refused
b. (Do you think) feeling weak, lightheaded, or faint (are symptoms of a
heart attack?)
1 Yes
2 No
7 Don't know / Not sure
9 Refused
c. (Do you think) chest pain or discomfort (are symptoms of a heart
attack?)
1 Yes
2 No
7 Don't know / Not sure
9 Refused
d. (Do you think) sudden trouble seeing in one or both eyes (is a symptom
of a heart attack?) Note: this is decoy question. Use response ‘No’ to
assess the knowledge.
1 Yes
2 No
7 Don't know / Not sure
9 Refused
e. (Do you think) pain or discomfort in the arms or shoulder (are symptoms
of a heart attack?) (279)
1 Yes
2 No
7 Don't know / Not sure
9 Refused
f. (Do you think) shortness of breath (is a symptom of a heart attack?)
(280)
1 Yes
2 No
7 Don't know / Not sure
9 Refused
My aim is to combine these variables in a way that generate results that
show the number and percentage of respondents that correctly identified
two or more, three or more, four or more and five or more symptoms of
heart attack.
I want a output that looks something like this
Response Count Percentage
two or more symptoms of heart attack # %
three or more symptoms of heart attack
four or more symptoms of heart attack
five or more symptoms of heart attack
Can anyone please suggest a solution to this problem? If there are any
papers or resources available on this kind of data manipulation, I will
appreciate reference to the source as well.
Best wishes
Farooq Ghouri.
_________________________________________________________________
PC Magazine’s 2007 editors’ choice for best Web mail—award-winning Windows
Live Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507