Diff for "FAQ/ncnpow" - CBU statistics Wiki
location: Diff for "FAQ/ncnpow"
Differences between revisions 4 and 5
Revision 4 as of 2008-02-28 15:11:24
Size: 521
Editor: PeterWatson
Comment:
Revision 5 as of 2013-03-08 10:17:39
Size: 521
Editor: localhost
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)

None: FAQ/ncnpow (last edited 2013-03-08 10:17:39 by localhost)