The POWER Procedure

Analyses in the PAIREDFREQ Statement

Overview of Conditional McNemar tests

Notation:

Case
Failure Success
Control Failure n 00 n 01 n Subscript 0 dot
Success n 10 n 11 n Subscript 1 dot
n Subscript dot 0 n Subscript dot 1 N

StartLayout 1st Row 1st Column n 00 2nd Column equals number-sign StartSet control equals failure comma case equals failure EndSet 2nd Row 1st Column n 01 2nd Column equals number-sign StartSet control equals failure comma case equals success EndSet 3rd Row 1st Column n 10 2nd Column equals number-sign StartSet control equals success comma case equals failure EndSet 4th Row 1st Column n 11 2nd Column equals number-sign StartSet control equals success comma case equals success EndSet 5th Row 1st Column upper N 2nd Column equals n 00 plus n 01 plus n 10 plus n 11 6th Row 1st Column n Subscript upper D 2nd Column equals n 01 plus n 10 identical-to number-sign discordant pairs 7th Row 1st Column ModifyingAbove pi With caret Subscript i j 2nd Column equals StartFraction n Subscript i j Baseline Over upper N EndFraction 8th Row 1st Column pi Subscript i j 2nd Column equals theoretical population value of ModifyingAbove pi With caret Subscript i j Baseline 9th Row 1st Column pi Subscript 1 dot 2nd Column equals pi 10 plus pi 11 10th Row 1st Column pi Subscript dot 1 2nd Column equals pi 01 plus pi 11 11th Row 1st Column phi 2nd Column equals normal upper C normal o normal r normal r left-parenthesis control observation comma case observation right-parenthesis left-parenthesis within a pair right-parenthesis 12th Row 1st Column normal upper D normal upper P normal upper R 2nd Column equals quotation-mark discordant proportion ratio quotation-mark equals StartFraction pi 01 Over pi 10 EndFraction 13th Row 1st Column normal upper D normal upper P normal upper R Subscript 0 2nd Column equals null DPR EndLayout

Power formulas are given here in terms of the discordant proportions pi 10 and pi 01. If the input is specified in terms of StartSet pi Subscript 1 dot Baseline comma pi Subscript dot 1 Baseline comma phi EndSet, then it can be converted into values for StartSet pi 10 comma pi 01 EndSet as follows:

StartLayout 1st Row 1st Column pi 01 2nd Column equals pi Subscript dot 1 Baseline left-parenthesis 1 minus pi Subscript 1 dot Baseline right-parenthesis minus phi left-parenthesis left-parenthesis 1 minus pi Subscript 1 dot Baseline right-parenthesis pi Subscript 1 dot Baseline left-parenthesis 1 minus pi Subscript dot 1 Baseline right-parenthesis pi Subscript dot 1 Baseline right-parenthesis Superscript one-half Baseline 2nd Row 1st Column pi 10 2nd Column equals pi 01 plus pi Subscript 1 dot Baseline minus pi Subscript dot 1 EndLayout

All McNemar tests covered in PROC POWER are conditional, meaning that n Subscript upper D is assumed fixed at its observed value.

For the usual normal upper D normal upper P normal upper R Subscript 0 Baseline equals 1, the hypotheses are

StartLayout 1st Row 1st Column upper H 0 colon 2nd Column pi Subscript dot 1 Baseline equals pi Subscript 1 dot Baseline 2nd Row 1st Column upper H 1 colon 2nd Column StartLayout Enlarged left-brace 1st Row 1st Column pi Subscript dot 1 Baseline not-equals pi Subscript 1 dot Baseline comma 2nd Column two hyphen sided 2nd Row 1st Column pi Subscript dot 1 Baseline greater-than pi Subscript 1 dot Baseline comma 2nd Column upper one hyphen sided 3rd Row 1st Column pi Subscript dot 1 Baseline less-than pi Subscript 1 dot Baseline comma 2nd Column lower one hyphen sided EndLayout EndLayout

