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 (August 2009, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 31 Aug 2009 15:10:22 -0500
Reply-To:   Robin R High <rhigh@UNMC.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Robin R High <rhigh@UNMC.EDU>
Subject:   Re: PROC FREQ Order=Formatted and Missing Data
Comments:   To: msz03@albany.edu
In-Reply-To:   <32921.150.142.232.4.1251746844.squirrel@webmail.albany.edu>
Content-Type:   text/plain; charset="US-ASCII"

Mike,

If you just need the table with missing category placed in the last row, TABULATE will easily do it (and perhaps look even nicer). Perhaps there is a computation of percents reason that FREQ doesn't easily do it, if at all. Reverse sorting and then order=data also doesn't work.

proc tabulate data=class order=formatted missing noseps; class sex age; table age, sex*n=' '*f=7.0 / rts=15; format age age.; run;

Robin High UNMC

Mike Zdeb <msz03@ALBANY.EDU> Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> 08/31/2009 02:37 PM Please respond to msz03@albany.edu

To SAS-L@LISTSERV.UGA.EDU cc

Subject PROC FREQ Order=Formatted and Missing Data

hi ... any way to make PROC FREQ put the MISSING data last in the table in the following ORDER=FORMATTED is 'honored' for all categories except missing

data class; set sashelp.class end=last; output; if last then do; age = .; output; end; label age = "Student's Age" sex = "Student's Gender" ; run;

proc format; value age low - 12 = '3: <13' 13 - 14 = '2: 13-14' 15 - high = '1: 15+' . = '4: MISSING' ; run;

proc freq data=class order=formatted; table age*sex / norow nocol nopercent missing; format age age.; run;

-- Mike Zdeb U@Albany School of Public Health One University Place Rensselaer, New York 12144-3456 P/518-402-6479 F/630-604-1475


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