Date: Wed, 15 May 2002 18:16:36 -0700
Reply-To: Glenn Heagerty <gheagerty@ADELPHIA.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Glenn Heagerty <gheagerty@ADELPHIA.NET>
Organization: Consumer Solutions
Subject: Re: Help please
Content-Type: multipart/alternative;
Hi Jet,
I think you are asking for the percentage of questions answered with a 1
or 4 for each patient on each visit. If so, here's a way to do it. This
way requires an input data set with one observation per visit and the
scores for the 20 questions be numeric. You'll have to substitute your
variable names and data set names.
(untested)
data pct_1_or_4;
set scores;
num_1_or_4 = 0;
array quests{20} quest1-quest20;
do i=1 to 20;
num_1_or_4 + (quests{i} = 1 or quests{i} = 4);
end;
pct = num_1_or_4 / 20;
pct_ind = (0 < pct);
run;
Now, if you need the percentage of patients on each visit that scored at
least one question with a 1 or 4, then you can run:
proc freq data=pct_1_or_4;
tables visit*pct_ind / missing;
run;
I hope this helps, kind of working through it in my head. If this
doesn't help, please clarify what you want as output.
Thanks,
Glenn
[text/html]
|