<?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: Interval estimation for binomial proportion: Wilson interval in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260367#M50514</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/71777"&gt;@bigban777﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't checked all the details of the code you posted, but after the following corrections/modifications, the graphs are produced and look plausible:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Line 5 must read:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;alpha = &amp;amp;alpha;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;The calculation of&amp;nbsp;cover_cp fails in the degenerate cases x=0 and x=n, so these cases need to be handled separately:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if 0&amp;lt;x&amp;lt;n then
    cover_cp = (quantile('BETA', alpha/2 ,x,n-x+1) &amp;lt; p) and 
               (quantile('BETA', 1 - alpha/2 ,x+1,n-x) &amp;gt; p);
  else if x=0 then
    cover_cp = (0 &amp;lt; p) and (quantile('BETA', 1 - alpha/2 ,x+1,n-x) &amp;gt; p);
  else if x=n then
    cover_cp = (quantile('BETA', alpha/2 ,x,n-x+1) &amp;lt; p) and (1 &amp;gt; p);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Of course, the parameters in the call of macro REPCICOV have to be adjusted to the n and p range you want. The latter appears to be the interval [0, 1] in your graph. So, you could use&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%repcicov(n=50, lop = 0, hip = 1, byp = .001);&lt;/CODE&gt;&lt;/PRE&gt;
