<?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 Proc Power Paired Frequency: How to correctly populate the &amp;quot;discproportions=&amp;quot; statement? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Power-Paired-Frequency-How-to-correctly-populate-the-quot/m-p/503901#M25921</link>
    <description>&lt;P&gt;I'm trying to figure out how to correctly populate the "discproportions=" option in PROC POWER&amp;nbsp;for McNemar's test. I've looked in the documentation (&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_power_sect009.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_power_sect009.htm&lt;/A&gt;) but am still struggling to understand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context, I'm on version 9.4, my data is below, along with with 2x2 table and McNemar's test being requested from PROC FREQ, and IML syntax to make sure I'm clear on what's happening behind the scenes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data study;
input Subject Before After;
datalines;
1 1 1
2 0 1
3 0 0
4 0 1
5 1 1
6 0 0
7 0 1
8 1 1
9 0 1
10 1 1
11 0 0
12 1 0
13 0 1
14 1 0
15 0 0
16 1 1
17 0 1
18 1 1
19 0 0
20 0 1
21 1 1
22 0 1
23 0 0
24 1 1
25 0 1
;
run;

proc freq data=work.study;
		tables Before*After / agree nocol norow nopercent; 
run;&lt;BR /&gt;&lt;BR /&gt;proc iml;&lt;BR /&gt;dis1=9;&lt;BR /&gt;dis2=2;&lt;BR /&gt;chisq=((dis1-dis2)**2)/(dis1+dis2);&lt;BR /&gt;pvalue=1-probchi(chisq,1);&lt;BR /&gt;print chisq, pvalue;&lt;BR /&gt;quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The p-value is &amp;lt;0.05, but I suspect power is less than ideal with a sample size of 25. Here's where my code in PROC POWER:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; proc power;
  pairedfreq dist=normal method=connor
  test=mcnemar
  discproportions = &amp;lt;??&amp;gt; | &amp;lt;??&amp;gt;
  npairs = 25
  power = .;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm unclear how to calculate the discordant proportions from the 2x2 table, and how they are arranged in the discproportions= statement. Figuring that power will be pretty low with 25 subjects, ultimately I want to rearrange the npairs= and power= statements to determine how many subjects are needed to attain a power of 0.90.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any guidance on this (especially at 5:00 pm on a Friday!)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Oct 2018 20:54:43 GMT</pubDate>
    <dc:creator>cousineddie</dc:creator>
    <dc:date>2018-10-12T20:54:43Z</dc:date>
    <item>
      <title>Proc Power Paired Frequency: How to correctly populate the "discproportions=" statement?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Power-Paired-Frequency-How-to-correctly-populate-the-quot/m-p/503901#M25921</link>
      <description>&lt;P&gt;I'm trying to figure out how to correctly populate the "discproportions=" option in PROC POWER&amp;nbsp;for McNemar's test. I've looked in the documentation (&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_power_sect009.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_power_sect009.htm&lt;/A&gt;) but am still struggling to understand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context, I'm on version 9.4, my data is below, along with with 2x2 table and McNemar's test being requested from PROC FREQ, and IML syntax to make sure I'm clear on what's happening behind the scenes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data study;
input Subject Before After;
datalines;
1 1 1
2 0 1
3 0 0
4 0 1
5 1 1
6 0 0
7 0 1
8 1 1
9 0 1
10 1 1
11 0 0
12 1 0
13 0 1
14 1 0
15 0 0
16 1 1
17 0 1
18 1 1
19 0 0
20 0 1
21 1 1
22 0 1
23 0 0
24 1 1
25 0 1
;
run;

proc freq data=work.study;
		tables Before*After / agree nocol norow nopercent; 
run;&lt;BR /&gt;&lt;BR /&gt;proc iml;&lt;BR /&gt;dis1=9;&lt;BR /&gt;dis2=2;&lt;BR /&gt;chisq=((dis1-dis2)**2)/(dis1+dis2);&lt;BR /&gt;pvalue=1-probchi(chisq,1);&lt;BR /&gt;print chisq, pvalue;&lt;BR /&gt;quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The p-value is &amp;lt;0.05, but I suspect power is less than ideal with a sample size of 25. Here's where my code in PROC POWER:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; proc power;
  pairedfreq dist=normal method=connor
  test=mcnemar
  discproportions = &amp;lt;??&amp;gt; | &amp;lt;??&amp;gt;
  npairs = 25
  power = .;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm unclear how to calculate the discordant proportions from the 2x2 table, and how they are arranged in the discproportions= statement. Figuring that power will be pretty low with 25 subjects, ultimately I want to rearrange the npairs= and power= statements to determine how many subjects are needed to attain a power of 0.90.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any guidance on this (especially at 5:00 pm on a Friday!)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 20:54:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Power-Paired-Frequency-How-to-correctly-populate-the-quot/m-p/503901#M25921</guid>
      <dc:creator>cousineddie</dc:creator>
      <dc:date>2018-10-12T20:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Power Paired Frequency: How to correctly populate the "discproportions=" statemen</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Power-Paired-Frequency-How-to-correctly-populate-the-quot/m-p/503981#M25923</link>
      <description>&lt;P&gt;My guess would be&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=work.study;
		tables Before*After / nocol norow chisq; 
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;                             Table of Before by After

                        Before     After

                        Frequency|
                        Percent  |       0|       1|  Total
                        ---------+--------+--------+
                               0 |      6 |      9 |     15
                                 |  24.00 |  36.00 |  60.00
                        ---------+--------+--------+
                               1 |      2 |      8 |     10
                                 |   8.00 |  32.00 |  40.00
                        ---------+--------+--------+
                        Total           8       17       25
                                    32.00    68.00   100.00
&lt;/PRE&gt;
&lt;P&gt;to get the discordant (off-diagonal)&amp;nbsp;proportions, and&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc power;
  pairedfreq dist=normal method=connor
  test=mcnemar
  discproportions = (.36 .08)
  npairs = 25
  power = .;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;                         McNemar Normal Approximation Test

                              Fixed Scenario Elements

             Distribution                            Asymptotic normal
             Method                        Connor normal approximation
             Success-Failure Proportion                           0.36
             Failure-Success Proportion                           0.08
             Number of Pairs                                        25
             Number of Sides                                         2
             Alpha                                                0.05


                                   Computed Power

                                       Power

                                       0.566
&lt;/PRE&gt;
&lt;P&gt;to get the power.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Oct 2018 04:21:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Power-Paired-Frequency-How-to-correctly-populate-the-quot/m-p/503981#M25923</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-10-13T04:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Power Paired Frequency: How to correctly populate the "discproportions=" statemen</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Power-Paired-Frequency-How-to-correctly-populate-the-quot/m-p/504151#M25927</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks, PGStats. That was my original thought too, but wasn't sure if the discordant proportions were across all of the subjects, or some particular subset. Since you have to specify the number of subjects in npairs=, it makes sense. Maybe it is just that straightforward. Much appreciated!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 00:03:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Power-Paired-Frequency-How-to-correctly-populate-the-quot/m-p/504151#M25927</guid>
      <dc:creator>cousineddie</dc:creator>
      <dc:date>2018-10-15T00:03:33Z</dc:date>
    </item>
  </channel>
</rss>

