<?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: Sample size calculations for a one-sided tolerance limit in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-calculations-for-a-one-sided-tolerance-limit/m-p/893046#M44248</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe in JMP you can also do this through a menu driven platform.&lt;/P&gt;
&lt;P&gt;(JMP is a wholly owned subsidiary of SAS --&amp;gt; &lt;A href="https://community.jmp.com/" target="_blank"&gt;https://community.jmp.com/&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS, you will need some programming.&lt;/P&gt;
&lt;P&gt;Start here :&lt;/P&gt;
&lt;UL class="lia-list-style-type-square"&gt;
&lt;LI&gt;Using simulation to estimate the power of a statistical test &lt;BR /&gt;By Rick Wicklin on The DO Loop May 30, 2013&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2013/05/30/simulation-power.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2013/05/30/simulation-power.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Using simulation to compute a &lt;STRONG&gt;power curve&lt;/STRONG&gt; &lt;BR /&gt;By Rick Wicklin on The DO Loop June 5, 2013&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2013/06/05/simulation-power-curve.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2013/06/05/simulation-power-curve.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Estimate a &lt;STRONG&gt;power curve&lt;/STRONG&gt; in parallel in SAS Viya &lt;BR /&gt;By Rick Wicklin on The DO Loop August 17, 2020&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2020/08/17/power-curve-parallel-sas-viya.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2020/08/17/power-curve-parallel-sas-viya.html&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 20:19:38 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2023-09-06T20:19:38Z</dc:date>
    <item>
      <title>Sample size calculations for a one-sided tolerance limit</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-calculations-for-a-one-sided-tolerance-limit/m-p/892922#M44246</link>
      <description>&lt;P&gt;I need to determine the minimum sample size/create a power curve for computing a 95%-95% upper tolerance limit. I see that proc power has functionality for many power computations but not for tolerance intervals.&amp;nbsp; From what I have investigated thus far, I would need to set up monte carlo simulations to create the power curve. Is there an easier way? Minitab and other packages have this functionality through menu driven platforms so I am hoping that with the inclusiveness of SAS procedures there is a way to perform this task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice would be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 13:05:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-calculations-for-a-one-sided-tolerance-limit/m-p/892922#M44246</guid>
      <dc:creator>djgetty</dc:creator>
      <dc:date>2023-09-06T13:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size calculations for a one-sided tolerance limit</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-calculations-for-a-one-sided-tolerance-limit/m-p/893046#M44248</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe in JMP you can also do this through a menu driven platform.&lt;/P&gt;
&lt;P&gt;(JMP is a wholly owned subsidiary of SAS --&amp;gt; &lt;A href="https://community.jmp.com/" target="_blank"&gt;https://community.jmp.com/&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS, you will need some programming.&lt;/P&gt;
&lt;P&gt;Start here :&lt;/P&gt;
&lt;UL class="lia-list-style-type-square"&gt;
&lt;LI&gt;Using simulation to estimate the power of a statistical test &lt;BR /&gt;By Rick Wicklin on The DO Loop May 30, 2013&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2013/05/30/simulation-power.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2013/05/30/simulation-power.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Using simulation to compute a &lt;STRONG&gt;power curve&lt;/STRONG&gt; &lt;BR /&gt;By Rick Wicklin on The DO Loop June 5, 2013&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2013/06/05/simulation-power-curve.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2013/06/05/simulation-power-curve.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Estimate a &lt;STRONG&gt;power curve&lt;/STRONG&gt; in parallel in SAS Viya &lt;BR /&gt;By Rick Wicklin on The DO Loop August 17, 2020&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2020/08/17/power-curve-parallel-sas-viya.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2020/08/17/power-curve-parallel-sas-viya.html&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 20:19:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-calculations-for-a-one-sided-tolerance-limit/m-p/893046#M44248</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-09-06T20:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size calculations for a one-sided tolerance limit</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-calculations-for-a-one-sided-tolerance-limit/m-p/893200#M44253</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/451270"&gt;@djgetty&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at the formulas in the Minitab® 20 documentation&amp;nbsp;&lt;A href="https://support.minitab.com/en-us/minitab/20/help-and-how-to/statistics/power-and-sample-size/how-to/sample-size/sample-size-for-tolerance-intervals/methods-and-formulas/methods-and-formulas/" target="_blank" rel="noopener"&gt;Methods and formulas for Sample Size for Tolerance Intervals&lt;/A&gt;, I think you can compute the sample size in a DATA step. You can also define a function (&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n0pio2crltpr35n1ny010zrfbvc9.htm" target="_blank" rel="noopener"&gt;PROC FCMP&lt;/A&gt;) for this purpose. The latter will be particularly convenient when it comes to creating graphs visualizing the relationship between sample size and other statistics in the context of tolerance intervals. (How do you define a "power curve" for a tolerance interval rather than a hypothesis test?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example for the case of a normal distribution: The DATA step below simply passes through the sample sizes n=2, 3, 4, ..., until the criterion for the one-sided tolerance interval is met (see the Minitab documentation linked above; I denote their parameters &lt;FONT face="symbol"&gt;a&lt;/FONT&gt;, &lt;FONT face="symbol"&gt;a&lt;/FONT&gt;* and &lt;FONT face="symbol"&gt;e&lt;/FONT&gt; by &lt;FONT face="courier new,courier"&gt;a&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;ax&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;e&lt;/FONT&gt;, respectively).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
a=0.05;
p=0.95;
e=0.03;
ax=0.05;
do n=2 to 1e6 until(q1&amp;lt;=q2);
  q1=quantile('t',1-a,n-1,probit(p)*sqrt(n));
  q2=quantile('t',ax,n-1,probit(p+e)*sqrt(n));
end;
put n=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The same result, &lt;FONT face="courier new,courier"&gt;n=177&lt;/FONT&gt;, can be obtained with the user-defined function &lt;FONT face="courier new,courier"&gt;ntolu&lt;/FONT&gt;&amp;nbsp;defined below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fcmp outlib=work.funcs.test;
function f(a,p,e,ax,n);
  return(quantile('t', ax,n-1,sqrt(n)*probit(p+e))
        -quantile('t',1-a,n-1,sqrt(n)*probit(p)));
endsub;

function ntolu(a,p,e,ax,init);
  n=ceil(solve('f',{init},0,a,p,e,ax,.));
  return(n);
endsub;
run;

options cmplib=work.funcs;

data _null_;
n=ntolu(0.05,0.95,0.03,0.05,100);
put n=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For other parameter values you may or may not need to adjust the initial value (&lt;FONT face="courier new,courier"&gt;init=100&lt;/FONT&gt;) in the last argument of the function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Simulated data could be used to &lt;EM&gt;verify&lt;/EM&gt; that the sample size is sufficient to achieve the target values specified in the parameters.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 18:26:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-calculations-for-a-one-sided-tolerance-limit/m-p/893200#M44253</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-09-07T18:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size calculations for a one-sided tolerance limit</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-calculations-for-a-one-sided-tolerance-limit/m-p/893202#M44254</link>
      <description>&lt;P&gt;Thank you. This is the type of solution I was looking for. I will give it a try and see where it goes. I appreciate you taking the time to help me with this issue!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 18:31:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-calculations-for-a-one-sided-tolerance-limit/m-p/893202#M44254</guid>
      <dc:creator>djgetty</dc:creator>
      <dc:date>2023-09-07T18:31:26Z</dc:date>
    </item>
  </channel>
</rss>

