GenTab3 function

Three-way contingency table r x c x t - generation

Three-way contingency table r x c x t - generation

Generating a three-way contingency table r x c x t.

GenTab3(pijt, n)

Arguments

  • pijt: a numeric matrix with non-negative probability values of the three-way contingency table
  • n: a sample size

Returns

The function returns the three-way contingency table r x c x t

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.

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)

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

Author(s)

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

  • Maintainer: Piotr Sulewski
  • License: GPL-3
  • Last published: 2023-09-14

Useful links