Two-way contingency table r x c - generation
Generating a two-way contingency table r x c
GenTab2(pij, n)
pij
: a numeric matrix with non-negative probability values of the two-way contingency tablen
: a sample sizeThe function returns the two-way contingency table r x c
Generating a two-way contingency table r x c using the probability matrix pij. If Ho is true then pij equals 1 / r / c.
r = 6; c = 2 GenTab2(array(1 / r / c, dim = c(r, c)), 93) GenTab2(matrix(c(0.125,0.25,0.25,0.375), nrow=2), 100)
Sulewski, P. (2016). Moc testów niezależności w tablicy dwudzielczej większej niż 2×2, Przegląd statystyczny 63(2), 190-210
Piotr Sulewski, piotr.sulewski@apsl.edu.pl , Pomeranian University in Slupsk.
Useful links