[R] chi-squared test
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Tue Dec 18 10:44:45 CET 2001
"juli g. pausas" <juli at ceam.es> writes:
> 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
The summary method is not doing Yates' correction.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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