(Please choose the value of n yourself.)&lt;/LI&gt;
&lt;LI&gt;The x axis range needs to be adapted accordingly:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;axis2 order = (0 to 1 by 0.05) minor=none&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;If you want to see the graph for the Wilson interval alone, you can delete the other three plot requests or comment them out:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;plot (/* expcontrib_t expcontrib_p4 */ expcontrib_s /* expcontrib_cp */) * p &lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Thu, 31 Mar 2016 10:32:20 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2016-03-31T10:32:20Z</dc:date>
    <item>
      <title>Interval estimation for binomial proportion: Wilson interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260342#M50504</link>
      <description>&lt;P&gt;I need code for coverage probability (Wilson interval) to get following graph&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/2568i9E44CA9732C09359/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Снимок.PNG" title="Снимок.PNG" /&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S.&lt;/P&gt;&lt;P&gt;i found macro, but it didnt work for me.&lt;/P&gt;&lt;P&gt;Calculating the coverage probability for a given N and binomial p can be done in a single data step, summing the probability-weighted coverage indicators over the realized values of the random variate. Once this machinery is developed, we can call it repeatedly, using a macro, to find the results for different binomial p. We comment on the code internally.&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;%macro onep(n=,p=,alpha=.05);&lt;BR /&gt;data onep;&lt;BR /&gt;n = &amp;amp;n;&lt;BR /&gt;p = &amp;amp;p;&lt;BR /&gt;alpha = α&lt;BR /&gt;/* set up collectors of the weighted coverage indicators */&lt;BR /&gt;expcontrib_t = 0;&lt;BR /&gt;expcontrib_p4 = 0;&lt;BR /&gt;expcontrib_s = 0;&lt;BR /&gt;expcontrib_cp = 0;&lt;BR /&gt;/* loop through the possible observed successes x*/&lt;BR /&gt;do x = 0 to n;&lt;BR /&gt;  probobs = pdf('BINOM',x,p,n);  /* probability X=x */&lt;BR /&gt;  phat = x/n;&lt;BR /&gt;  zquant = quantile('NORMAl', 1 - alpha/2, 0, 1);&lt;BR /&gt;  p4 = (x+2)/(n + 4);&lt;BR /&gt;&lt;BR /&gt;  /* calculate the half-width of the t and plus4 intervals */&lt;BR /&gt;  thalf = quantile('T', 1 - alpha/2,(n-1)) * sqrt(phat*(1-phat)/n);&lt;BR /&gt;  p4half = zquant * sqrt(p4*(1-p4)/(n+4));&lt;BR /&gt;&lt;BR /&gt;  /* the score CI in R uses a Yates correction by default, and is &lt;BR /&gt;     reproduced here */&lt;BR /&gt;  yates = min(0.5, abs(x - (n*p)));&lt;BR /&gt;  z22n = (zquant**2)/(2*n);&lt;BR /&gt;  yl = phat-yates/n;&lt;BR /&gt;  yu = phat+yates/n;&lt;BR /&gt;  slower = (yl + z22n - zquant * sqrt( (yl*(1-yl)/n) + z22n / (2*n) )) /&lt;BR /&gt;    (1 + 2 * z22n); &lt;BR /&gt;  supper = (yu + z22n + zquant * sqrt( (yu*(1-yu)/n) + z22n / (2*n) )) /&lt;BR /&gt;    (1 + 2 * z22n); &lt;BR /&gt;&lt;BR /&gt;  /* cover = 1 if in the CI, 0 else */&lt;BR /&gt;  cover_t = ((phat - thalf) &amp;lt; p) and ((phat + thalf) &amp;gt; p);&lt;BR /&gt;  cover_p4 = ((p4 - p4half) &amp;lt; p) and ((p4 + p4half) &amp;gt; p);&lt;BR /&gt;  cover_s = (slower &amp;lt; p) and (supper &amp;gt; p);&lt;BR /&gt;  /* the Clopper-Pearson interval can be easily calculated on the fly */ &lt;BR /&gt;  cover_cp = (quantile('BETA', alpha/2 ,x,n-x+1) &amp;lt; p) and &lt;BR /&gt;    (quantile('BETA', 1 - alpha/2 ,x+1,n-x) &amp;gt; p); &lt;BR /&gt;&lt;BR /&gt;  /* cumulate the weighted probabilities */&lt;BR /&gt;  expcontrib_t = expcontrib_t + probobs * cover_t;&lt;BR /&gt;  expcontrib_p4 = expcontrib_p4 + probobs * cover_p4;&lt;BR /&gt;  expcontrib_s = expcontrib_s + probobs * cover_s;&lt;BR /&gt;  expcontrib_cp = expcontrib_cp + probobs * cover_cp;&lt;BR /&gt;  /* only save the last interation */&lt;BR /&gt;  if x = N then output;&lt;BR /&gt;  end;&lt;BR /&gt;run;&lt;BR /&gt;%mend onep;&lt;/PRE&gt;&lt;P&gt;The following macro calls the first one for a series of binomial p for a fixed N. Since the macro %do loop can only iterate through integers, we have to do a little division; the %sysevelf function will do this within the macro.&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;%macro repcicov(n=, lop=, hip=, byp=, alpha= .05);&lt;BR /&gt;/* need an empty data set to store the results */&lt;BR /&gt;data summ; set _null_; run;&lt;BR /&gt;%do stepp = %sysevalf(&amp;amp;lop / &amp;amp;byp, floor) %to %sysevalf(&amp;amp;hip / &amp;amp;byp,floor);&lt;BR /&gt;  /* note that the p sent to the %onep macro is a &lt;BR /&gt;                           text string like "49 * .001" */&lt;BR /&gt;  %onep(n = &amp;amp;n, p = &amp;amp;stepp * &amp;amp;byp, alpha = &amp;amp;alpha);&lt;BR /&gt;  /* tack on the current results to the ones finished so far */&lt;BR /&gt;  /* this is a simple but inefficient way to add each binomial p into &lt;BR /&gt;     the output data set */&lt;BR /&gt;  data summ; set summ onep; run;&lt;BR /&gt;%end;&lt;BR /&gt;%mend repcicov;&lt;BR /&gt;&lt;BR /&gt;/* same parameters as in R */&lt;BR /&gt;%repcicov(n=50, lop = .01, hip = .3, byp = .001);&lt;/PRE&gt;&lt;P&gt;Finally, we can plot the results. One option shown here and not mentioned in the book are the mode=include option to the symbol statement, which allows the two distinct pieces of the T coverage to display correctly.&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;goptions reset=all;&lt;BR /&gt;legend1 label=none position=(bottom right inside)&lt;BR /&gt;        mode=share across=1 frame value = (h=2);&lt;BR /&gt;axis1 order = (0.85 to 1 by 0.05) minor=none &lt;BR /&gt;   label = (a=90 h=2 "Coverage probability") value=(h=2);&lt;BR /&gt;axis2 order = (0 to 0.3 by 0.05) minor=none &lt;BR /&gt;   label = (h=2 "True binomial p") value=(h=2);&lt;BR /&gt;symbol1 i = j v = none l =1 w=3 c=blue mode=include;&lt;BR /&gt;symbol2 i = j v = none l =1 w=3 c=red;&lt;BR /&gt;symbol3 i = j v = none l =1 w=3 c=lightgreen;&lt;BR /&gt;symbol4 i = j v = none l =1 w=3 c=black;&lt;BR /&gt;proc gplot data = summ;&lt;BR /&gt;plot (expcontrib_t expcontrib_p4  expcontrib_s  expcontrib_cp) * p &lt;BR /&gt;  / overlay legend vaxis = axis1 haxis = axis2 vref = 0.95 legend = legend1;&lt;BR /&gt;label expcontrib_t = "T approximation" expcontrib_p4 = "P4 method"&lt;BR /&gt;      expcontrib_s = "Score method" expcontrib_cp = "Exact (CP)";&lt;BR /&gt;run; quit;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 08:28:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260342#M50504</guid>
      <dc:creator>bigban777</dc:creator>
      <dc:date>2016-03-31T08:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Interval estimation for binomial proportion: Wilson interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260367#M50514</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/71777"&gt;@bigban777﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't checked all the details of the code you posted, but after the following corrections/modifications, the graphs are produced and look plausible:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Line 5 must read:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;alpha = &amp;amp;alpha;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;The calculation of&amp;nbsp;cover_cp fails in the degenerate cases x=0 and x=n, so these cases need to be handled separately:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if 0&amp;lt;x&amp;lt;n then
    cover_cp = (quantile('BETA', alpha/2 ,x,n-x+1) &amp;lt; p) and 
               (quantile('BETA', 1 - alpha/2 ,x+1,n-x) &amp;gt; p);
  else if x=0 then
    cover_cp = (0 &amp;lt; p) and (quantile('BETA', 1 - alpha/2 ,x+1,n-x) &amp;gt; p);
  else if x=n then
    cover_cp = (quantile('BETA', alpha/2 ,x,n-x+1) &amp;lt; p) and (1 &amp;gt; p);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Of course, the parameters in the call of macro REPCICOV have to be adjusted to the n and p range you want. The latter appears to be the interval [0, 1] in your graph. So, you could use&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%repcicov(n=50, lop = 0, hip = 1, byp = .001);&lt;/CODE&gt;&lt;/PRE&gt;
