Skip to content
Prev 70498 / 398525 Next

Chi Square Test on two groups of variables

If 'oxygen' is a matrix with one row or column, 'oxygen' is treated as
a one-dimensional contingency table.  In this case, the hypothesis
tested is whether the population probabilities equal those in 'p', or
are all equal  if 'p' is not given.

you can convert the 'oxygen' and 'train' variables to vector or take a
two-dimensional contingency table by matrix(c(oxygen, train), nr=2).

you will get more information when you type ?chisq.test.

2005/5/27, Brett Stansfield <brett at hbrc.govt.nz>: