<?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: Suppress small sample size (e.g., &amp;lt;6) with proc frec in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/802164#M315779</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;My title may be misleading.&amp;nbsp; I run proc freq and create a dataset based on it&lt;/P&gt;&lt;P&gt;My data looks like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yoko_0-1647347659506.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69465i5EDEF1A0D51BDE53/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Yoko_0-1647347659506.png" alt="Yoko_0-1647347659506.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There are only 1 level for var_name (var1), source (book1), and year (2022) each.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be true to the original data, I added an empty cell to 'code' as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The frequency and % are numeric variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to replace '1' with, say, '*'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yoko&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2022 12:39:42 GMT</pubDate>
    <dc:creator>Yoko</dc:creator>
    <dc:date>2022-03-15T12:39:42Z</dc:date>
    <item>
      <title>Suppress small sample size (e.g., &lt;6) with proc frec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/801929#M315649</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with several columns: var_name, frequency, %, code, source, year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to suppress frequency and % if frequency &amp;lt; 6.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me coding for this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yoko&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 13:35:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/801929#M315649</guid>
      <dc:creator>Yoko</dc:creator>
      <dc:date>2022-03-14T13:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress small sample size (e.g., &lt;6) with proc frec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/801931#M315650</link>
      <description>&lt;P&gt;Do you mean you want PROC FREQ to calculate everything, and then not display results where sample size &amp;lt; 6? Or do you mean the sample size is already calculated in your data set before PROC FREQ is run?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us a portion of the actual data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 13:39:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/801931#M315650</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-14T13:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress small sample size (e.g., &lt;6) with proc frec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/801969#M315666</link>
      <description>Create a custom format and apply that to the output data. PROC TABULATE is slightly easier in this regard.&lt;BR /&gt;&lt;BR /&gt;proc format;&lt;BR /&gt;value mask_fmt&lt;BR /&gt;low &amp;lt; 6 = "&amp;lt;6"&lt;BR /&gt;other = [comma12.];&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Then apply that within PROC FORMAT.</description>
      <pubDate>Mon, 14 Mar 2022 16:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/801969#M315666</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-03-14T16:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress small sample size (e.g., &lt;6) with proc frec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/801989#M315673</link>
      <description>&lt;P&gt;Example data, or use a SAS supplied data set such as SASHELP.CLASS, and show the expected output. There are several ways to interpret "suppress small sample" and it is not at all clear which you may mean.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 17:14:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/801989#M315673</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-14T17:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress small sample size (e.g., &lt;6) with proc frec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/801992#M315675</link>
      <description>&lt;P&gt;It seems like there are two ways to interpret your question.&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Do the frequency analysis on the full set of data, but only report the larger groups for which the count exceeds 6 obs.&lt;/P&gt;
&lt;P&gt;2. Exclude the groups that have 6 or fewer obs. Perform the frequency analysis on the remaining data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both methods are shown below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* The Type="Hybrid" class has less than 6 obs */
proc freq data=sashelp.cars;
   table Type / out=FreqOut;
run;

/* First interpretation: don't report that group.
   Note the percentage do not add to 100. */
proc print data=FreqOut;
where Count &amp;gt; 6;
run;

/* Second interpretation: delete small groups and 
   rerun the analysis. Now the percentages of the 
   remaining groups sum to 100. */
proc freq data=FreqOut;
   where Count &amp;gt; 6;
   table Type;
   weight Count;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Mar 2022 17:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/801992#M315675</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-03-14T17:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress small sample size (e.g., &lt;6) with proc frec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/802164#M315779</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;My title may be misleading.&amp;nbsp; I run proc freq and create a dataset based on it&lt;/P&gt;&lt;P&gt;My data looks like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yoko_0-1647347659506.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69465i5EDEF1A0D51BDE53/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Yoko_0-1647347659506.png" alt="Yoko_0-1647347659506.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There are only 1 level for var_name (var1), source (book1), and year (2022) each.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be true to the original data, I added an empty cell to 'code' as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The frequency and % are numeric variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to replace '1' with, say, '*'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yoko&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 12:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/802164#M315779</guid>
      <dc:creator>Yoko</dc:creator>
      <dc:date>2022-03-15T12:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress small sample size (e.g., &lt;6) with proc frec</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/802168#M315783</link>
      <description>&lt;P&gt;Well, this new explanation doesn't really help, nor is it clear what results you want from this data set or how this data set relates to your original problem description. Showing us data where the variables have only 1 value also isn't a helpful thing to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please give us a complete and clear explanation.&amp;nbsp;Please show us a larger and more realistic portion of your data (do not show us screen captures, we need to see your data as SAS data step code — &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;instructions&lt;/A&gt;), AND the desired output.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 12:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Suppress-small-sample-size-e-g-lt-6-with-proc-frec/m-p/802168#M315783</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-15T12:46:51Z</dc:date>
    </item>
  </channel>
</rss>

