<?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: Proc Freq showing up as Missing when Format is Specified as &amp;quot;Other&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313925#M68295</link>
    <description>&lt;P&gt;The short answer: &amp;nbsp;You need to add the MISSING option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tables race / missing;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The longer answer: &amp;nbsp;Within each grouping that the format defines, SAS stores a single value not a set of values. &amp;nbsp;It stores the lowest value that it finds that falls within the grouping. &amp;nbsp;In this case, missing is the lowest value that actually appears in the data and that falls within the "Other" range. &amp;nbsp;So SAS stores a missing value to represent the "Other" range and then decides that missing values should not be printed. &amp;nbsp;As an experiment, you coudl run the PROC FREQ (without the MISSING option) and add a WHERE statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where race &amp;gt; ' ';&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2016 00:15:46 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2016-11-24T00:15:46Z</dc:date>
    <item>
      <title>Proc Freq showing up as Missing when Format is Specified as "Other"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313906#M68285</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I apply the "other" format in proc freq (SAS 9.4), the table shows it as missing rather than "other". Has anyone ever encountered this problem before?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;&lt;BR /&gt;value $racef &lt;BR /&gt;  '10'='White' &lt;BR /&gt;   other = 'Other';&lt;BR /&gt;run;
&amp;nbsp;
proc freq data=pc_data;
format race&amp;nbsp;$racef.;
table race;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if things work as expected, the code above should yield:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV align="center"&gt;&amp;nbsp; Frequency Missing = 2 &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;WHITE: 66&lt;/TD&gt;&lt;TD&gt;90.41&lt;/TD&gt;&lt;TD&gt;66&lt;/TD&gt;&lt;TD&gt;90.41&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Other: 7&lt;/TD&gt;&lt;TD&gt;9.59&lt;/TD&gt;&lt;TD&gt;73&lt;/TD&gt;&lt;TD&gt;100.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But Instead, I'm getting the output below. I can post an actual dataset with the issue if needed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;&amp;nbsp;Frequency Missing = 9 &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;WHITE: 66&lt;/TD&gt;&lt;TD&gt;100.00&lt;/TD&gt;&lt;TD&gt;66&lt;/TD&gt;&lt;TD&gt;100.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Nov 2016 22:37:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313906#M68285</guid>
      <dc:creator>pkfamily</dc:creator>
      <dc:date>2016-11-23T22:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq showing up as Missing when Format is Specified as "Other"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313912#M68288</link>
      <description>&lt;P&gt;What are the values of &lt;EM&gt;race&lt;/EM&gt; that should be counted in &lt;STRONG&gt;Other&lt;/STRONG&gt; and not &lt;STRONG&gt;Missing&lt;/STRONG&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 22:54:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313912#M68288</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-11-23T22:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq showing up as Missing when Format is Specified as "Other"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313913#M68289</link>
      <description>&lt;P&gt;What are the values of &lt;EM&gt;race&lt;/EM&gt; that should be counted in &lt;STRONG&gt;Other&lt;/STRONG&gt; and not &lt;STRONG&gt;Missing&lt;/STRONG&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 22:55:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313913#M68289</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-11-23T22:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq showing up as Missing when Format is Specified as "Other"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313919#M68292</link>
      <description>&lt;P&gt;Thanks for replying!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'30', '42', '45', '48', '53'&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 23:28:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313919#M68292</guid>
      <dc:creator>pkfamily</dc:creator>
      <dc:date>2016-11-23T23:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq showing up as Missing when Format is Specified as "Other"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313925#M68295</link>
      <description>&lt;P&gt;The short answer: &amp;nbsp;You need to add the MISSING option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tables race / missing;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The longer answer: &amp;nbsp;Within each grouping that the format defines, SAS stores a single value not a set of values. &amp;nbsp;It stores the lowest value that it finds that falls within the grouping. &amp;nbsp;In this case, missing is the lowest value that actually appears in the data and that falls within the "Other" range. &amp;nbsp;So SAS stores a missing value to represent the "Other" range and then decides that missing values should not be printed. &amp;nbsp;As an experiment, you coudl run the PROC FREQ (without the MISSING option) and add a WHERE statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where race &amp;gt; ' ';&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 00:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313925#M68295</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-11-24T00:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq showing up as Missing when Format is Specified as "Other"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313927#M68296</link>
      <description>&lt;P&gt;Thank you! And I do appreciate the long answer. However, I do have a tiny qualm. When setting the format as:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;value $racef   '10'='White'  ''='Missing'  other = 'Other';run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Frequency Missing = 9&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;WHITE: 66&lt;/TD&gt;&lt;TD&gt;100.00&lt;/TD&gt;&lt;TD&gt;66&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;100.00&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Under your explanation, why would 'Other' still be assigned a value of missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 00:35:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313927#M68296</guid>
      <dc:creator>pkfamily</dc:creator>
      <dc:date>2016-11-24T00:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq showing up as Missing when Format is Specified as "Other"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313930#M68297</link>
      <description>&lt;P&gt;That definitely shouldn't happen! &amp;nbsp;Things I would look at:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Does it make a difference if you add a blank in the quotes: &amp;nbsp;&lt;FONT face="courier new,courier"&gt;' ' = 'Missing'&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;Did you accidentally define "Other" before defining "Missing"?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 24 Nov 2016 00:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313930#M68297</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-11-24T00:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq showing up as Missing when Format is Specified as "Other"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313932#M68298</link>
      <description>&lt;P&gt;Adding a space in ''='Missing' did the trick! This is bit disconcerting, since I have always been using '' and not ' ' when denoting missing values for character variables.... Thanks again though!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 00:45:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-showing-up-as-Missing-when-Format-is-Specified-as-quot/m-p/313932#M68298</guid>
      <dc:creator>pkfamily</dc:creator>
      <dc:date>2016-11-24T00:45:05Z</dc:date>
    </item>
  </channel>
</rss>

