[R] Problem applying McNemar's - Different values in SPSS and R

Johannes Huesing johannes at huesing.name
Wed Dec 29 15:58:49 CET 2010


Marc Schwartz <marc_schwartz at me.com> [Wed, Dec 29, 2010 at 03:28:56PM CET]:
> 
> On Dec 29, 2010, at 6:48 AM, Manoj Aravind wrote:
> 
> > Thank you Marc :)
> > It Certainly helped me to get the exact value of P. 
> > How to understand when to apply mcnemar.exact or just mcnemar.test?
[...]
> 

> Generally speaking, exact tests are used for "small-ish" sample
  sizes. Frequently when n <100 and in many cases, much lower (eg. <50
  or <30). The methods tend to become computationally impractical on
  "larger" data sets.

Sorry for chiming in again here, but binomial tests are computationally
cheap:

> system.time(binom.test(48000, 100000))
       User      System verstrichen 
      0.072       0.000       0.077 

You are certainly correct on Fisher's Exact Test with larger tables
or Wilcoxon's Signed Rank test.

[...]
> One exception to the above comment, is the use of Fisher's Exact Test (FET), which is typically advocated by folks as an alternative to a chi-square test when **expected** cell counts are <5. However, much has been written in recent times relative to just how conservative the FET is. One resource is:
> 
>   http://www.iancampbell.co.uk/twobytwo/twobytwo.htm
> 

That's only because people shy away from the randomized version :-)

-- 
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