Re: [R] Chi-square test: Specifying expected proportions for two way table

2021-10-16 Thread Bert Gunter
Perhaps I misunderstand, but ?chisq.test explicitly says: "If x is a matrix with at least two rows and columns, it is taken as a two-dimensional contingency table: the entries of x must be non-negative integers. Otherwise, x and y must be vectors or factors of the same length; cases with missing

[R] Chi-square test: Specifying expected proportions for two way table

2021-10-16 Thread Miloš Žarković
Hi, Is there a function where I can specify expected proportions for the two-way table to calculate the Chi-square test? chisq.test allows specifying only the one-way table. Otherwise, I will have to write the function, but I never trust myself not to make a mess programing. Thanks, Miloš