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 =4GenTab3(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