<?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 - Text Variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-Text-Variables/m-p/685779#M208034</link>
    <description>&lt;P&gt;&amp;nbsp;The format makes it more readable, but PROC FREQ still ignores missing values, regardless of how it is formatted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to use the MISSING option in the TABLES statement to tell PROC FREQ to count the missing values&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_freq_syntax08.htm&amp;amp;locale=en#procstat.freq.freqmissingopt"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_freq_syntax08.htm&amp;amp;locale=en#procstat.freq.freqmissingopt&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2020 17:58:53 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-09-22T17:58:53Z</dc:date>
    <item>
      <title>Proc Freq - Text Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-Text-Variables/m-p/685778#M208033</link>
      <description>&lt;P&gt;I have a data set with two text variables (tvar1 &amp;amp; tvar2) and one numeric variable (nvar)&lt;/P&gt;&lt;P&gt;I want to create these tables&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tvar2 is missing&amp;nbsp; &amp;nbsp; tvar2 is not missing&lt;/P&gt;&lt;P&gt;tvar1 is missing&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xx&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xx&lt;/P&gt;&lt;P&gt;tvar1 is not missing&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xx&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tvar1 is missing&amp;nbsp; &amp;nbsp; &amp;nbsp;tvar2 is not missing&lt;/P&gt;&lt;P&gt;nvar (values)&lt;/P&gt;&lt;P&gt;I can't figure it out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;proc format;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; value missing_ind .='missing' other='not missing';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp; then what do I do?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 17:55:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-Text-Variables/m-p/685778#M208033</guid>
      <dc:creator>dsky227</dc:creator>
      <dc:date>2020-09-22T17:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq - Text Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-Text-Variables/m-p/685779#M208034</link>
      <description>&lt;P&gt;&amp;nbsp;The format makes it more readable, but PROC FREQ still ignores missing values, regardless of how it is formatted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to use the MISSING option in the TABLES statement to tell PROC FREQ to count the missing values&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_freq_syntax08.htm&amp;amp;locale=en#procstat.freq.freqmissingopt"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_freq_syntax08.htm&amp;amp;locale=en#procstat.freq.freqmissingopt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 17:58:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-Text-Variables/m-p/685779#M208034</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-22T17:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq - Text Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-Text-Variables/m-p/685800#M208035</link>
      <description>&lt;P&gt;You use PROC FREQ, as shown in the&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2011/09/19/count-the-number-of-missing-values-for-each-variable.html" target="_self"&gt;examples in this article&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;For the first table, you can use&amp;nbsp;&lt;/P&gt;
&lt;P&gt;table tvar1*tvar2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure what you intend for the second table. For the columns, is there a typo? Do you mean&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;tvar1 is missing&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;tvar1&lt;/STRONG&gt; is not missing&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Do you want the count for each column for each discrete value of the numeric variable?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As always, sample data will make the questions clearer and the answers easier to describe.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 18:05:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-Text-Variables/m-p/685800#M208035</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-09-22T18:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Freq - Text Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-Text-Variables/m-p/685807#M208037</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/293197"&gt;@dsky227&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a data set with two text variables (tvar1 &amp;amp; tvar2) and one numeric variable (nvar)&lt;/P&gt;
&lt;P&gt;I want to create these tables&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tvar2 is missing&amp;nbsp; &amp;nbsp; tvar2 is not missing&lt;/P&gt;
&lt;P&gt;tvar1 is missing&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xx&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xx&lt;/P&gt;
&lt;P&gt;tvar1 is not missing&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xx&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xx&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tvar1 is missing&amp;nbsp; &amp;nbsp; &amp;nbsp;tvar2 is not missing&lt;/P&gt;
&lt;P&gt;nvar (values)&lt;/P&gt;
&lt;P&gt;I can't figure it out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I run&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;proc format;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; value missing_ind .='missing' other='not missing';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; then what do I do?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your format is only defined for NUMERIC values. You would need to make a similar format for character variables.&lt;/P&gt;
&lt;PRE&gt;proc format;
value $missing_ind 
' '='missing' 
other='not missing'
;

run;
&lt;/PRE&gt;
&lt;P&gt;The format can have the similar name because the $ means it is only for Character variables.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 18:09:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Freq-Text-Variables/m-p/685807#M208037</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-22T18:09:27Z</dc:date>
    </item>
  </channel>
</rss>

