The likelihood ratio test for multinomial probabilities

Described in Chapter 3 "The 1xc Table and the Multinomial Distribution"

LR_test_1xc(n, pi0)

Arguments

n

the observed counts (a 1xc vector, where c is the number of categories)

pi0

given probabilities (a 1xc vector)

Value

An object of the contingencytables_result class, basically a subclass of base::list(). Use the utils::str() function to see the specific elements returned.

Examples

# Genotype counts for SNP rs 6498169 in RA patients
LR_test_1xc(n = snp6498169$complete$n, pi0 = snp6498169$complete$pi0)
#> The likelihood ratio test: P = 0.00401, T = 11.038 (df = 2)
# subset of 10 patients
LR_test_1xc(n = snp6498169$subset$n, pi0 = snp6498169$subset$pi0)
#> The likelihood ratio test: P = 0.02704, T = 7.221 (df = 2)