<?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 Proc freq with one response option in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-with-one-response-option/m-p/250767#M56616</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS 9.4. I have a variable yes/no response options but all of answers were yes. I am using ods tables in proc freq to export the output to a data set and them export it (with DDE) to excel. My excel table is set up with both Yes and No so I should have Yes = 100% and No=0% in excel. Except SAS in the proc freq ods command only exports the 100%. Is there a way for me to export the output in a new data set that contains both Yes and No?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Feb 2016 06:45:47 GMT</pubDate>
    <dc:creator>mmjohnson</dc:creator>
    <dc:date>2016-02-18T06:45:47Z</dc:date>
    <item>
      <title>Proc freq with one response option</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-with-one-response-option/m-p/250767#M56616</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS 9.4. I have a variable yes/no response options but all of answers were yes. I am using ods tables in proc freq to export the output to a data set and them export it (with DDE) to excel. My excel table is set up with both Yes and No so I should have Yes = 100% and No=0% in excel. Except SAS in the proc freq ods command only exports the 100%. Is there a way for me to export the output in a new data set that contains both Yes and No?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 06:45:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-with-one-response-option/m-p/250767#M56616</guid>
      <dc:creator>mmjohnson</dc:creator>
      <dc:date>2016-02-18T06:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq with one response option</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-with-one-response-option/m-p/250776#M56619</link>
      <description>&lt;P&gt;PROC FREQ will only report (and output) values that are actually present in the dataset. If you need to have other values in your output dataset, you could create a default dataset containing all values and then do a join to complete your output dataset&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ynresponse;
input response $3.;
cards;
no
yes
;
run;

data wanted_result;
merge
  result (in=a)
  ynresponse (in=b)
;
by response;
if not b then count = 0; * avoids missing values;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Feb 2016 07:42:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-with-one-response-option/m-p/250776#M56619</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-18T07:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq with one response option</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-with-one-response-option/m-p/250789#M56624</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input response $3.;
cards;
yes
yes
yes
yes
;
run;
data temp;
response='no';
run;

data want;
 set have(in=ina) temp;
 weight=ina;
run;
proc freq data=want;
table response ;
weight weight/zeros;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Feb 2016 09:36:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-freq-with-one-response-option/m-p/250789#M56624</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-18T09:36:54Z</dc:date>
    </item>
  </channel>
</rss>

