[R] Problem applying McNemar's - Different values in SPSS and R
Johannes Huesing
johannes at huesing.name
Tue Dec 28 18:47:08 CET 2010
Marc Schwartz <marc_schwartz at me.com> [Tue, Dec 28, 2010 at 06:30:59PM CET]:
>
> On Dec 28, 2010, at 11:05 AM, Manoj Aravind wrote:
>
> > Hi friends,
> > I get different values for McNemar's test in R and SPSS. Which one should i
> > rely on when the p values differ.
[...]
>
>
> The SPSS test appears to be an exact test, whereas the default R function does not perform an exact test, so you are not comparing Apples to Apples...
>
Indeed, binom.test(11, 14) renders the same p-value as SPSS, whereas
mcnemar.test() uses the approximation (|a_12 - a_21| - 1)²/(a_21 + a_12)
with the "-1" removed if correct=FALSE.
An old question of mine: Is there any reason not to use binom.test()
other than historical reasons?
--
Johannes Hüsing There is something fascinating about science.
One gets such wholesale returns of conjecture
mailto:johannes at huesing.name from such a trifling investment of fact.
http://derwisch.wikidot.com (Mark Twain, "Life on the Mississippi")
More information about the R-help
mailing list