GenTab3 | R Documentation |
Generating a three-way contingency table r x c x t.
GenTab3(pijt, n)
pijt |
a numeric matrix with non-negative probability values of the three-way contingency table |
n |
a sample size |
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.
The function returns the three-way contingency table r x c x t
Piotr Sulewski, piotr.sulewski@apsl.edu.pl, Pomeranian University in Slupsk.
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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.