g.test: Likelihood ratio test for tabular data

View source: R/g.test.r

g.testR Documentation

Likelihood ratio test for tabular data

Description

Provides likelihood ratio tests for one way and multiway tables.

Usage


g.test(y, correct = FALSE, pi.null = NULL)

Arguments

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.

Author(s)

Ken Aho

Examples

obs <- c(6022, 2001)
g.test(obs, pi.null = c(0.75, 0.25))

asbio documentation built on May 29, 2024, 5:57 a.m.