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 (November 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 9 Nov 2002 18:16:37 +0000
Reply-To:   John Whittington <John.W@MEDISCIENCE.CO.UK>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   John Whittington <John.W@MEDISCIENCE.CO.UK>
Subject:   Re: A useful percentage picture
Comments:   To: "roland.rashleigh-berry" <roland.rashleigh-berry@NTLWORLD.COM>
In-Reply-To:   <>
Content-Type:   text/plain; charset="us-ascii"; format=flowed

At 12:46 09/11/02 +0000, roland.rashleigh-berry wrote:

>I thought somebody might appreciate this especially if you work on >Clinical Trials. Reporting percentages is a bit tricky since you can not >always allow the value to round. For example, assuming 100=100%, you would >not want to report 0.3 as 0%. Zero means just that. So you would want to >report it as <1%. Also if you had 99.6 then you would not want that to >display as 100% because 100% means just that. So >99% is better. > >The following creates a "picture" (rather than a format) so that you can >use the above rules to display a percentage. It keep the width of the >formatted value at 6 by using different prefixes. > >proc format; > picture pctfmt (round) > 0 = '( 0%)' (noedit) > 0-<1 = '( <1%)' (noedit) > 1-<9.5 = '9%)' (prefix='( ') > 9.5-99 = '99%)' (prefix='( ') > 99<-<100 = '(>99%)' (noedit) > 100 = '(100%)' (noedit) > ; >run;

Roland, that approach partially addresses on of the problems of percentages, but it's essentially a cosmetic approach which is likely to appease only those who are numerically naive. Your approach prevents rounding down to zero, or rounding up to 100%, on the basis that 'zero means zero' and '100% means 100%', but the same argument really applies to ANY value, not just the extreme ones. For example one could argue that, since "17% means 17%", a value of 16.7% or 17.3% should not be reported as "17%" but, rather, as something like "16.5-<17.5%". It's probably far better to round percentages to a sufficient degree of precision (decimal places) that, for example, 0.00% (or whatever) does mean 'close enough to zero to make no difference'. Furthermore, alnbeit more trivial, if (as is quite often the case) percentages are calculated as preliminary to creating a pie chart, stacked bar chart or something like that, then actual numbers are needed "<1%" could require a 'pie segment' anything from zero to 3.6 degrees.

However, much more important, your approach does not address the much greater problem with percentages which is so often picked up by the QAing of Clinical Trials reports - namely the phenomenon of 'percentages not summing to 100%' (because of rounding issues). This is more important (if one wants to avoid repeated discussions with QA people), but is far less simple to solve. There was an extensive discussion about this issue, and various ways of approaching it, on SAS-L a few years ago - so it might be worth your while to consult the archives for ideas.

Kind Regards, John


---------------------------------------------------------------- Dr John Whittington, Voice: +44 (0) 1296 730225 Mediscience Services Fax: +44 (0) 1296 738893 Twyford Manor, Twyford, E-mail: Buckingham MK18 4EL, UK ----------------------------------------------------------------

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