DiscStat: Test statistic for dependence in contingency table

Description Usage Arguments Value References Examples

View source: R/DiscStat.R

Description

This function computes the value of the test statistic T_n measuring the strength of dependence in a contingency table. See Section 3.1 of \insertCiteBKS2020USP for a definition.

Usage

1
DiscStat(freq)

Arguments

freq

Two-way contingency table whose strength of dependence is to be measured.

Value

A list containing the value of the test statistic T_n, the table of expected null counts, and the table of contributions to T_n.

References

\insertRef

BKS2020USP

Examples

1
2
3
4
5
6
freq=r2dtable(1,rep(10,5),rep(10,5))[[1]]; DiscStat(freq)

freq=diag(1:5); DiscStat(freq)

freq=r2dtable(1,rep(10,5),rep(10,5))[[1]] + 4*diag(rep(1,5))
DiscStat(freq)

USP documentation built on Jan. 27, 2021, 5:08 p.m.

Related to DiscStat in USP...