[R] chi-squared test
Sundardas Dorai-raj
doraiss at auburn.edu
Tue Dec 18 14:04:41 CET 2001
>>> "juli g. pausas" <juli at ceam.es> 12/18/01 05:52 AM >>>
> I don't quite understand the difference between the
> two methods for
> performing a chi-squared test on contingency
> tables: summary(table())
> and chisq.test()
> They may different results. E.g.:
>
> aa <- gl(2, 10)
> bb <- as.factor(c
> (1,2,2,2,1,2,1,2,2,2,1,2,2,2,1,1,1,2,1,1))
> aa <- c(aa, aa)
> bb <- c(bb, bb)
> table(aa, bb)
> summary(table(aa, bb))
> chisq.test(aa, bb)
>
> Could somebody give me some clues?
> Thanks in advance
>
> Juli
>From help(chisq.test):
correct: a logical indicating whether to apply continuity correction
when computing the test statistic.
Setting correct=F gives the same answer as summary.table.
Sundar
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list