GenTab4 {PSIndependenceTest}R Documentation

Four-way contingency table r x c x t x u - generation

Description

Generating a four-way contingency table r x c x t x u.

Usage

GenTab4(pijtu, n)

Arguments

pijtu

a numeric matrix with non-negative probability values of the four-way contingency table

n

a sample size

Details

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.

Value

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

Author(s)

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

References

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

Examples

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)


[Package PSIndependenceTest version 0.0.1 Index]