<?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: How to make cells with zero counts show up with proc freq statements in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924367#M363854</link>
    <description>&lt;P&gt;I cannot visualize what you are trying to do. Can you provide input data and expected results. Just enough data so it demonstrates the issue.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Probably PROC FREQ is not the right tool.&amp;nbsp; For example PROC SUMMARY (aka MEANS) has methods to allow you to provide information on the complete list of possible values.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Apr 2024 13:42:59 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-04-15T13:42:59Z</dc:date>
    <item>
      <title>How to make cells with zero counts show up with proc freq statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924359#M363850</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to look at the number of asthma counts by zip code, but when I run the proc freq statement, the zip codes with zero counts of asthma do show up in the results viewer. How can I fix this? Example code below. I have already tried putting 'missing' at the end of the tables step.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=work.datarequest;&lt;BR /&gt;tables zipcode*ASTHMA / norow nocol nopercent;&lt;BR /&gt;where ASTHMA=1;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 13:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924359#M363850</guid>
      <dc:creator>steph_</dc:creator>
      <dc:date>2024-04-15T13:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to make cells with zero counts show up with proc freq statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924361#M363852</link>
      <description>&lt;P&gt;Don't use the WHERE statement.&amp;nbsp; That will prevent PROC FREQ from ever seeing the zipcodes that never have ASTHMA=1.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 13:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924361#M363852</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-04-15T13:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to make cells with zero counts show up with proc freq statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924362#M363853</link>
      <description>&lt;P&gt;Ideally, I wanted to keep the where statement so I do not have to format the data as much. Since I am only interested in Asthma cases.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 13:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924362#M363853</guid>
      <dc:creator>steph_</dc:creator>
      <dc:date>2024-04-15T13:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to make cells with zero counts show up with proc freq statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924367#M363854</link>
      <description>&lt;P&gt;I cannot visualize what you are trying to do. Can you provide input data and expected results. Just enough data so it demonstrates the issue.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Probably PROC FREQ is not the right tool.&amp;nbsp; For example PROC SUMMARY (aka MEANS) has methods to allow you to provide information on the complete list of possible values.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 13:42:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924367#M363854</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-04-15T13:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to make cells with zero counts show up with proc freq statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924406#M363865</link>
      <description>&lt;P&gt;&amp;nbsp;Here is some sample data. For these data, the PROC FREQ step shows only the frequencies for ASTHMA=1. It does not show any cells for missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
infile datalines missover;
input zipcode ASTHMA;
datalines;
12345 1
12345 1
12345 0
12345 
52345 1
52345 1
52345 0
52345 
52345 1
52345 
65432 0
65432 
;

proc freq data=Have;
tables zipcode*ASTHMA / norow nocol nopercent;
where ASTHMA=1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If this does not answer your question, please modify the input data to mimic the data that you have.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 17:44:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924406#M363865</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-04-15T17:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make cells with zero counts show up with proc freq statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924447#M363884</link>
      <description>First way is trying SPARSE option:&lt;BR /&gt;proc freq data=work.datarequest;&lt;BR /&gt;tables zipcode*ASTHMA / norow nocol nopercent  sparse ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Second way is using WEIGHT statement &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; mentioned this skill in one of his blog. Post your sample data that would be better to demonstrate how to use WEIGHT .</description>
      <pubDate>Tue, 16 Apr 2024 02:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-cells-with-zero-counts-show-up-with-proc-freq/m-p/924447#M363884</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-04-16T02:53:54Z</dc:date>
    </item>
  </channel>
</rss>