The test statistic for both tests covered in PROC POWER (DIST=EXACT_COND and DIST=NORMAL) is the McNemar statistic upper Q Subscript upper M, which has the following form when normal upper D normal upper P normal upper R Subscript 0 Baseline equals 1:

upper Q Subscript upper M 0 Baseline equals StartFraction left-parenthesis n 01 minus n 10 right-parenthesis squared Over n 01 plus n 10 EndFraction

For the conditional McNemar tests, this is equivalent to the square of the upper Z left-parenthesis upper X right-parenthesis statistic for the test of a single proportion (normal approximation to binomial), where the proportion is StartFraction pi 01 Over pi 01 plus pi 10 EndFraction, the null is 0.5, and "N" is n Subscript upper D (see, for example, Schork and Williams 1980):

StartLayout 1st Row 1st Column upper Z left-parenthesis upper X right-parenthesis 2nd Column equals StartFraction n 01 minus n Subscript upper D Baseline left-parenthesis 0.5 right-parenthesis Over left-bracket n Subscript upper D Baseline 0.5 left-parenthesis 1 minus 0.5 right-parenthesis right-bracket Superscript one-half Baseline EndFraction ModifyingAbove tilde With dot normal upper N left-parenthesis StartStartFraction n Subscript upper D Superscript one-half Baseline left-parenthesis StartFraction pi 01 Over pi 01 plus pi 10 EndFraction minus 0.5 right-parenthesis OverOver left-bracket 0.5 left-parenthesis 1 minus 0.5 right-parenthesis right-bracket Superscript one-half Baseline EndEndFraction comma StartStartFraction StartFraction pi 01 Over pi 01 plus pi 10 EndFraction left-parenthesis 1 minus StartFraction pi 01 Over pi 01 plus pi 10 EndFraction right-parenthesis OverOver 0.5 left-parenthesis 1 minus 0.5 right-parenthesis EndEndFraction right-parenthesis 2nd Row 1st Column Blank 2nd Column equals StartFraction n 01 minus left-parenthesis n 01 plus n 10 right-parenthesis left-parenthesis 0.5 right-parenthesis Over left-bracket left-parenthesis n 01 plus n 10 right-parenthesis 0.5 left-parenthesis 1 minus 0.5 right-parenthesis right-bracket Superscript one-half Baseline EndFraction 3rd Row 1st Column Blank 2nd Column equals StartFraction n 01 minus n 10 Over left-bracket n 01 plus n 10 right-bracket Superscript one-half Baseline EndFraction 4th Row 1st Column Blank 2nd Column equals StartRoot upper Q Subscript upper M 0 Baseline EndRoot EndLayout

This can be generalized to a custom null for StartFraction pi 01 Over pi 01 plus pi 10 EndFraction, which is equivalent to specifying a custom null DPR:

left-bracket StartFraction pi 01 Over pi 01 plus pi 10 EndFraction right-bracket Subscript 0 Baseline identical-to left-bracket StartStartStartFraction 1 OverOverOver 1 plus StartStartFraction 1 OverOver StartFraction pi 01 Over pi 10 EndFraction EndEndFraction EndEndEndFraction right-bracket Subscript 0 Baseline identical-to StartStartFraction 1 OverOver 1 plus StartFraction 1 Over normal upper D normal upper P normal upper R Subscript 0 Baseline EndFraction EndEndFraction

So, a conditional McNemar test (asymptotic or exact) with a custom null is equivalent to the test of a single proportion p 1 identical-to StartFraction pi 01 Over pi 01 plus pi 10 EndFraction with a null value p 0 identical-to StartStartFraction 1 OverOver 1 plus StartFraction 1 Over normal upper D normal upper P normal upper R Subscript 0 Baseline EndFraction EndEndFraction, with a sample size of n Subscript upper D:

