g.test | R Documentation |
Provides likelihood ratio tests for one way and multiway tables.
g.test(y, correct = FALSE, pi.null = NULL)
y |
A vector of at least 2 elements, or a matrix. Must contain only non-negative integers. |
correct |
Logical. Indicating whether Yates correction for continuity should be used. |
pi.null |
Optional vector or matrix of null proportions. Must sum to one. |
Ken Aho
obs <- c(6022, 2001)
g.test(obs, pi.null = c(0.75, 0.25))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.