(Please choose the value of n yourself.)&lt;/LI&gt;
&lt;LI&gt;The x axis range needs to be adapted accordingly:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;axis2 order = (0 to 1 by 0.05) minor=none&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;If you want to see the graph for the Wilson interval alone, you can delete the other three plot requests or comment them out:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;plot (/* expcontrib_t expcontrib_p4 */ expcontrib_s /* expcontrib_cp */) * p &lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 31 Mar 2016 10:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260367#M50514</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-03-31T10:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Interval estimation for binomial proportion: Wilson interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260373#M50518</link>
      <description>&lt;P&gt;Is this the same thing PROC FREQ can do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_freq_details37.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_freq_details37.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 11:38:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260373#M50518</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-03-31T11:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Interval estimation for binomial proportion: Wilson interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260384#M50521</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i did change in my code as you said but it doesnt show graph. Here is my fixes code. Where is mistake?&lt;/P&gt;&lt;PRE&gt;%macro onep(n=,p=,alpha=.05);
data onep;
n = &amp;amp;n;
p = &amp;amp;p;
alpha = &amp;amp;alpha;
/* set up collectors of the weighted coverage indicators */
expcontrib_t = 0;
expcontrib_p4 = 0;
expcontrib_s = 0;
expcontrib_cp = 0;
/* loop through the possible observed successes x*/
do x = 0 to n;
  probobs = pdf('BINOM',x,p,n);  /* probability X=x */
  phat = x/n;
  zquant = quantile('NORMAl', 1 - alpha/2, 0, 1);
  p4 = (x+2)/(n + 4);

  /* calculate the half-width of the t and plus4 intervals */
  thalf = quantile('T', 1 - alpha/2,(n-1)) * sqrt(phat*(1-phat)/n);
  p4half = zquant * sqrt(p4*(1-p4)/(n+4));

  /* the score CI in R uses a Yates correction by default, and is 
     reproduced here */
  yates = min(0.5, abs(x - (n*p)));
  z22n = (zquant**2)/(2*n);
  yl = phat-yates/n;
  yu = phat+yates/n;
  slower = (yl + z22n - zquant * sqrt( (yl*(1-yl)/n) + z22n / (2*n) )) /
    (1 + 2 * z22n); 
  supper = (yu + z22n + zquant * sqrt( (yu*(1-yu)/n) + z22n / (2*n) )) /
    (1 + 2 * z22n); 

  /* cover = 1 if in the CI, 0 else */
  cover_t = ((phat - thalf) &amp;lt; p) and ((phat + thalf) &amp;gt; p);
  cover_p4 = ((p4 - p4half) &amp;lt; p) and ((p4 + p4half) &amp;gt; p);
  cover_s = (slower &amp;lt; p) and (supper &amp;gt; p);
  /* the Clopper-Pearson interval can be easily calculated on the fly */ 
  cover_cp = (quantile('BETA', alpha/2 ,x,n-x+1) &amp;lt; p) and 
    (quantile('BETA', 1 - alpha/2 ,x+1,n-x) &amp;gt; p); 
	
	if 0&amp;lt;x&amp;lt;n then
    cover_cp = (quantile('BETA', alpha/2 ,x,n-x+1) &amp;lt; p) and 
               (quantile('BETA', 1 - alpha/2 ,x+1,n-x) &amp;gt; p);
  else if x=0 then
    cover_cp = (0 &amp;lt; p) and (quantile('BETA', 1 - alpha/2 ,x+1,n-x) &amp;gt; p);
  else if x=n then
    cover_cp = (quantile('BETA', alpha/2 ,x,n-x+1) &amp;lt; p) and (1 &amp;gt; p);
  
  /* cumulate the weighted probabilities */
  expcontrib_t = expcontrib_t + probobs * cover_t;
  expcontrib_p4 = expcontrib_p4 + probobs * cover_p4;
  expcontrib_s = expcontrib_s + probobs * cover_s;
  expcontrib_cp = expcontrib_cp + probobs * cover_cp;
  /* only save the last interation */
  if x = N then output;
  end;
