<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Rounding proc summary results to nearest 10 for confidentiality in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rounding-proc-summary-results-to-nearest-10-for-confidentiality/m-p/565825#M33976</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;However, I need to do some disclosure control so nothing can be identified. Any value which is less than 20 will get set to zero and I want to round all values to the nearest tenth e.g. 255 gets rounded to 260 and 123 gets rounded to 120.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to run the output of PROC SUMMARY through another DATA step to do the rounding, and to set any value less than 20 to zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;However, I would also like my subtotals to add up to the total e.g. when I round all the subtotals I need to recalculate the totals again.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you run PROC SUMMARY again on the rounded/truncated data.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2019 12:54:45 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-06-13T12:54:45Z</dc:date>
    <item>
      <title>Rounding proc summary results to nearest 10 for confidentiality</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rounding-proc-summary-results-to-nearest-10-for-confidentiality/m-p/565794#M33972</link>
      <description>&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm carrying out some analysis to produce counts by different categories. I'm using the following code;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*Board Ages*/
proc summary data = full_dataset_3 nway missing;
	;
	format  year_filed year_filed.  county_y $county_y. age_filed_total age_filed_total. ;
	class year_filed county_y age_filed_total  /mlf;
	var Number_Person;
	output out = Number_of_people (drop=_freq_) 
		sum= ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, I need to do some disclosure control so nothing can be identified. Any value which is less than 20 will get set to zero and I want to round all values to the nearest tenth e.g. 255 gets rounded to 260 and 123 gets rounded to 120.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I would also like my subtotals to add up to the total e.g. when I round all the subtotals I need to recalculate the totals again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I need to go from my original data&amp;nbsp; to this new one. Would anyone be able to provide some guidance? I would rather round cells rather than suppressing.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data example;
length year $4. location $11. cohort $17.;
input year $ location $ cohort $ org rounded;
infile datalines delimiter=',';
datalines;
2010,All regions,: All ages,1657,1650
2010,All regions,100 0 - 24 years,27,20
2010,All regions,101 25 - 35 years,266,270
2010,All regions,102 36 - 45 years,299,300
2010,All regions,103 46 - 59 years,246,240
2010,All regions,104 60+ years,121,120
2010,All regions,105 Unknown,698,700
2010,Region A,: All ages,453,440
2010,Region A,100 0 - 24 years,22,20
2010,Region A,101 25 - 35 years,149,150
2010,Region A,102 36 - 45 years,99,100
2010,Region A,103 46 - 59 years,83,80
2010,Region A,104 60+ years,32,30
2010,Region A,105 Unknown,75,80
2010,Region B,: All ages,365,670
2010,Region B,100 0 - 24 years,5,0
2010,Region B,101 25 - 35 years,117,120
2010,Region B,102 36 - 45 years,200,200
2010,Region B,103 46 - 59 years,163,160
2010,Region B,104 60+ years,89,90
2010,Region B,105 Unknown,623,620
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2019 10:36:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rounding-proc-summary-results-to-nearest-10-for-confidentiality/m-p/565794#M33972</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2019-06-13T10:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding proc summary results to nearest 10 for confidentiality</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rounding-proc-summary-results-to-nearest-10-for-confidentiality/m-p/565825#M33976</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;However, I need to do some disclosure control so nothing can be identified. Any value which is less than 20 will get set to zero and I want to round all values to the nearest tenth e.g. 255 gets rounded to 260 and 123 gets rounded to 120.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to run the output of PROC SUMMARY through another DATA step to do the rounding, and to set any value less than 20 to zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;However, I would also like my subtotals to add up to the total e.g. when I round all the subtotals I need to recalculate the totals again.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you run PROC SUMMARY again on the rounded/truncated data.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 12:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Rounding-proc-summary-results-to-nearest-10-for-confidentiality/m-p/565825#M33976</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-06-13T12:54:45Z</dc:date>
    </item>
  </channel>
</rss>

