On Jun 17, 2013, at 10:36 , R. Michael Weylandt wrote:

> On Mon, Jun 17, 2013 at 9:14 AM, Dave Clark <d...@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

Replace with chisq.test(data.table)$observed, etc.


-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-help@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.

Reply via email to