run;
%mend onep;


%macro repcicov(n=, lop=, hip=, byp=, alpha= .05);
/* need an empty data set to store the results */
data summ; set _null_; run;
%do stepp = %sysevalf(&amp;amp;lop / &amp;amp;byp, floor) %to %sysevalf(&amp;amp;hip / &amp;amp;byp,floor);
  /* note that the p sent to the %onep macro is a 
                           text string like "49 * .001" */
  %onep(n = &amp;amp;n, p = &amp;amp;stepp * &amp;amp;byp, alpha = &amp;amp;alpha);
  /* tack on the current results to the ones finished so far */
  /* this is a simple but inefficient way to add each binomial p into 
     the output data set */
  data summ; set summ onep; run;
%end;
%mend repcicov;

/* same parameters as in R */
%repcicov(n=50, lop = 0, hip = 1, byp = .001);

goptions reset=all;
legend1 label=none position=(bottom right inside)
        mode=share across=1 frame value = (h=2);
axis1 order = (0.85 to 1 by 0.05) minor=none 
   label = (a=90 h=2 "Coverage probability") value=(h=2);
axis2 order = (0 to 0.3 by 0.05) minor=none 
   label = (h=2 "True binomial p") value=(h=2);
symbol1 i = j v = none l =1 w=3 c=blue mode=include;
symbol2 i = j v = none l =1 w=3 c=red;
symbol3 i = j v = none l =1 w=3 c=lightgreen;
symbol4 i = j v = none l =1 w=3 c=black;
proc gplot data = summ;
plot (/*expcontrib_t expcontrib_p4 */ expcontrib_s  /*expcontrib_cp*/) * p 
  / overlay legend vaxis = axis1 haxis = axis2 vref = 0.95 legend = legend1;