StartLayout 1st Row 1st Column upper H 0 colon 2nd Column p 1 equals p 0 2nd Row 1st Column upper H 1 colon 2nd Column StartLayout Enlarged left-brace 1st Row 1st Column p 1 not-equals p 0 comma 2nd Column two hyphen sided 2nd Row 1st Column p 1 greater-than p 0 comma 2nd Column one hyphen sided upper U 3rd Row 1st Column p 1 less-than p 0 comma 2nd Column one hyphen sided upper L EndLayout EndLayout

which is equivalent to

StartLayout 1st Row 1st Column upper H 0 colon 2nd Column normal upper D normal upper P normal upper R equals normal upper D normal upper P normal upper R Subscript 0 Baseline 2nd Row 1st Column upper H 1 colon 2nd Column StartLayout Enlarged left-brace 1st Row 1st Column normal upper D normal upper P normal upper R not-equals normal upper D normal upper P normal upper R Subscript 0 Baseline comma 2nd Column two hyphen sided 2nd Row 1st Column normal upper D normal upper P normal upper R greater-than normal upper D normal upper P normal upper R Subscript 0 Baseline comma 2nd Column one hyphen sided upper U 3rd Row 1st Column normal upper D normal upper P normal upper R less-than normal upper D normal upper P normal upper R Subscript 0 Baseline comma 2nd Column one hyphen sided upper L EndLayout EndLayout

The general form of the test statistic is thus

upper Q Subscript upper M Baseline equals StartFraction left-parenthesis n 01 minus n Subscript upper D Baseline p 0 right-parenthesis squared Over n Subscript upper D Baseline p 0 left-parenthesis 1 minus p 0 right-parenthesis EndFraction

The two most common conditional McNemar tests assume either the exact conditional distribution of upper Q Subscript upper M (covered by the DIST=EXACT_COND analysis) or a standard normal distribution for upper Q Subscript upper M (covered by the DIST=NORMAL analysis).

McNemar Exact Conditional Test (TEST=MCNEMAR DIST=EXACT_COND)

For DIST=EXACT_COND, the power is calculated assuming that the test is conducted by using the exact conditional distribution of upper Q Subscript upper M (conditional on n Subscript upper D). The power is calculated by first computing the conditional power for each possible n Subscript upper D. The unconditional power is computed as a weighted average over all possible outcomes of n Subscript upper D:

normal p normal o normal w normal e normal r equals sigma-summation Underscript n Subscript upper D Baseline equals 0 Overscript upper N Endscripts upper P left-parenthesis n Subscript upper D Baseline right-parenthesis upper P left-parenthesis Reject p 1 equals p 0 vertical-bar n Subscript upper D Baseline right-parenthesis

where n Subscript upper D Baseline tilde Bin left-parenthesis pi 01 plus pi 10 comma upper N right-parenthesis, and upper P left-parenthesis Reject p 1 equals p 0 vertical-bar n Subscript upper D Baseline right-parenthesis is calculated by using the exact method in the section Exact Test of a Binomial Proportion (TEST=EXACT).

The achieved significance level, reported as "Actual Alpha" in the analysis, is computed in the same way except by using the actual alpha of the one-sample test in place of its power:

actual alpha equals sigma-summation Underscript n Subscript upper D Baseline equals 0 Overscript upper N Endscripts upper P left-parenthesis n Subscript upper D Baseline right-parenthesis alpha Superscript star Baseline left-parenthesis p 1 comma p 0 vertical-bar n Subscript upper D Baseline right-parenthesis

where alpha Superscript star Baseline left-parenthesis p 1 comma p 0 vertical-bar n Subscript upper D Baseline right-parenthesis is the actual alpha calculated by using the exact method in the section Exact Test of a Binomial Proportion (TEST=EXACT) with proportion p 1, null p 0, and sample size n Subscript upper D.

McNemar Normal Approximation Test (TEST=MCNEMAR DIST=NORMAL)

For DIST=NORMAL, power is calculated assuming the test is conducted by using the normal-approximate distribution of upper Q Subscript upper M (conditional on n Subscript upper D).

