The POWER Procedure

Analyses in the PAIREDFREQ Statement

Overview of Conditional McNemar tests

Notation:

   

Case

 
   

Failure

Success

 

Control

Failure

$n_{00}$

$n_{01}$

$n_{0\cdot }$

 

Success

$n_{10}$

$n_{11}$

$n_{1\cdot }$

   

$n_{\cdot 0}$

$n_{\cdot 1}$

N

\begin{align*}  n_{00} & = \# \{ \mbox{control=failure, case=failure}\}  \\ n_{01} & = \# \{ \mbox{control=failure, case=success}\}  \\ n_{10} & = \# \{ \mbox{control=success, case=failure}\}  \\ n_{11} & = \# \{ \mbox{control=success, case=success}\}  \\ N & = n_{00} + n_{01} + n_{10} + n_{11} \\ n_ D & = n_{01} + n_{10} \equiv \# \mbox{discordant pairs} \\ \hat{\pi }_{ij} & = \frac{n_{ij}}{N} \\ \pi _{ij} & = \mbox{theoretical population value of } \hat{\pi }_{ij} \\ \pi _{1 \cdot } & = \pi _{10} + \pi _{11} \\ \pi _{\cdot 1} & = \pi _{01} + \pi _{11} \\ \phi & = \mr{Corr} (\mbox{control observation}, \mbox{case observation}) \quad \mbox{(within a pair)} \\ \mr{DPR} & = \mbox{"discordant proportion ratio"} = \frac{\pi _{01}}{\pi _{10}} \\ \mr{DPR}_0 & = \mbox{null DPR} \\ \end{align*}

Power formulas are given here in terms of the discordant proportions $\pi _{10}$ and $\pi _{01}$. If the input is specified in terms of $\{ \pi _{1 \cdot }, \pi _{\cdot 1}, \phi \} $, then it can be converted into values for $\{ \pi _{10}, \pi _{01} \} $ as follows:

\begin{align*}  \pi _{01} & = \pi _{\cdot 1}(1-\pi _{1 \cdot }) - \phi ((1-\pi _{1 \cdot })\pi _{1 \cdot }(1-\pi _{\cdot 1})\pi _{\cdot 1})^\frac {1}{2} \\ \pi _{10} & = \pi _{01} + \pi _{1 \cdot } - \pi _{\cdot 1} \end{align*}

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

For the usual $\mr{DPR}_0 = 1$, the hypotheses are

