<?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: How to calculate standard deviation or confidence interval for a proportion? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-standard-deviation-or-confidence-interval-for-a/m-p/355449#M83245</link>
    <description>&lt;P&gt;If you're trying to compare these, a Chi-Square (via PROC FREQ) test would be appropriate to test the overall distribution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do the pairwise comparisons, make sure to include a Bonferonni correction for multiple testing but&amp;nbsp;ideally you should calculate an age/sex standardized rate unless you have reason to believe your clinics have the same patient distribution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you decide to standardize, check out PROC STRATE&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_stdrate_examples01.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_stdrate_examples01.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2017 00:10:32 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-05-03T00:10:32Z</dc:date>
    <item>
      <title>How to calculate standard deviation or confidence interval for a proportion?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-standard-deviation-or-confidence-interval-for-a/m-p/355434#M83241</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am calculating an overall 5-year rate for survivors (#ppl surviving after 5 years after diagnosis / # ppl diagnosed with cancer). My dataset is quite simple, it has pt_id, clinic_id and survival (0/1). I have decided to ignore my clinic_id since I am interested in the overall rate. How do I use SAS to calculate the standard deviation? PROC FREQ doesn't have anything I can find easily.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or should I be using a confidence interval instead?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ultimately I'd like to know if each of my clinics is statistically higher or lower than my overall clinic rate.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 23:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-standard-deviation-or-confidence-interval-for-a/m-p/355434#M83241</guid>
      <dc:creator>sharonlee</dc:creator>
      <dc:date>2017-05-02T23:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate standard deviation or confidence interval for a proportion?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-standard-deviation-or-confidence-interval-for-a/m-p/355436#M83242</link>
      <description>&lt;P&gt;Proc Mean or Summary may work for simple analysis. The Mean of a 0/1 coded variable is actually the percentage of 1's.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc summary data = have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class clinic_id;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var survival;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out= want mean=rate Lclm = LowerCl UCLM=UpperCl;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;The _type_ variable will have a value of 0 indicating overall rate or limits for the data and each clinic will have it's result on a separate line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or a more human readable:&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=have;
   class clinic;
   var survival;
   table all clinic,
         survival*(mean='Rate'*f=percent8.2  
                   lclm='Lower CL'**f=percent8.2 
                   uclm='Upper CL'**f=percent8.2);
   ;
run;&lt;/PRE&gt;
&lt;P&gt;The results will be rate of 1 responses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 23:24:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-standard-deviation-or-confidence-interval-for-a/m-p/355436#M83242</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-02T23:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate standard deviation or confidence interval for a proportion?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-standard-deviation-or-confidence-interval-for-a/m-p/355449#M83245</link>
      <description>&lt;P&gt;If you're trying to compare these, a Chi-Square (via PROC FREQ) test would be appropriate to test the overall distribution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do the pairwise comparisons, make sure to include a Bonferonni correction for multiple testing but&amp;nbsp;ideally you should calculate an age/sex standardized rate unless you have reason to believe your clinics have the same patient distribution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you decide to standardize, check out PROC STRATE&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_stdrate_examples01.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_stdrate_examples01.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 00:10:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-standard-deviation-or-confidence-interval-for-a/m-p/355449#M83245</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-03T00:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate standard deviation or confidence interval for a proportion?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-standard-deviation-or-confidence-interval-for-a/m-p/355729#M83323</link>
      <description>&lt;P&gt;Thanks, ballardw!&lt;/P&gt;&lt;P&gt;The proc summary didn't work for reason reason (I get all 0 values), but the proc tabulate worked great, except that I had to change it so that there was only one astrix instead of two (modified below).&lt;/P&gt;&lt;P&gt;Appreciate you taking the time to help out!&lt;/P&gt;&lt;PRE&gt;proc tabulate data=have;
   class clinic;
   var survival;
   table all clinic,
         survival*(mean='Rate'*f=percent8.2  
                   lclm='Lower CL'*f=percent8.2 
                   uclm='Upper CL'*f=percent8.2);
   ;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 19:09:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-calculate-standard-deviation-or-confidence-interval-for-a/m-p/355729#M83323</guid>
      <dc:creator>sharonlee</dc:creator>
      <dc:date>2017-05-03T19:09:42Z</dc:date>
    </item>
  </channel>
</rss>

