powered by
Performs a likelihood ratio test of independence
likelihood.test(x,y=NULL,conservative=FALSE)
A list with class "htest" containing the following components:
the value the chi-squared test statistic.
the degrees of freedom of the approximate chi-squared distribution of the test statistic.
the p-value for the test.
a character string indicating the type of test performed, and whether the continuity correction was used.
a character string giving the name(s) of the data.
A vector or a matrix
A vector that is ignored if x is a matrix and required if x is a vector
If TRUE, the Williams' continuity correction is used
TRUE
Pete Hurd and Ian Fellows
chisq.test
data(InsectSprays) likelihood.test(InsectSprays$count>7,InsectSprays$spray)
Run the code above in your browser using DataLab