Learn R Programming

PSIndependenceTest (version 0.0.1)

Mod2.stat: Modular test for independence in two-way contingency table

Description

Calculates the statistic of the modular test for independence in two-way contingency table (see Sulewski P. (2016)).

Usage

Mod2.stat(nij)

Value

The function returns the value of the modular test statistic.

Arguments

nij

a numeric matrix with non-negative values of the two-way contingency table cells

Author

Piotr Sulewski, piotr.sulewski@apsl.edu.pl, Pomeranian University in Slupsk.

Details

The statistic of the modular test for independence in r x c contingency table, see formula (2) in the article.

References

Sulewski, P. (2016). Moc testów niezależności w tablicy dwudzielczej większej niż 2×2, Przegląd statystyczny 63(2), 190-210

Examples

Run this code
tab5=GenTab2(matrix(1/12, nrow = 3, ncol = 4), 60)
Mod2.stat(tab5)
Mod2.stat(table1)

Run the code above in your browser using DataLab