GenTab4 | R Documentation |
Generating a four-way contingency table r x c x t x u.
GenTab4(pijtu, n)
pijtu |
a numeric matrix with non-negative probability values of the four-way contingency table |
n |
a sample size |
Generating a four-way contingency table r x c x t x u using the probability matrix pijtu. If Ho is true then pijtu equals 1 / r / c / t / u.
The function returns the four-way contingency table r x c x t x u
Piotr Sulewski, piotr.sulewski@apsl.edu.pl, Pomeranian University in Slupsk.
Extension of the information contained in 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 = 2; t = 2; u = 3
GenTab4(array(1 / (r * c * t * u), dim = c(r, c, t, u)),150)
table = GenTab4(array(1/16, dim = c(2, 2, 2, 2)), 200)
GenTab4(prop.table(table),200)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.