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 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 May 2008 08:27:57 -0700
Reply-To:     bigD <diaphanosoma@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         bigD <diaphanosoma@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: SAS Code for Cell Suppression in tables
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

PROC FORMAT;

VALUE NOSMALLVALUES 1,2,3,4,5 = '- ' ;

I use this with format in proc tabulate or any proc.

Proc tabulate data=new format=COMMA9.0 order = DATA ; WHERE LOC not IN ('P','S'); class PROGRAM1 /PRELOADFMT ; CLASS HOSPITAL /PRELOADFMT; VAR separations; TABLE PROGRAM1='' ALL='Total'*f=comma9.0, HOSPITAL*(SEPARATIONS=''*(sum='N'*f=NOSMALLVALUES. Pctsum<HOSPITAL>='%'*f=pctfmt.)) ALL='Total'*SEPARATIONS*f=comma9.0 / MISSTEXT='0'; FORMAT HOSPITAL $HSPTL_ORDER. PROGRAM1 $PGM_ORDER. SEPARATIONS NOSMALLVALUES.; RUN;

It seems that no matter what you do you have to make some hand edits to take of certain problems. Perhaps it is possible to format the row and column total to round up or down to the nearest 5. In excel (gasp) I am able to randomly round the totals up or down by five and also do the data suppression in the individual cells. I send an example if you want

BigD

On May 8, 2:42 pm, JohnH <john.c.hennes...@ssa.gov> wrote: > On May 8, 9:55 am, hs AT dc-sug DOT org ("Howard Schreier)" wrote: > > > > > > > I think the issue is *which* cells to suppress. It's the secondary > > suppression (which prevents a suppressed cell from being "backed out" by > > subtracting the remaining detail from a total) that gets complicated. > > > On Thu, 8 May 2008 08:21:29 -0400, Gerhard Hellriegel > > > <gerhard.hellrie...@T-ONLINE.DE> wrote: > > >One possibility might be a view. > > > >data test / view=test; > > > set sashelp.class; > > > if weight>100 then sex="-"; > > >run; > > > >Is that something like you want? > > >However, a problem might be the accessability of the base data. For that > > >you could use a read-pw and add that to the view: > > > >data xx(read=secret); > > > set sashelp.class; > > >run; > > >data test / view=test; > > > set xx(read=secret); > > > if weight>100 then name="********"; > > >run; > > > >Gerhard > > > >On Thu, 8 May 2008 04:50:28 -0700, JohnH <john.c.hennes...@SSA.GOV> wrote: > > > >>We produce tables for the public which contain counts of people in > > >>certain categories. For privacy reasons, we must suppress cells that > > >>have small counts. Then, a secondary round of cell suppression takes > > >>place. For those who have cell suppression issues, I am sure you > > >>understand the details. Does anyone know where I can obtain SAS code > > >>which will take a table of counts and, with certain parameters set, > > >>apply cell suppression techniques to the table?- Hide quoted text - > > > - Show quoted text - > > You are right. After one suppresses the small cells, if one of the > rows has only one cell suppressed, then anyone can simply subtract all > of the displayed cells from the row total and compute the suppressed > cell. So another cell in that row is suppressed, even though it is > large enough to be displayed. But, that may create a column with only > one suppressed cell, so another cell in that column needs to be > suppressed,. But that may create .... and so on. One needs to > continue this process until one creates a tables where no row or > column contains exactly one suppressed cell. Try it! I am hoping > that someone out there knows of existing SAS code that we can obtain > that will do this. Does anyone know?- Hide quoted text - > > - Show quoted text -


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