<?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: proc power in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/518934#M26438</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/249626"&gt;@Bim&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have one more question.&lt;BR /&gt;&lt;BR /&gt;If the correlation is zero in the proc power for paired equivalents test, should I expect that the calculated power of the paired equivalents test is the same as the power for not paired equivalents test?&lt;BR /&gt;&lt;BR /&gt;When I run the following two codes I get different results. The power for the paired test is 0.710 while the power for the not paired equivalents test is 0.899.&lt;BR /&gt;&lt;BR /&gt;Why there is a difference, if the standard deviations, mean difference and sample size are the same in both cases?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The reason for the difference is that different tests are performed: The equivalence test&amp;nbsp;is based on the paired t-test in the former case and on the&amp;nbsp;&lt;SPAN&gt;two-sample t-test in the latter case.&lt;/SPAN&gt; The paired t-test uses a different estimator for the standard error than the two-sample t-test (see the formulas for SE in sections "&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ttest_details07.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank"&gt;One-Sample Design&lt;/A&gt;" and "&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ttest_details14.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank"&gt;Two-Independent-Sample Design&lt;/A&gt;"&amp;nbsp;of the PROC TTEST documentation). Note that in the tests the standard deviations are&amp;nbsp;&lt;EM&gt;estimated&lt;/EM&gt;&amp;nbsp;from the samples. Our specification sigma=2 is not used there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a consequence, the t-statistics have different denominators (while the numerators are the same). Essentially, the different terms are&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;the corrected sum of squares of the paired differences (i.e. n squares)&amp;nbsp;in the case of the paired t-test&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;the corrected sum of squares of&amp;nbsp;the samples in group 1 plus&amp;nbsp;the corrected sum of squares of&amp;nbsp;the samples in group 2 (i.e. 2n squares) in the case of the two-sample t-test.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;With our assumption of zero correlation these two may even have the same expected value, but the crucial point is that&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;the degrees of freedom are different:&amp;nbsp;n-1 vs. 2(n-1). In your example with the small&amp;nbsp;n=3 the difference between the corresponding t-distributions (i.e. with df=2 vs. 4) is particularly large.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It's not difficult to verify the power calculation with a simulation (using the two different tests):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let n=3;
%let mu_diff=1;
%let stddev=2;
%let theta_L=-7;
%let theta_U=7;
%let alpha=0.05;
%let nsim=1e6;

proc format;
value signif
low-&amp;amp;alpha   = 'significant'
&amp;amp;alpha&amp;lt;-high = 'not significant';
run;

data pairs;
call streaminit(27182818);
do i=1 to &amp;amp;nsim;
  do id=1 to &amp;amp;n;
    x1=rand('normal',0,&amp;amp;stddev);
    x2=rand('normal',&amp;amp;mu_diff,&amp;amp;stddev);
    output;
  end;
end;
run;

proc transpose data=pairs out=twosamp(drop=id rename=(col1=x)) name=grp;
by i id;
var x1 x2;
run;

ods graphics off;
ods exclude all;
ods noresults;

proc ttest data=pairs tost(&amp;amp;theta_L, &amp;amp;theta_U);
by i;
paired x1*x2;
ods output EquivTests=eqtst1(where=(test='Overall'));
run;

proc ttest data=twosamp tost(&amp;amp;theta_L, &amp;amp;theta_U);
by i;
class grp;
ods output EquivTests=eqtst2(where=(variances='Equal' &amp;amp; test='Overall'));
run;

ods exclude none;
ods results;

ods exclude BinomialTest;
proc freq data=eqtst1;
format probt signif.;
tables probt / binomial;
run;

ods exclude BinomialTest;
proc freq data=eqtst2;
format probt signif.;
tables probt / binomial;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Result of the first PROC FREQ step (paired-sample design):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;                               P-Value

                                            Cumulative    Cumulative
          Probt    Frequency     Percent     Frequency      Percent
--------------------------------------------------------------------
significant          709895       70.99        709895        70.99
not significant      290105       29.01       1000000       100.00


      Binomial Proportion
      Probt = significant

Proportion                0.7099
ASE                       0.0005
95% Lower Conf Limit      0.7090
95% Upper Conf Limit      0.7108

Exact Conf Limits
95% Lower Conf Limit      0.7090
95% Upper Conf Limit      0.7108

