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 (February 2011, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 6 Feb 2011 23:50:44 +0800
Reply-To:     Murphy Choy <goladin@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Murphy Choy <goladin@GMAIL.COM>
Subject:      Re: Quartile question
Comments: To: Dave Brewer <david.brewer@uc.edu>
In-Reply-To:  <201102061523.p16BlKQV029880@willow.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1

Hi Dave,

I hope this helps.

On Sun, Feb 6, 2011 at 11:23 PM, Dave Brewer <david.brewer@uc.edu> wrote:

> Murphy, > > Thanks much for your example and help. > Dave > > On Sat, 5 Feb 2011 14:45:50 +0800, Murphy Choy <goladin@GMAIL.COM> wrote: > > >Hi Dave, > > > >First create a percentile variable in the data A. > > > >PROC RANK DATA = A OUT = A1 GROUPS = 100; > >VAR MPR; > >RANKS MPR_RANK; > >RUN; > > > >With this, you have a new variable which gives you percentile. Using this, > >you can summarized based on percentile. > > > >PROC TABULATE DATA = A1(WHERE = (MPR_RANK IN (25,50,75,0,99))); > >CLASS MPR_RANK; > >TABLE MPR_RANK, MPR*(MIN MAX N); > >RUN; > > > >Not sure if this helps. > > > >On Sat, Feb 5, 2011 at 9:58 AM, Dave Brewer <david.brewer@uc.edu> wrote: > > > >> I'm sorry, but I don't understand what you are suggesting? Can you > provide > >> an example with code? > >> > >> Thanks. > >> Dave > >> > >> On Sat, 5 Feb 2011 09:55:32 +0800, Murphy Choy <goladin@GMAIL.COM> > wrote: > >> > >> >Hi, > >> > > >> >Perhaps a better alternative is to use PROC RANK. > >> > > >> >Use PROC Rank to create 100 deciles. > >> > > >> >Do a PROC TABULATE to calculate the number of people in each quartile > and > >> >min/max. > >> > > >> >On Sat, Feb 5, 2011 at 9:47 AM, Dave <david.brewer@uc.edu> wrote: > >> > > >> >> Hi All, > >> >> > >> >> Let me start off by stating that I am not a mathematician or a > >> >> statistician, just a lowly SAS programmer. > >> >> > >> >> I ran a PROC MEANS to calculate Q1-Q4, MIN and MAX for a variable > called > >> >> MPR. When I showed the results to the investigator, she wants to know > >> how > >> >> many people are in each quartile (or how many in MIN or MAX). > >> >> > >> >> Is this possible without a lot of work on my end? > >> >> > >> >> Thanks all for your help. > >> >> Dave > >> >> > >> > > >> > > >> > > >> >-- > >> >Regards, > >> >Murphy Choy > >> > > >> >Certified Advanced Programmer for SAS V9 > >> >Certified Basic Programmer for SAS V9 > >> >DataShaping Certified SAS Professional > >> > > > > > > > >-- > >Regards, > >Murphy Choy > > > >Certified Advanced Programmer for SAS V9 > >Certified Basic Programmer for SAS V9 > >DataShaping Certified SAS Professional >

-- Regards, Murphy Choy

Certified Advanced Programmer for SAS V9 Certified Basic Programmer for SAS V9 DataShaping Certified SAS Professional


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