For the METHOD=EXACT option, the power is calculated in the same way as described in the section McNemar Exact Conditional Test (TEST=MCNEMAR DIST=EXACT_COND), except that upper P left-parenthesis Reject p 1 equals p 0 vertical-bar n Subscript upper D Baseline right-parenthesis is calculated by using the exact method in the section z Test for Binomial Proportion Using Null Variance (TEST=Z VAREST=NULL). The achieved significance level is calculated in the same way as described at the end of the section McNemar Exact Conditional Test (TEST=MCNEMAR DIST=EXACT_COND).

For the METHOD=MIETTINEN option, approximate sample size for the one-sided cases is computed according to equation (5.6) in Miettinen (1968):

upper N equals StartFraction StartSet z Subscript 1 minus alpha Baseline left-parenthesis p 10 plus p 01 right-parenthesis plus z Subscript p o w e r Baseline left-bracket left-parenthesis p 10 plus p 01 right-parenthesis squared minus one-fourth left-parenthesis p 01 minus p 10 right-parenthesis squared left-parenthesis 3 plus p 10 plus p 01 right-parenthesis right-bracket Superscript one-half Baseline EndSet squared Over left-parenthesis p 10 plus p 01 right-parenthesis left-parenthesis p 01 minus p 10 right-parenthesis squared EndFraction

Approximate power for the one-sided cases is computed by solving the sample size equation for power, and approximate power for the two-sided case follows easily by summing the one-sided powers each at alpha slash 2:

normal p normal o normal w normal e normal r equals StartLayout Enlarged left-brace 1st Row 1st Column normal upper Phi left-parenthesis StartFraction left-parenthesis p 01 minus p 10 right-parenthesis left-bracket upper N left-parenthesis p 10 plus p 01 right-parenthesis right-bracket Superscript one-half Baseline minus z Subscript 1 minus alpha Baseline left-parenthesis p 10 plus p 01 right-parenthesis Over left-bracket left-parenthesis p 10 plus p 01 right-parenthesis squared minus one-fourth left-parenthesis p 01 minus p 10 right-parenthesis squared left-parenthesis 3 plus p 10 plus p 01 right-parenthesis right-bracket Superscript one-half Baseline EndFraction right-parenthesis comma 2nd Column upper one hyphen sided 2nd Row 1st Column normal upper Phi left-parenthesis StartFraction minus left-parenthesis p 01 minus p 10 right-parenthesis left-bracket upper N left-parenthesis p 10 plus p 01 right-parenthesis right-bracket Superscript one-half Baseline minus z Subscript 1 minus alpha Baseline left-parenthesis p 10 plus p 01 right-parenthesis Over left-bracket left-parenthesis p 10 plus p 01 right-parenthesis squared minus one-fourth left-parenthesis p 01 minus p 10 right-parenthesis squared left-parenthesis 3 plus p 10 plus p 01 right-parenthesis right-bracket Superscript one-half Baseline EndFraction right-parenthesis comma 2nd Column lower one hyphen sided 3rd Row 1st Column normal upper Phi left-parenthesis StartFraction left-parenthesis p 01 minus p 10 right-parenthesis left-bracket upper N left-parenthesis p 10 plus p 01 right-parenthesis right-bracket Superscript one-half Baseline minus z Subscript 1 minus StartFraction alpha Over 2 EndFraction Baseline left-parenthesis p 10 plus p 01 right-parenthesis Over left-bracket left-parenthesis p 10 plus p 01 right-parenthesis squared minus one-fourth left-parenthesis p 01 minus p 10 right-parenthesis squared left-parenthesis 3 plus p 10 plus p 01 right-parenthesis right-bracket Superscript one-half Baseline EndFraction right-parenthesis plus 4th Row 1st Column normal upper Phi left-parenthesis StartFraction minus left-parenthesis p 01 minus p 10 right-parenthesis left-bracket upper N left-parenthesis p 10 plus p 01 right-parenthesis right-bracket Superscript one-half Baseline minus z Subscript 1 minus StartFraction alpha Over 2 EndFraction Baseline left-parenthesis p 10 plus p 01 right-parenthesis Over left-bracket left-parenthesis p 10 plus p 01 right-parenthesis squared minus one-fourth left-parenthesis p 01 minus p 10 right-parenthesis squared left-parenthesis 3 plus p 10 plus p 01 right-parenthesis right-bracket Superscript one-half Baseline EndFraction right-parenthesis comma 2nd Column two hyphen sided EndLayout

