powered by
Provides likelihood ratio tests for one way and multiway tables.
g.test(y, correct = FALSE, pi.null = NULL)
A vector of at least 2 elements, or a matrix. Must contain only non-negative integers.
Logical. Indicating whether Yates correction for continuity should be used.
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))
Run the code above in your browser using DataLab