Learn R Programming

ordinalTables (version 1.0.0.3)

likelihood_ratio_chisq: Computes the likelihood ratio G^2 measure of fit.

Description

Computes the likelihood ratio G^2 measure of fit.

Usage

likelihood_ratio_chisq(n, pi, exclude_diagonal = FALSE)

Value

G^2

Arguments

n

Matrix of observed counts

pi

Matrix of same dimensions as n. Model-based matrix of predicted proportions

exclude_diagonal

logical. Should the diagonal cells of a square matrix be excluded from the computation. Default is FALSE. The effect of setting it to TRUE for non-square matrices may be unintuitive and should he avoided.