I've manually calculated the $G^{2}$ test statistic for my 2x2 table, that is,

$G^{2} = 2\sum_{i}\sum_{j}n_{ij}log(\dfrac{n_{ij}}{u_{ij}})$

What I now want to know is what R command can return to me the corresponding p-value (with say 2 degrees of freedom). I've been using the pschisq test but I'm rather certain that I should not be using this test for the $G^{2} $ test statistic.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.