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 (September 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 23 Sep 2005 09:54:02 -0700
Reply-To:   "Pardee, Roy" <pardee.r@GHC.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Pardee, Roy" <pardee.r@GHC.ORG>
Subject:   Re: Proc boxplot won't use my format w/numeric grouping variable
Content-Type:   text/plain; charset="US-ASCII"

This just in (from one of those 'little birdies' you hear about):

It seems this is vestigial behavior inherited from SAS/QC's SHEWHART procedure (from whence the underlying code comes). This sort of behavior is normal & well documented in SAS/QC, but comes as a surprise to us GRAPH and STAT (stat?) users. A related issue is the fact that the input datset must be sorted by the grouping var, else you get multiple boxes even for the same grouping value. Changing the behavior to conform to STAT user expectations (stat?) membership is on SI's to-do list.

In the meantime, the (obvious) workaround is to create a new var w/the formatted version of your grouping var.

And I do *not* get a t-shirt for bringing it up, apparently. :-(

Cheers,

-Roy

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Pardee, Roy Sent: Thursday, September 22, 2005 2:01 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Proc boxplot won't use my format w/numeric grouping variable

Hey All,

[Using sas v9.13]

I've got a format I'm using to collapse multiple values of a numeric variable into easier-to-understand groups:

proc format ; value ERM 1, 3 = "Positive" 2, 8-10 = "Negative or Unknown" ; quit ;

But when I call PROC BOXPLOT like so:

proc boxplot data = gnu ; plot fup_months * ERStatus ; format ERStatus ERM. ; run ;

I get a box for each discrete value of my numeric var (e.g., ERStatus = 8 gets a different box from ERStatus = 9, even though their formatted values are the same). The labels on the horizontal axis reflect the format, but I want the categories collapsed too. Is it possible, or do I have to create a new var to hold the formatted version of my ERStatus var?

Thanks!

-Roy


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