I'm trying to figure out how to correctly populate the "discproportions=" option in PROC POWER for McNemar's test. I've looked in the documentation (https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_power_sect009.htm) but am still struggling to understand. 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: 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; proc iml; dis1=9; dis2=2; chisq=((dis1-dis2)**2)/(dis1+dis2); pvalue=1-probchi(chisq,1); print chisq, pvalue; quit; The p-value is <0.05, but I suspect power is less than ideal with a sample size of 25. Here's where my code in PROC POWER: proc power;
pairedfreq dist=normal method=connor
test=mcnemar
discproportions = <??> | <??>
npairs = 25
power = .;
run; 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. Thanks in advance for any guidance on this (especially at 5:00 pm on a Friday!)
... View more