Re: [R] Help: chisq.test

From: J Dougherty <jwd_at_surewest.net>
Date: Sun 11 Dec 2005 - 15:23:03 EST

On Saturday 10 December 2005 17:37, Thanjavur Bragadeesh wrote:
> I have two groups of patients (improved or not improved) named x and y
> group respectively after being treated with 5 different drugs
>
> X<-c(43,52,25,48,57) and
>
> Y<-c(237,198,245,212,233)
>
> when I run
>
> chisq.test(cbind(x,y))

X and Y here are read as two columns of data when you use cbind with five rows. With cbind you have 4 DOF.
>
> I get a p value of <0.0024
>
> but if I run
>
> chisq.test(x,y) I get a p value of 0.22 not significant at 5%

When not using cbind, you have 16 DOF. The numbers may look the same to you, but you are specifying two quite different sets of data,
>
>
> what is the difference between the two
>
> thanks
>
> bragadeesh

JWDougherty



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Dec 11 15:35:46 2005

This archive was generated by hypermail 2.1.8 : Sun 11 Dec 2005 - 17:27:00 EST