The two-sided solution for N is obtained by numerically inverting the power equation.

In general, compared to METHOD=CONNOR, the METHOD=MIETTINEN approximation tends to be slightly more accurate but can be slightly anticonservative in the sense of underestimating sample size and overestimating power (Lachin 1992, p. 1250).

For the METHOD=CONNOR option, approximate sample size for the one-sided cases is computed according to equation (3) in Connor (1987):

upper N equals StartFraction StartSet z Subscript 1 minus alpha Baseline left-parenthesis p 10 plus p 01 right-parenthesis Superscript one-half Baseline plus z Subscript p o w e r Baseline left-bracket p 10 plus p 01 minus left-parenthesis p 01 minus p 10 right-parenthesis squared right-bracket Superscript one-half Baseline EndSet squared Over left-parenthesis p 01 minus p 10 right-parenthesis squared EndFraction

Approximate power for the one-sided cases is computed by solving the sample size equation for power, and approximate power for the two-sided case follows easily by summing the one-sided powers each at alpha slash 2:

normal p normal o normal w normal e normal r equals StartLayout Enlarged left-brace 1st Row 1st Column normal upper Phi left-parenthesis StartFraction left-parenthesis p 01 minus p 10 right-parenthesis upper N Superscript one-half Baseline minus z Subscript 1 minus alpha Baseline left-parenthesis p 10 plus p 01 right-parenthesis Superscript one-half Baseline Over left-bracket p 10 plus p 01 minus left-parenthesis p 01 minus p 10 right-parenthesis squared right-bracket Superscript one-half Baseline EndFraction right-parenthesis comma 2nd Column upper one hyphen sided 2nd Row 1st Column normal upper Phi left-parenthesis StartFraction minus left-parenthesis p 01 minus p 10 right-parenthesis upper N Superscript one-half Baseline minus z Subscript 1 minus alpha Baseline left-parenthesis p 10 plus p 01 right-parenthesis Superscript one-half Baseline Over left-bracket p 10 plus p 01 minus left-parenthesis p 01 minus p 10 right-parenthesis squared right-bracket Superscript one-half Baseline EndFraction right-parenthesis comma 2nd Column lower one hyphen sided 3rd Row 1st Column normal upper Phi left-parenthesis StartFraction left-parenthesis p 01 minus p 10 right-parenthesis upper N Superscript one-half Baseline minus z Subscript 1 minus StartFraction alpha Over 2 EndFraction Baseline left-parenthesis p 10 plus p 01 right-parenthesis Superscript one-half Baseline Over left-bracket p 10 plus p 01 minus left-parenthesis p 01 minus p 10 right-parenthesis squared right-bracket Superscript one-half Baseline EndFraction right-parenthesis plus 4th Row 1st Column normal upper Phi left-parenthesis StartFraction minus left-parenthesis p 01 minus p 10 right-parenthesis upper N Superscript one-half Baseline minus z Subscript 1 minus StartFraction alpha Over 2 EndFraction Baseline left-parenthesis p 10 plus p 01 right-parenthesis Superscript one-half Baseline Over left-bracket p 10 plus p 01 minus left-parenthesis p 01 minus p 10 right-parenthesis squared right-bracket Superscript one-half Baseline EndFraction right-parenthesis comma 2nd Column two hyphen sided EndLayout

The two-sided solution for N is obtained by numerically inverting the power equation.

In general, compared to METHOD=MIETTINEN, the METHOD=CONNOR approximation tends to be slightly less accurate but slightly conservative in the sense of overestimating sample size and underestimating power (Lachin 1992, p. 1250).

Last updated: December 09, 2022