powered by
2 by 2 table. Test either a shift from 0 to 1 or a shift from 1 to 0 before treatment and after treatment.
\(p_{1+}=P_{10}+P_{11}, p_{+1}=P_{01}+P_{11}\)
Ho: \(p_{1+} = p_{+1}\)
Ha: not equal
The test is finding whether there is a categorical shift after treatment.
McNemar.Test(alpha, beta, psai, paid)
significance level
power = 1-beta
the ratio of p01/p10
the sum p10+p01
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003
# NOT RUN { Example.6.4.3<-McNemar.Test(0.05,0.2,0.2/0.5,.7) Example.6.4.3 # 59 # }
Run the code above in your browser using DataLab