Skip to content
Prev 246647 / 398502 Next

need help for chi-squared test

David,

I think the poster wants to use one of the columns as x and the other as y, ignoring the remaining columns.  If that is the case then he/she needs to read the section in "Introduction to R" on subsetting data frames.

I agree that the output so far is meaningless, from the degrees of freedom it looks like chisq.test is interpreting the data frame as a 1245 by 4 contingency table.  The thing that concerns me is the lack of any warnings or errors, if there truly were not any warnings then how is it interpreting counts of 0.25? and I would expect the number of 0's in the part shown to generate the warning about cell sizes too small.