Learn R Programming

asbio (version 1.9-7)

g.test: 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

Ken Aho

Examples

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

Run the code above in your browser using DataLab