<?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 how to get l_bin and U_bin values in ods output dataset in proc freq in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-l-bin-and-U-bin-values-in-ods-output-dataset-in-proc/m-p/884922#M349617</link>
    <description>&lt;P&gt;Dear&lt;/P&gt;
&lt;P&gt;&amp;nbsp;How to get 'l_bin' and 'U_bin' values in ods output dataset='m2'&amp;nbsp; in method 2&amp;nbsp; similar to variables I got in method 1&amp;nbsp; 'm1&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cc;
aval_=1;
output;
aval_=0;
output;
run;
/* method 1 */
proc freq data=cc;

tables aval_/binomial(level='1');
output out=m1 binomial;
run;
/* method 2 */
ods trace on;
ods output onewayfreqs = dd binomialcls=m2;
proc freq data=count1;
/* where aval &amp;gt; .; */
tables aval_/binomial(exact) alpha=0.05;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;' dataset. Please suggest thank you&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jul 2023 22:22:34 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2023-07-15T22:22:34Z</dc:date>
    <item>
      <title>how to get l_bin and U_bin values in ods output dataset in proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-l-bin-and-U-bin-values-in-ods-output-dataset-in-proc/m-p/884922#M349617</link>
      <description>&lt;P&gt;Dear&lt;/P&gt;
&lt;P&gt;&amp;nbsp;How to get 'l_bin' and 'U_bin' values in ods output dataset='m2'&amp;nbsp; in method 2&amp;nbsp; similar to variables I got in method 1&amp;nbsp; 'm1&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cc;
aval_=1;
output;
aval_=0;
output;
run;
/* method 1 */
proc freq data=cc;

tables aval_/binomial(level='1');
output out=m1 binomial;
run;
/* method 2 */
ods trace on;
ods output onewayfreqs = dd binomialcls=m2;
proc freq data=count1;
/* where aval &amp;gt; .; */
tables aval_/binomial(exact) alpha=0.05;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;' dataset. Please suggest thank you&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 22:22:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-l-bin-and-U-bin-values-in-ods-output-dataset-in-proc/m-p/884922#M349617</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2023-07-15T22:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to get l_bin and U_bin values in ods output dataset in proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-l-bin-and-U-bin-values-in-ods-output-dataset-in-proc/m-p/884927#M349621</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68272"&gt;@knveraraju91&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add the WALD keyword to the list of BINOMIAL options:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods output binomialcls=m2;
proc freq data=&lt;STRONG&gt;cc&lt;/STRONG&gt;;
tables aval_ / binomial(&lt;STRONG&gt;level='1'&lt;/STRONG&gt; exact &lt;STRONG&gt;&lt;FONT color="#3366FF"&gt;wald&lt;/FONT&gt;&lt;/STRONG&gt;);
run;&lt;/PRE&gt;
&lt;P&gt;Dataset M2 will then contain a second&lt;I&gt; &lt;/I&gt;observation with &lt;FONT face="courier new,courier"&gt;Type='Wald'&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;LowerCL&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;UpperCL&lt;/FONT&gt; values matching the values of &lt;FONT face="courier new,courier"&gt;L_BIN&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;U_BIN&lt;/FONT&gt;, respectively, of the M1 dataset (while the observation with &lt;FONT face="courier new,courier"&gt;Type='Clopper-Pearson (Exact)'&lt;/FONT&gt;&amp;nbsp;corresponds to variables &lt;FONT face="courier new,courier"&gt;XL_BIN&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;XU_BIN&lt;/FONT&gt; in dataset M1).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 06:39:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-l-bin-and-U-bin-values-in-ods-output-dataset-in-proc/m-p/884927#M349621</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-07-16T06:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to get l_bin and U_bin values in ods output dataset in proc freq</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-l-bin-and-U-bin-values-in-ods-output-dataset-in-proc/m-p/884928#M349622</link>
      <description>&lt;P&gt;First, use the same data set. Your code for method 2 points to a different data set than method 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use cl=Wald for the binomial option to get the same values, different variable names though, at least for your example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods output onewayfreqs = dd binomialcls=m2;
proc freq data=cc;
/* where aval &amp;gt; .; */
tables aval_/binomial(cl=wald )  alpha=0.05;
run;&lt;/PRE&gt;
&lt;P&gt;Note that the binomialcls output dataset includes a variable TYPE that indicates the calculation used. If you want both the Exact and another method (or more) then use additional Tables statements:&lt;/P&gt;
&lt;PRE&gt;ods output onewayfreqs = dd binomialcls=m2;
proc freq data=cc;
/* where aval &amp;gt; .; */
tables aval_/binomial(exact )  alpha=0.05;
tables aval_/binomial(cl=wald )  alpha=0.05;
run;&lt;/PRE&gt;
&lt;P&gt;Note that other processing would be needed to reduce this to a single observation per table statement ( and you can have many!) or combinations of variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 06:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-l-bin-and-U-bin-values-in-ods-output-dataset-in-proc/m-p/884928#M349622</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-07-16T06:49:54Z</dc:date>
    </item>
  </channel>
</rss>

