Learn R Programming

PSIndependenceTest (version 0.0.1)

Mod3.test: Modular test for independence in three-way contingency table

Description

Calculates the test statistic and p-value of the modular test for independence in three-way contingency table

Usage

Mod3.test(nijt, B = 10000)

Value

The function returns values of the test statistic and p-value of the modular test.

Arguments

nijt

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

B

an integer specifying the number of replicates used in the Monte Carlo test (optional)

Author

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

Details

The test statistic and p-value of the modular test for independence in r x c x t contingency table,

References

Sulewski, P. (2018). Power Analysis Of Independence Testing for the Three-Way Con-tingency Tables of Small Sizes. Journal of Applied Statistics 45(13), 2481-2498

Examples

Run this code
Mod3.test(GenTab3(array(0.125, dim = c(2, 2, 2)), 80), B = 1e3)
Mod3.test(table4, B = 1e3)

Run the code above in your browser using DataLab