\begin{align*}  H_0\colon & \pi _{\cdot 1} = \pi _{1 \cdot } \\ H_1\colon & \left\{  \begin{array}{ll} \pi _{\cdot 1} \ne \pi _{1 \cdot }, &  \mbox{two-sided} \\ \pi _{\cdot 1} > \pi _{1 \cdot }, &  \mbox{upper one-sided} \\ \pi _{\cdot 1} < \pi _{1 \cdot }, &  \mbox{lower one-sided} \\ \end{array} \right. \\ \end{align*}

The test statistic for both tests covered in PROC POWER (DIST=EXACT_COND and DIST=NORMAL) is the McNemar statistic $Q_ M$, which has the following form when $\mr{DPR}_0 = 1$:

\[  Q_{M_0} = \frac{(n_{01} - n_{10})^2}{n_{01} + n_{10}}  \]

For the conditional McNemar tests, this is equivalent to the square of the $Z(X)$ statistic for the test of a single proportion (normal approximation to binomial), where the proportion is $\frac{\pi _{01}}{\pi _{01}+\pi _{10}}$, the null is 0.5, and "N" is $n_ D$ (see, for example, Schork and Williams 1980):

\begin{align*}  Z(X) & = \frac{n_{01} - n_ D (0.5)}{\left[ n_ D 0.5(1-0.5) \right]^\frac {1}{2}} \quad {\stackrel{\cdot }{\thicksim }} \;  \mr{N}\left(\frac{n_ D^{\frac{1}{2}}(\frac{\pi _{01}}{\pi _{01}+\pi _{10}} - 0.5)}{\left[ 0.5(1-0.5) \right]^\frac {1}{2}}, \frac{\frac{\pi _{01}}{\pi _{01}+\pi _{10}} \left(1-\frac{\pi _{01}}{\pi _{01}+\pi _{10}}\right)}{0.5(1-0.5)}\right) \\ & = \frac{n_{01} - (n_{01} + n_{10}) (0.5)}{\left[ (n_{01} + n_{10}) 0.5(1-0.5) \right]^\frac {1}{2}} \\ & = \frac{n_{01} - n_{10}}{\left[ n_{01} + n_{10} \right]^\frac {1}{2}} \\ & = \sqrt {Q_{M_0}} \\ \end{align*}

This can be generalized to a custom null for $\frac{\pi _{01}}{\pi _{01}+\pi _{10}}$, which is equivalent to specifying a custom null DPR:

\[  \left[\frac{\pi _{01}}{\pi _{01}+\pi _{10}} \right]_0 \equiv \left[ \frac{1}{1+\frac{1}{\frac{\pi _{01}}{\pi _{10}}}} \right]_0 \equiv \frac{1}{1+\frac{1}{\mr{DPR}_0}}  \]

So, a conditional McNemar test (asymptotic or exact) with a custom null is equivalent to the test of a single proportion $p_1 \equiv \frac{\pi _{01}}{\pi _{01}+\pi _{10}}$ with a null value $p_0 \equiv \frac{1}{1+\frac{1}{\mr{DPR}_0}}$, with a sample size of $n_ D$:

\begin{align*}  H_0\colon & p_1 = p_0 \\ H_1\colon & \left\{  \begin{array}{ll} p_1 \ne p_0, &  \mbox{two-sided} \\ p_1 > p_0, &  \mbox{one-sided U} \\ p_1 < p_0, &  \mbox{one-sided L} \\ \end{array} \right. \\ \end{align*}

which is equivalent to

\begin{align*}  H_0\colon & \mr{DPR} = \mr{DPR}_0 \\ H_1\colon & \left\{  \begin{array}{ll} \mr{DPR} \ne \mr{DPR}_0, &  \mbox{two-sided} \\ \mr{DPR} > \mr{DPR}_0, &  \mbox{one-sided U} \\ \mr{DPR} < \mr{DPR}_0, &  \mbox{one-sided L} \\ \end{array} \right. \\ \end{align*}

The general form of the test statistic is thus

\[  Q_ M = \frac{\left(n_{01} - n_ D p_0\right)^2}{n_ D p_0(1-p_0)}  \]

The two most common conditional McNemar tests assume either the exact conditional distribution of $Q_ M$ (covered by the DIST=EXACT_COND analysis) or a standard normal distribution for $Q_ 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 $Q_ M$ (conditional on $n_ D$). The power is calculated by first computing the conditional power for each possible $n_ D$. The unconditional power is computed as a weighted average over all possible outcomes of $n_ D$:

\[  \mr{power} = \sum _{n_ D=0}^ N P(n_ D)P(\mbox{Reject } p_1 = p_0 | n_ D)  \]

where $n_ D \thicksim \mbox{Bin}(\pi _{01} + \pi _{10}, N)$, and $P(\mbox{Reject }p_1 = p_0 | n_ D)$ 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:

\[  \mbox{actual alpha} = \sum _{n_ D=0}^ N P(n_ D)\alpha ^\star (p_1, p_0 | n_ D)  \]

where $\alpha ^\star (p_1, p_0 | n_ D)$ 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_ 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 $Q_ M$ (conditional on $n_ 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 $P(\mbox{Reject }p_1 = p_0 | n_ D)$ 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):

\[  N = \frac{\left\{ z_{1-\alpha }(p_{10}+p_{01}) + z_{\mathit{power}} \left[(p_{10}+p_{01})^2 - \frac{1}{4}(p_{01}-p_{10})^2 (3+p_{10}+p_{01}) \right]^\frac {1}{2} \right\} ^2}{(p_{10}+p_{01}) (p_{01}-p_{10})^2}  \]

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 /2$:

\[  \mr{power} = \left\{  \begin{array}{ll} \Phi \left(\frac{(p_{01}-p_{10}) \left[N(p_{10}+p_{01})\right]^\frac {1}{2} - z_{1-\alpha }(p_{10}+p_{01})}{\left[ (p_{10}+p_{01})^2 - \frac{1}{4}(p_{01}-p_{10})^2 (3+p_{10}+p_{01}) \right]^\frac {1}{2}} \right), &  \mbox{upper one-sided} \\ \Phi \left(\frac{-(p_{01}-p_{10}) \left[N(p_{10}+p_{01})\right]^\frac {1}{2} - z_{1-\alpha }(p_{10}+p_{01})}{\left[ (p_{10}+p_{01})^2 - \frac{1}{4}(p_{01}-p_{10})^2 (3+p_{10}+p_{01}) \right]^\frac {1}{2}} \right), &  \mbox{lower one-sided} \\ \Phi \left(\frac{(p_{01}-p_{10}) \left[N(p_{10}+p_{01})\right]^\frac {1}{2} - z_{1-\frac{\alpha }{2}}(p_{10}+p_{01})}{\left[ (p_{10}+p_{01})^2 - \frac{1}{4}(p_{01}-p_{10})^2 (3+p_{10}+p_{01}) \right]^\frac {1}{2}} \right) + \\ \quad \Phi \left(\frac{-(p_{01}-p_{10}) \left[N(p_{10}+p_{01})\right]^\frac {1}{2} - z_{1-\frac{\alpha }{2}}(p_{10}+p_{01})}{\left[ (p_{10}+p_{01})^2 - \frac{1}{4}(p_{01}-p_{10})^2 (3+p_{10}+p_{01}) \right]^\frac {1}{2}} \right), &  \mbox{two-sided} \\ \end{array} \right.  \]

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):

\[  N = \frac{\left\{ z_{1-\alpha }(p_{10}+p_{01})^\frac {1}{2} + z_{\mathit{power}} \left[p_{10}+p_{01} - (p_{01}-p_{10})^2 \right]^\frac {1}{2} \right\} ^2}{(p_{01}-p_{10})^2}  \]

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 /2$:

\[  \mr{power} = \left\{  \begin{array}{ll} \Phi \left( \frac{ (p_{01}-p_{10}) N^\frac {1}{2} - z_{1-\alpha }(p_{10}+p_{01})^\frac {1}{2}}{\left[ p_{10}+p_{01} - (p_{01}-p_{10})^2 \right]^\frac {1}{2}} \right), &  \mbox{upper one-sided} \\ \Phi \left( \frac{ -(p_{01}-p_{10}) N^\frac {1}{2} - z_{1-\alpha }(p_{10}+p_{01})^\frac {1}{2}}{\left[ p_{10}+p_{01} - (p_{01}-p_{10})^2 \right]^\frac {1}{2}} \right), &  \mbox{lower one-sided} \\ \Phi \left( \frac{ (p_{01}-p_{10}) N^\frac {1}{2} - z_{1-\frac{\alpha }{2}}(p_{10}+p_{01})^\frac {1}{2}}{\left[ p_{10}+p_{01} - (p_{01}-p_{10})^2 \right]^\frac {1}{2}} \right) + \\ \quad \Phi \left( \frac{ -(p_{01}-p_{10}) N^\frac {1}{2} - z_{1-\frac{\alpha }{2}}(p_{10}+p_{01})^\frac {1}{2}}{\left[ p_{10}+p_{01} - (p_{01}-p_{10})^2 \right]^\frac {1}{2}} \right), &  \mbox{two-sided} \\ \end{array} \right.  \]

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).