chi_square | R Documentation |
Convenience function for stats::chisq.test(). Returns only the p-value if pvalue is set to TRUE (default), otherwise returns a list with class "htest"
chi_square(vals, pvalue = T, correct = FALSE)
vals |
an integer vector of numerator (odd elements), denominator (even elements) pairs |
pvalue |
a logical TRUE: return only p-value | FALSE: return list from chisq.test |
correct |
a logical indicating whether to apply continuity correction when computing the test statistic for 2 by 2 tables |
numeric p-value or list with class "htest"
v<-c(c(100,144),c(200,344),c(75,130))
orrr::chi_square(v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.