GenTab3 {PSIndependenceTest} | R Documentation |
Three-way contingency table r x c x t - generation
Description
Generating a three-way contingency table r x c x t.
Usage
GenTab3(pijt, n)
Arguments
pijt |
a numeric matrix with non-negative probability values of the three-way contingency table |
n |
a sample size |
Details
Generating a three-way contingency table r x c x t using the probability matrix pijt. If Ho is true then pijt equals 1 / r / c / t.
Value
The function returns the three-way contingency table r x c x t
Author(s)
Piotr Sulewski, piotr.sulewski@apsl.edu.pl, Pomeranian University in Slupsk.
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
r = 2; c = 3; t = 4
GenTab3(array(1 / (r * c * t), dim = c(r, c, t)),250)
table = GenTab3(array(0.125, dim = c(2, 2, 2)), 100)
GenTab3(prop.table(table),100)
[Package PSIndependenceTest version 0.0.1 Index]