<?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 does sas proc power calculate the sample size? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-does-sas-proc-power-calculate-the-sample-size/m-p/156127#M298926</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SAS proc power, there is an example for Determining Required Sample Size for a Two-Sample &lt;EM&gt;t&lt;/EM&gt; Test.&lt;/P&gt;&lt;P&gt;Here is the original code from SAS&lt;/P&gt;&lt;P&gt;proc power;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; twosamplemeans&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; groupmeans&amp;nbsp;&amp;nbsp; = (13 14) (13 14.5) (13 15)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stddev&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 1.2 1.7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; groupweights = 1 | 1 2 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; power&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0.9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ntotal&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = .;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I calculate the sample size by using formula, the result is always smaller the one obtained from SAS output.&lt;/P&gt;&lt;P&gt;For example, the first sample size I got is 60.466176 but SAS got 62.507429. Basically,&amp;nbsp; the fractional n total from SAS is always bigger then the one I calculated based on the common formula which is&lt;/P&gt;&lt;P&gt;n=4*stddev^2*(1.96+1.28)^2/(14-13). I want to know how SAS compute the sample size and base on what formula. I hope someone can help me to find it out. Thanks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jan 2014 19:41:25 GMT</pubDate>
    <dc:creator>saszyc</dc:creator>
    <dc:date>2014-01-29T19:41:25Z</dc:date>
    <item>
      <title>How does sas proc power calculate the sample size?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-does-sas-proc-power-calculate-the-sample-size/m-p/156127#M298926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SAS proc power, there is an example for Determining Required Sample Size for a Two-Sample &lt;EM&gt;t&lt;/EM&gt; Test.&lt;/P&gt;&lt;P&gt;Here is the original code from SAS&lt;/P&gt;&lt;P&gt;proc power;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; twosamplemeans&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; groupmeans&amp;nbsp;&amp;nbsp; = (13 14) (13 14.5) (13 15)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stddev&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 1.2 1.7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; groupweights = 1 | 1 2 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; power&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0.9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ntotal&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = .;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I calculate the sample size by using formula, the result is always smaller the one obtained from SAS output.&lt;/P&gt;&lt;P&gt;For example, the first sample size I got is 60.466176 but SAS got 62.507429. Basically,&amp;nbsp; the fractional n total from SAS is always bigger then the one I calculated based on the common formula which is&lt;/P&gt;&lt;P&gt;n=4*stddev^2*(1.96+1.28)^2/(14-13). I want to know how SAS compute the sample size and base on what formula. I hope someone can help me to find it out. Thanks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 19:41:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-does-sas-proc-power-calculate-the-sample-size/m-p/156127#M298926</guid>
      <dc:creator>saszyc</dc:creator>
      <dc:date>2014-01-29T19:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: How does sas proc power calculate the sample size?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-does-sas-proc-power-calculate-the-sample-size/m-p/156128#M298927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The documentation has a good description:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_power_a0000000986.htm" title="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_power_a0000000986.htm"&gt;SAS/STAT(R) 9.2 User's Guide, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Power&amp;gt;Details&amp;gt;Computational Methods and Formulas&amp;gt;Two Sample Means&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The results from proc power are the total sample size for both groups that match the results from a web calculator as well:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.stat.ubc.ca/~rollin/stats/ssize/n2.html" title="http://www.stat.ubc.ca/~rollin/stats/ssize/n2.html"&gt;Power/Sample Size Calculator&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your formula: 60.444&lt;/P&gt;&lt;P&gt;SAS : 64&lt;/P&gt;&lt;P&gt;UBC Calc: 62&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All seem within the same ballpark, though not exactly the same.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 20:06:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-does-sas-proc-power-calculate-the-sample-size/m-p/156128#M298927</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-01-29T20:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: How does sas proc power calculate the sample size?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-does-sas-proc-power-calculate-the-sample-size/m-p/156129#M298928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing to note is that you used the z distribution values (1.96, 1.28) in your calculation.&amp;nbsp; Use of the t distribution values will result in the more conservative number obtained by SAS.&amp;nbsp; Note that this is iterative, starting with the asymptotic normals, getting an estimate of sample size, calculating degrees of freedom and then obtaining t distribution values.&amp;nbsp; (At least I think that is the explanation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 13:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-does-sas-proc-power-calculate-the-sample-size/m-p/156129#M298928</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-01-30T13:54:53Z</dc:date>
    </item>
  </channel>
</rss>

