Four-way contingency table r x c x t x u - generation
Four-way contingency table r x c x t x u - generation
Generating a four-way contingency table r x c x t x u.
GenTab4(pijtu, n)
Arguments
pijtu: a numeric matrix with non-negative probability values of the four-way contingency table
n: a sample size
Returns
The function returns the four-way contingency table r x c x t x u
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.
Examples
r =2; c =2; t =2; u =3GenTab4(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)
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