Sample Size = 1000000&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Result of the second PROC FREQ step&amp;nbsp;(two-independent-sample design):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;                               P-Value

                                            Cumulative    Cumulative
          Probt    Frequency     Percent     Frequency      Percent
--------------------------------------------------------------------
significant          898786       89.88        898786        89.88
not significant      101214       10.12       1000000       100.00


      Binomial Proportion
      Probt = significant

Proportion                0.8988
ASE                       0.0003
95% Lower Conf Limit      0.8982
95% Upper Conf Limit      0.8994

Exact Conf Limits
95% Lower Conf Limit      0.8982
95% Upper Conf Limit      0.8994

Sample Size = 1000000&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Note that I used PROC TRANSPOSE to create the independent samples from the paired samples so that identical data are used for the two tests. The first components of the three pairs comprise group 1 (&lt;FONT face="courier new,courier"&gt;grp='x1'&lt;/FONT&gt;) and the second components of the three pairs comprise group&amp;nbsp;2 (&lt;FONT face="courier new,courier"&gt;grp='x2'&lt;/FONT&gt;) in the two-independent-sample design.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Dec 2018 20:27:23 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2018-12-05T20:27:23Z</dc:date>
    <item>
      <title>proc power</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/518404#M26417</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the power of equivalence test for paired data. I use the following code:&lt;/P&gt;&lt;P&gt;/* ************************************************************************ */&lt;/P&gt;&lt;P&gt;/* This program is used to calculate the power of an equivalence test &amp;nbsp; */&lt;/P&gt;&lt;P&gt;/* between two groups of paired data based the following data:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;/* mean difference and standard deviation&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;/* of the differences between each pair; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;/* coefficient of correlation between the two groups;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;/* sample size (number of pairs);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;/* significance level, and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;/* acceptance interval.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;/* proc POWER is used for the calculation&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;*/&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;*/************************************************************************* */&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;power&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pairedmeans &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TEST=EQUIV_DIFF &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; meandiff=&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stddev=&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; power&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &lt;STRONG&gt;.&lt;/STRONG&gt; &amp;nbsp;&amp;nbsp; /*to be calculated*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; npairs =&lt;STRONG&gt;3&lt;/STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; corr = &lt;STRONG&gt;0.9&lt;/STRONG&gt; &lt;STRONG&gt;0.1&lt;/STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alpha &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;STRONG&gt;0.05&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; upper = &lt;STRONG&gt;7&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lower =-&lt;STRONG&gt;7&lt;/STRONG&gt;; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods output output = pow;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the SAS documentation the paired equivalence test is not described very clear.&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;In my code I use the standard deviation for differences (first, a difference is calculated for each of 3 pairs, and then the standard deviation is calculated from 3 differences). Is it correct to use the standard deviation for differences or should I use the common standard deviation per group?&lt;/LI&gt;&lt;/OL&gt;&lt;OL&gt;&lt;LI&gt;How the correlation coefficient is used in the calculation of power?&lt;/LI&gt;&lt;LI&gt;What is a formula for the power calculated in proc power?&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 04 Dec 2018 14:24:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/518404#M26417</guid>
      <dc:creator>Bim</dc:creator>
      <dc:date>2018-12-04T14:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc power</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/518520#M26430</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/249626"&gt;@Bim&lt;/a&gt;&amp;nbsp;and&amp;nbsp;welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for asking these interesting questions.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/249626"&gt;@Bim&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;In my code I use the standard deviation for differences (first, a difference is calculated for each of 3 pairs, and then the standard deviation is calculated from 3 differences). Is it correct to use the standard deviation for differences or should I use the common standard deviation per group?&lt;/LI&gt;
