Learn R Programming

setweaver (version 1.0.0)

gstat: gstat

Description

Computes the likelihood-ratio test statistic (G statistic) from the mutual information and the joint count of two variables: $$G = 2 \times n \times MI,$$ where \(n\) is the joint sample size and \(MI\) is the mutual information.

Usage

gstat(mi, count)

Value

A numeric scalar giving the G statistic value.

Arguments

mi

Numeric scalar; the mutual information between two variables.

count

Integer scalar; the joint count (sample size) used in computing mi.

Examples

Run this code
gstat(mi(misimdata$y,misimdata$x1),jtct(misimdata$y,misimdata$x1))

Run the code above in your browser using DataLab