On Mon, Jun 17, 2013 at 9:14 AM, Dave Clark <dave at mailbox.co.uk>
wrote:> I`m doing the chi square test in R, see below code:
>
>> row1 <- c(27,17,13,21,80,24,35,41,18,51) #Category A (1-10) counts
>> row2 <- c(27,11,26,13,30,28,17,30,10,21) #Category B (1-10) counts
>> data.table <- rbind(row1,row2)
>> data.table
>
> then:
>> chisq.test(data.table)
>
> This gives me the chi figure, degrees of freedom and p value.
>
> But how do I get the results of individual cells?
What do you mean 'results of individual cells'? As documented in
?chisq.test, you might be looking for one or more of
data.table$observed
data.table$expected
data.table$residuals
data.table$stdres
Pick your poison. ;-)
MW
>
> And has anyone got any good ideas on a decent post hoc test to the chi
> square test.
>
> Thanks all in advance,
>
>
>
> Dave Clark
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.