Date: Mon, 9 Jun 2008 12:52:31 -0700
Reply-To: andymanme@GOOGLEMAIL.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: andymanme@GOOGLEMAIL.COM
Organization: http://groups.google.com
Subject: Re: Simple programming question
Content-Type: text/plain; charset=ISO-8859-1
Hi,
I would personally recode the T's to 1 and the F's to 0 and then sum
the values, this should give you what you are looking for.
Am sure someone else will be able to give a much more elegant solution
however
Andy
On Jun 9, 8:44 pm, sas...@gmail.com wrote:
> Dear all,
>
> I have a simple programming question. I have a dataset with 5
> variables. Variables a through e represents the questions asked to the
> patients. Each question's answer is either Correct or Incorrect i.e
> True or False.I want to determine how many patient's answered 1
> correct answer, 2 correct answers, 3 correct answers, 4 correct
> answers and 5 correct answers. I have 100 patients. And the dataset
> has 1 record/patient.
>
> How can i programatically determine this?
>
> Example:
> Patient a b c d e
> 101 T F T T T
> 102 F T T T F
>
> Thanks in advance.
>
> Regards,
|