LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 16 May 2002 08:31:34 -0400
Reply-To:   Edward Heaton <HEATONE@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:   To: "jet_li@SOFTHOME.NET" <jet_li@SOFTHOME.NET>
From:   Edward Heaton <HEATONE@WESTAT.COM>
Subject:   Re: Percent one or four
Comments:   To: SAS-L@LISTSERV.VT.EDU
Content-Type:   text/plain; charset="iso-8859-1"

Jet,

countOneOrFour = 0 ; Array qx [*] q1-q20 ; Do i=1 to dim(qx) ; countOneOrFour = countOneOrFour + ( qx[i] in (1,4) ) ; End ; pctOneOrFour = ( countOneOrFour / (i-1) ) * 100 ; Drop i countOneOrFour ;

Ed

Edward Heaton, Senior Systems Analyst, Westat (An Employee-Owned Research Corporation), 1550 Research Boulevard, Room 2018, Rockville, MD 20850-3195 Voice: (301) 610-4818 Fax: (301) 294-3992 mailto:EdwardHeaton@westat.com http://www.westat.com

-----Original Message----- From: Jet Li [mailto:jet_li@SOFTHOME.NET] Sent: Wednesday, May 15, 2002 5:22 PM To: SAS-L@LISTSERV.UGA.EDU Subject:

Hi all,

I have 100 patients answering 20 questions on each of their visit. Their answers are scored as 1,2,3&4 I want to find the percentage of each patients on each visit who's answers were either 1 or 4

I tried creating a flag for each of the question and i think that is not the real solution. Can anyone provide me with a simpler solution?

Thanks a lot.


Back to: Top of message | Previous page | Main SAS-L page