chisq.LRtest: Chi-Squared Liklihood Ratio Test

Description Usage Arguments Value Examples

View source: R/218ChisqLRtest.R

Description

This function calculates the likeliehood ratios for the independence test of the same name.

Usage

1

Arguments

tab

An I x J contingency table passed through table().

Value

Returns the likelihood ratio test statistic, G^2, the p-value of the test, and the degrees of freedom, (I-1)(J-1).

Examples

1
2
3
4
# make some table (for the purposes of this example, 2x2)
table <- matrix(c(5134,2829,3946,715), nrow=2, ncol=2, byrow=TRUE)
# then pass this table through chisq.LRtest
chisq.LRtest(table)

ESunRoc/STT218 documentation built on Jan. 14, 2020, 2:39 a.m.