A shortcut wrapper function to get the observed test statistic for a chisq test. Uses chisq.test(), which applies a continuity correction.
chisq_stat(x, formula, response = NULL, explanatory = NULL, ...)
x | A data frame that can be coerced into a tibble. |
---|---|
formula | A formula with the response variable on the left and the explanatory on the right. |
response | The variable name in |
explanatory | The variable name in |
... | Additional arguments for chisq.test(). |