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 (May 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 15 May 2003 13:17:22 -0400
Reply-To:   Jonathan Siegel <jmsiegel@YAHOO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jonathan Siegel <jmsiegel@YAHOO.COM>
Subject:   Re: Help Proc Tabulate
Comments:   To: cmg3452003@YAHOO.CO.UK

Here's one way to handle the situation:

Run PROC Tabulate twice, with a data step between the two.

1. In the first proc tabulate, suppress printed output and send results to an output dataset containing summarized counts and percents.

2. Run a data step after the first PROC tabulate to delete rows you don't want.

3. Now run the result through a second proc tabulate. Since the first proc tabulate summarizes the data and puts counts and percents in a single observation, you should treat variables as analysis variables with statistic SUM. You can simply keylabel SUM='PERCENT' to indicate the data are percents.

Hope this helps,

Jonathan Siegel

On Thu, 15 May 2003 07:14:12 -0700, Yan Lee <cmg3452003@YAHOO.CO.UK> wrote:

>Say I have a proc tabulate output as below but only want the Male row >to be presented and the pecentage to remains as it is. I would like to >do this with the 'preloadfmt exclusive' option but when I use this the >percentage changes which is not what I want. > > N PctN >Male 50 50 >Female 50 50 > >I would like this to be > > N PctN >Male 50 50 > > >and not > > N PctN >Male 50 100 > > >Is it possible to do this with the 'preloadfmt exclusive' option ?? > > >Yan


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