LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2001, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 15 Jun 2001 10:19:19 -0400
Reply-To:   Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject:   Re: PRoc Summary 'Internals'

A follow-up "birdie-gram" informs me that the new behavior also applies to REPORT, TABULATE, and SURVEYMEANS.

On Mon, 11 Jun 2001 17:19:18 -0400, Howard Schreier <Howard_Schreier@ITA.DOC.GOV> wrote:

>Apparently this change in behavior is intentional but undocumented. It also >gets more interesting when there is printed (that is ODS) output. > >According to a little birdie: In v8, PROC MEANS/SUMMARY was changed so that >numeric CLASS variables lacking an explicit format are grouped according to >their internal (unformatted) values, unless an option requiring formatted >values (such as ORDER=FORMATTED) is specified. But if two class levels have >the same formatted value, an ODS bug/feature (take your choice) causes all >but the first such level to be blanked out in ODS output. This change was >made to improve performance, since the BEST12. format is rather slow. As far >as I know (which may not be very far), most other procedures having CLASS >statements still use the default of BEST12. for numeric variables lacking an >explicit format. > >Here's an illustration. Start with the same test data I used earlier: > > data newloans; > input acctkey advtp; > cards; > 123456789012 3 > 123456789010 4 > 1234567890123 5 > 1234567890120 6 > ; > >Note that there are two 12-digit integers and two 13-digit integers. The >latter would have the same formatted (BEST12.) value. > >But no format has been associated with ACCTKEY. So the following PROC step >preserves all four levels under V.8 (whereas under earlier versions, BEST12. >would apply by default and the two 13-digit ACCTKEY levels would get rolled >together). > > proc means data=newloans nway sum; > class acctkey ; > var advtp ; > output out=advtp00 sum= ; > run; > > >Here is the V.8 output: > > The MEANS Procedure > > Analysis Variable : advtp > > N > acctkey Obs Sum > > 123456789010 1 4.0000000 > > 123456789012 1 3.0000000 > > 1.2345679E12 1 6.0000000 > > 1 5.0000000 > >So PROC MEANS/SUMMARY has used internal values in its processing but >formatted values for presentation. > >The SAS data set, however, records the original values. When printed with an >adequately wide format: > > proc print data=advtp00; > format acctkey 13.; > run; > >One gets: > > Obs acctkey _TYPE_ _FREQ_ advtp > > 1 123456789010 1 1 4 > 2 123456789012 1 1 3 > 3 1234567890120 1 1 6 > 4 1234567890123 1 1 5 [snip]


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