⇤ ← Revision 1 as of 2008-02-28 15:09:53
Size: 520
Comment:
|
Size: 521
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
The power, pow, is produced for McNamr's test comparing mismatch proportions, p12 and p21, in a sample size of ntot with a type I error of alpha. | 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. |
= Power for using McNemar'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)