&lt;/OL&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_power_syntax71.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en#statug.power.powpmenstddev" target="_blank"&gt;documentation&lt;/A&gt; says that STDDEV "s&lt;SPAN&gt;pecifies the standard deviation assumed to be common to both members of a pair." So, in general it is &lt;EM&gt;not&lt;/EM&gt; correct to enter the standard deviation of the differences here*. You can either specify a common standard deviation (STDDEV= option) or the individual standard deviation of&amp;nbsp;each member of the pair (PAIREDSTDDEVS= option, alias: PSTDS=)&amp;nbsp;if the two sigmas are different. So, a specification&amp;nbsp;&lt;FONT face="courier new,courier"&gt;pstds=(2,2)&lt;/FONT&gt; would be equivalent to &lt;FONT face="courier new,courier"&gt;stddev=2&lt;/FONT&gt;. (I verified this with your example.)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;_____________________&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;* Edit: A second look at the formulas (see answers to the other questions) reveals: Both the individual standard deviations and the correlation coefficient are used in the power calculation only through the &lt;SPAN&gt;standard deviation of the differences&lt;/SPAN&gt;. So, you &lt;EM&gt;can&lt;/EM&gt; enter that value in the STDDEV= option &lt;U&gt;&lt;EM&gt;if&lt;/EM&gt;&lt;/U&gt; you specify CORR=0.5 because then &lt;FONT face="courier new,courier"&gt;sigma_diff=sqrt(2*sigma**2-2*0.5*sigma**2)=sigma&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;_____________________&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/249626"&gt;@Bim&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;OL&gt;
&lt;LI&gt;How the correlation coefficient is used in the calculation of power?&lt;/LI&gt;
&lt;/OL&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is used in the formula for the standard deviation of the differences (which is calculated from the two individual standard deviations and the correlation coefficient). See the second link in my answer to your next question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/249626"&gt;@Bim&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;2. What is a formula for the power calculated in proc power?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can find the formula in the &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_power_toc.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank"&gt;PROC POWER documentation&lt;/A&gt; --&amp;gt; Details --&amp;gt; Computational Methods and Formulas&lt;BR /&gt; --&amp;gt;&amp;nbsp;&lt;SPAN class="section_toc"&gt;&lt;A class="ng-scope" tabindex="0" href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_power_details68.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" data-docset-id="statug" data-docset-version="14.3" data-original-href="statug_power_details68.htm"&gt;Analyses in the PAIREDMEANS Statement&lt;/A&gt;, section "&lt;EM&gt;Additive Equivalence Test for Mean Difference with Normal Data (TEST=EQUIV_DIFF).&lt;/EM&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just for fun, let's check if we can replicate the result from PROC POWER by implementing the formula using only Base SAS. Let's assume, just as an example, that the common standard deviation was 2 (as specified in your code).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=pow;
id corr;
var power;
format power 12.10;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;Corr           Power

 0.9    0.9999975766
 0.1    0.7509335978&lt;/PRE&gt;
&lt;P&gt;Now our own computation:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data param;
N=3;
alpha=0.05;
mu_diff=1;
rho=0.9; /* rho=0.1; */
sigma1=2;
sigma2=2;
sigma_diff=sqrt(sigma1**2+sigma2**2-2*rho*sigma1*sigma2);
theta_U=7;
theta_L=-7;
arg1=tinv(1-alpha,N-1);
arg2a=(mu_diff-theta_U)/(sigma_diff/sqrt(N));
arg2b=(mu_diff-theta_L)/(sigma_diff/sqrt(N));
arg3=sqrt(N-1)*(theta_U-theta_L)/(2*sigma_diff/sqrt(N)*arg1);
f=sqrt(2*constant('PI'))/(gamma((N-1)/2)*2**((N-3)/2));
call symputx('N',N);
call symputx('t',arg1);
call symputx('delta1',arg2a);
call symputx('delta2',arg2b);
call symputx('b',arg3);
run;

%put &amp;amp;=N;
%put &amp;amp;=t;
%put &amp;amp;=delta1;
%put &amp;amp;=delta2;
%put &amp;amp;=b;

%macro func(x);
y=cdf('normal',-&amp;amp;t*&amp;amp;x/sqrt(&amp;amp;N-1)-&amp;amp;delta1)*&amp;amp;x**(&amp;amp;N-2)*pdf('normal',&amp;amp;x);
%mend func;

%AdpSimps(0,&amp;amp;b,1E-12);
%let q1=&amp;amp;integral;

%macro func(x);
y=cdf('normal',&amp;amp;t*&amp;amp;x/sqrt(&amp;amp;N-1)-&amp;amp;delta2)*&amp;amp;x**(&amp;amp;N-2)*pdf('normal',&amp;amp;x);
%mend func;

%AdpSimps(0,&amp;amp;b,1E-12);
%let q2=&amp;amp;integral;

