FAQ/ncnpow - CBU statistics Wiki

Please enter your password of your account at the remote wiki below.
/!\ You should trust both wikis because the password could be read by the particular administrators.

Clear message
location: FAQ / ncnpow

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)