label expcontrib_t = "T approximation" expcontrib_p4 = "P4 method"
      expcontrib_s = "Score method" expcontrib_cp = "Exact (CP)";
run; quit;&lt;/PRE&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 12:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260384#M50521</guid>
      <dc:creator>bigban777</dc:creator>
      <dc:date>2016-03-31T12:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Interval estimation for binomial proportion: Wilson interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260393#M50524</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/71777"&gt;@bigban777&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;i did change in my code as you said&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, you did, but neither correctly, nor completely.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The new definition of cover_cp should have &lt;EM&gt;replaced&lt;/EM&gt; the old one. So, just delete the two lines of code after the comment&lt;BR /&gt;"&lt;FONT face="courier new,courier"&gt;/* the Clopper-Pearson interval&lt;/FONT&gt; ...".&lt;/LI&gt;
&lt;LI&gt;You forgot to implement item 4:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;axis2 order = (0 to 1 by 0.05) minor=none&lt;/FONT&gt;&lt;BR /&gt;Please note that this axis definition is to replace the old axis2 statement.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;But even without these corrections your code produces a (partial) graph in my SAS session. Maybe you have to double-click the item representing the plot in the results window?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="results.png" style="width: 220px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29128i035BF5B10ED675C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="results.png" alt="results.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;[Edit 2019-04-30: Reattached screenshot, which had been deleted by mistake.]&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 17:47:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260393#M50524</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-04-30T17:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Interval estimation for binomial proportion: Wilson interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260399#M50525</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__﻿&lt;/a&gt;: Yes, I assume it's the same CI (but haven't checked). However, I guess it would&amp;nbsp;not help much to replace the data step formula in the OP's macro by one or more PROC FREQ calls.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 13:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260399#M50525</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-03-31T13:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Interval estimation for binomial proportion: Wilson interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260403#M50527</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@FreelanceReinhard wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;: Yes, I assume it's the same CI (but haven't checked). However, I guess it would&amp;nbsp;not help much to replace the data step formula in the OP's macro by one or more PROC FREQ calls.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not suggesting that you loop on PROC FREQ I was asking if the entire thing can be done with PROC FREQ.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might be that looping on PROC FREQ is better than "this" program.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 13:36:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260403#M50527</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-03-31T13:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Interval estimation for binomial proportion: Wilson interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260413#M50529</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;...&amp;nbsp;I was asking if the entire thing can be done with PROC FREQ.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't think so. PROC FREQ offers &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_freq_details115.htm" target="_blank"&gt;a variety of plots&lt;/A&gt;, but the type of graph produced by the OP's program is not among these, I think. Plotting coverage probabilities is rather something for researchers in mathematical statistics than for the target audience of PROC FREQ, i.e. users who are analyzing data.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:07:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260413#M50529</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-03-31T14:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Interval estimation for binomial proportion: Wilson interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260431#M50536</link>
      <description>&lt;P&gt;for some reason i couldnt get result. I use SAS on Demand.&lt;/P&gt;&lt;P&gt;Could you post graph what you got please.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:34:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260431#M50536</guid>
      <dc:creator>bigban777</dc:creator>
      <dc:date>2016-03-31T14:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Interval estimation for binomial proportion: Wilson interval</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260447#M50540</link>
      <description>&lt;P&gt;I am sorry, but I think this might&amp;nbsp;violate the terms of my SAS license agreement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not familiar with SAS on Demand. Are you unable to create &lt;EM&gt;any&lt;/EM&gt; graph with that software?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, I suggest you post this general problem in a new thread, e.g., in the "SAS/GRAPH and ODS Graphics" subforum.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 15:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Interval-estimation-for-binomial-proportion-Wilson-interval/m-p/260447#M50540</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-03-31T15:26:50Z</dc:date>
    </item>
  </channel>
</rss>

