Size: 521
Comment:
|
← Revision 5 as of 2013-03-08 10:17:39 ⇥
Size: 521
Comment: converted to 1.6 markup
|
No differences found! |
Power for using McNamr's test
The power, pow, is produced for McNemar's test comparing mismatch proportions, p12 and p21, in a sample size of ntot with a type I error of alpha.
Copy and Paste the inputs below into R and adjust as required.
alpha <- 0.05 p12 <- 0.5 p21 <- 0.2 ntot <- 23
Copy and paste the below into R to obtain the power.
chisq <- ((p12-p21)^2) / (p12+p21) pow <- 1 - pchisq(abs(qchisq(1-alpha,1)),1,ntot*chisq) cat("Power for McNemar's test =") print(pow)