<?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 Surveyfreq in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Surveyfreq/m-p/898470#M355118</link>
    <description>It worked.&lt;BR /&gt;Thank you for your help.</description>
    <pubDate>Fri, 13 Oct 2023 11:41:22 GMT</pubDate>
    <dc:creator>sascode</dc:creator>
    <dc:date>2023-10-13T11:41:22Z</dc:date>
    <item>
      <title>Proc Surveyfreq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Surveyfreq/m-p/898393#M355077</link>
      <description>&lt;P&gt;Hi, I have dataset as follows:&lt;/P&gt;
&lt;PRE&gt;data have;
input x $3. y $4.;
datalines;
yes    
no  -  
    yes
yes    
;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Using&amp;nbsp; survey freq procedure,(proc surveyfreq) i am able to take the distribution of each variable. Missing category , is represented as space. Is anyway i can replace that space with the word "Missing" , to have something as follwos:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Table of x&lt;/P&gt;
&lt;P&gt;Missing(not just space)&amp;nbsp; &amp;nbsp;1 ....&lt;/P&gt;
&lt;P&gt;no&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 ...&lt;/P&gt;
&lt;P&gt;yes&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;
&lt;P&gt;Total&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; &amp;nbsp; &amp;nbsp; 4&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 20:23:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Surveyfreq/m-p/898393#M355077</guid>
      <dc:creator>sascode</dc:creator>
      <dc:date>2023-10-12T20:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Surveyfreq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Surveyfreq/m-p/898415#M355089</link>
      <description>&lt;P&gt;Your Have set has a value of a dash. Is that actually supposed to be there?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With SAS anytime the question involves "display a value" then Proc Format quite often has an answer and possibly the easiest:&lt;/P&gt;
&lt;PRE&gt;Proc format;
value $mymiss
' '='Missing';
run;


proc freq data=have;
  tables x /missing;
  format x $mymiss.;
run;&lt;/PRE&gt;
&lt;P&gt;Since the underlying value is actually missing there are times you have to tell the Procedure that you want the missing included as a level of the variable in the results. In Surveyfreq this would be done on the Proc statement:&lt;/P&gt;
&lt;PRE&gt;Proc surveyfreq data=have missing;
  tables x /;
  format x $mymiss.;
run;&lt;/PRE&gt;
&lt;P&gt;The format statement tells SAS to use the custom format for the variable.&lt;/P&gt;
&lt;P&gt;If that dash is supposed to also represent missing you could modify the format to include the - as well:&lt;/P&gt;
&lt;PRE&gt;Proc format;
value $mymiss
' ' , '-'   ='Missing';
run;&lt;/PRE&gt;
&lt;P&gt;which would for report purposes treat the blank and the dash as missing.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 21:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Surveyfreq/m-p/898415#M355089</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-12T21:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Surveyfreq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Surveyfreq/m-p/898470#M355118</link>
      <description>It worked.&lt;BR /&gt;Thank you for your help.</description>
      <pubDate>Fri, 13 Oct 2023 11:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Surveyfreq/m-p/898470#M355118</guid>
      <dc:creator>sascode</dc:creator>
      <dc:date>2023-10-13T11:41:22Z</dc:date>
    </item>
  </channel>
</rss>