%put &amp;amp;=q1;
%put &amp;amp;=q2;

data check;
set param;
power=f*(&amp;amp;q1-&amp;amp;q2);
run;

proc print data=check noobs;
var power;
format power 12.10;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(The code of macro %AdpSimps can be found&amp;nbsp;&lt;SPAN&gt;in&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://analytics.ncsu.edu/sesug/2007/PO21.pdf" target="_blank" rel="nofollow noopener noreferrer"&gt;this SESUG 2007 paper&lt;/A&gt;&lt;SPAN&gt;.)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;       power

0.9999975765&lt;/PRE&gt;
&lt;P&gt;And with rho=0.1:&lt;/P&gt;
&lt;PRE&gt;       power

0.7509335977&lt;/PRE&gt;
&lt;P&gt;So, the results from the "manual" calculation differ by only 1E-10 from those obtained with PROC POWER, suggesting that PROC POWER indeed uses this formula.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 00:45:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/518520#M26430</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-12-05T00:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc power</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/518755#M26435</link>
      <description>Thank you very much for your thorough reply. It has helped a lot.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have one more question.&lt;BR /&gt;&lt;BR /&gt;If the correlation is zero in the proc power for paired equivalents test, should I expect that the calculated power of the paired equivalents test is the same as the power for not paired equivalents test?&lt;BR /&gt;&lt;BR /&gt;When I run the following two codes I get different results. The power for the paired test is 0.710 while the power for the not paired equivalents test is 0.899.&lt;BR /&gt;&lt;BR /&gt;Why there is a difference, if the standard deviations, mean difference and sample size are the same in both cases?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc power;&lt;BR /&gt;pairedmeans&lt;BR /&gt;TEST=EQUIV_DIFF&lt;BR /&gt;meandiff=1&lt;BR /&gt;pstds=(2,2)&lt;BR /&gt;power = . /* to be calculated*/&lt;BR /&gt;npairs =3&lt;BR /&gt;corr = 0&lt;BR /&gt;alpha =0.05&lt;BR /&gt;upper = 7&lt;BR /&gt;lower =-7;&lt;BR /&gt;ods output output = power_paired;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc power;&lt;BR /&gt;twosamplemeans&lt;BR /&gt;TEST=EQUIV_DIFF&lt;BR /&gt;meandiff=1&lt;BR /&gt;stddev=2&lt;BR /&gt;power = . /* to be calculated*/&lt;BR /&gt;ntotal =6&lt;BR /&gt;alpha =0.05&lt;BR /&gt;upper = 7&lt;BR /&gt;lower =-7;&lt;BR /&gt;ods output output = power_twosample;&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Dec 2018 12:23:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/518755#M26435</guid>
      <dc:creator>Bim</dc:creator>
      <dc:date>2018-12-05T12:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc power</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/518934#M26438</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/249626"&gt;@Bim&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have one more question.&lt;BR /&gt;&lt;BR /&gt;If the correlation is zero in the proc power for paired equivalents test, should I expect that the calculated power of the paired equivalents test is the same as the power for not paired equivalents test?&lt;BR /&gt;&lt;BR /&gt;When I run the following two codes I get different results. The power for the paired test is 0.710 while the power for the not paired equivalents test is 0.899.&lt;BR /&gt;&lt;BR /&gt;Why there is a difference, if the standard deviations, mean difference and sample size are the same in both cases?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The reason for the difference is that different tests are performed: The equivalence test&amp;nbsp;is based on the paired t-test in the former case and on the&amp;nbsp;&lt;SPAN&gt;two-sample t-test in the latter case.&lt;/SPAN&gt; The paired t-test uses a different estimator for the standard error than the two-sample t-test (see the formulas for SE in sections "&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ttest_details07.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank"&gt;One-Sample Design&lt;/A&gt;" and "&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ttest_details14.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank"&gt;Two-Independent-Sample Design&lt;/A&gt;"&amp;nbsp;of the PROC TTEST documentation). Note that in the tests the standard deviations are&amp;nbsp;&lt;EM&gt;estimated&lt;/EM&gt;&amp;nbsp;from the samples. Our specification sigma=2 is not used there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a consequence, the t-statistics have different denominators (while the numerators are the same). Essentially, the different terms are&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;the corrected sum of squares of the paired differences (i.e. n squares)&amp;nbsp;in the case of the paired t-test&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;the corrected sum of squares of&amp;nbsp;the samples in group 1 plus&amp;nbsp;the corrected sum of squares of&amp;nbsp;the samples in group 2 (i.e. 2n squares) in the case of the two-sample t-test.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;With our assumption of zero correlation these two may even have the same expected value, but the crucial point is that&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;the degrees of freedom are different:&amp;nbsp;n-1 vs. 2(n-1). In your example with the small&amp;nbsp;n=3 the difference between the corresponding t-distributions (i.e. with df=2 vs. 4) is particularly large.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It's not difficult to verify the power calculation with a simulation (using the two different tests):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let n=3;
%let mu_diff=1;
%let stddev=2;
%let theta_L=-7;
%let theta_U=7;
%let alpha=0.05;
%let nsim=1e6;

proc format;
value signif
low-&amp;amp;alpha   = 'significant'
&amp;amp;alpha&amp;lt;-high = 'not significant';
run;

data pairs;
call streaminit(27182818);
do i=1 to &amp;amp;nsim;
  do id=1 to &amp;amp;n;
    x1=rand('normal',0,&amp;amp;stddev);
    x2=rand('normal',&amp;amp;mu_diff,&amp;amp;stddev);
    output;
  end;
end;
run;

proc transpose data=pairs out=twosamp(drop=id rename=(col1=x)) name=grp;
by i id;
var x1 x2;
run;

ods graphics off;
ods exclude all;
ods noresults;

proc ttest data=pairs tost(&amp;amp;theta_L, &amp;amp;theta_U);
by i;
paired x1*x2;
ods output EquivTests=eqtst1(where=(test='Overall'));
run;

proc ttest data=twosamp tost(&amp;amp;theta_L, &amp;amp;theta_U);
by i;
class grp;
ods output EquivTests=eqtst2(where=(variances='Equal' &amp;amp; test='Overall'));
run;

ods exclude none;
ods results;

ods exclude BinomialTest;
proc freq data=eqtst1;
format probt signif.;
tables probt / binomial;
run;

ods exclude BinomialTest;
proc freq data=eqtst2;
format probt signif.;
tables probt / binomial;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Result of the first PROC FREQ step (paired-sample design):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;                               P-Value

                                            Cumulative    Cumulative
          Probt    Frequency     Percent     Frequency      Percent
--------------------------------------------------------------------
significant          709895       70.99        709895        70.99
not significant      290105       29.01       1000000       100.00


      Binomial Proportion
      Probt = significant

Proportion                0.7099
ASE                       0.0005
95% Lower Conf Limit      0.7090
95% Upper Conf Limit      0.7108

Exact Conf Limits
95% Lower Conf Limit      0.7090
95% Upper Conf Limit      0.7108

Sample Size = 1000000&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Result of the second PROC FREQ step&amp;nbsp;(two-independent-sample design):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;                               P-Value

                                            Cumulative    Cumulative
          Probt    Frequency     Percent     Frequency      Percent
--------------------------------------------------------------------
significant          898786       89.88        898786        89.88
not significant      101214       10.12       1000000       100.00


      Binomial Proportion
      Probt = significant

Proportion                0.8988
ASE                       0.0003
95% Lower Conf Limit      0.8982
95% Upper Conf Limit      0.8994

Exact Conf Limits
95% Lower Conf Limit      0.8982
95% Upper Conf Limit      0.8994

Sample Size = 1000000&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Note that I used PROC TRANSPOSE to create the independent samples from the paired samples so that identical data are used for the two tests. The first components of the three pairs comprise group 1 (&lt;FONT face="courier new,courier"&gt;grp='x1'&lt;/FONT&gt;) and the second components of the three pairs comprise group&amp;nbsp;2 (&lt;FONT face="courier new,courier"&gt;grp='x2'&lt;/FONT&gt;) in the two-independent-sample design.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 20:27:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/518934#M26438</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-12-05T20:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: proc power</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/519842#M26464</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Thank you! The replies were very helpful and have solved my problem.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 07:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-power/m-p/519842#M26464</guid>
      <dc:creator>Bim</dc:creator>
      <dc:date>2018-12-10T07:26:13Z</dc:date>
    </item>
  </channel>
</rss>

