Lms4.pvalue {PSIndependenceTest} | R Documentation |
Logarithmic minimum test for independence in four-way contingency table
Description
Calculates the p-value of the Logarithmic minimum test for independence in four-way contingency table
Usage
Lms4.pvalue(stat, nr, nc, nt, nu, n, B = 10000)
Arguments
stat |
a Logarithmic minimum statistic value |
nr |
a number of rows |
nc |
a number of columns |
nt |
a number of tubes |
nu |
a number of |
n |
a sample size |
B |
an integer specifying the number of replicates used in the Monte Carlo test (optional) |
Details
The Critical value of the modular test for independence in r x c x t x u contingency table,
Value
The function returns the p-value of the logarithmic minimum test.
Author(s)
Piotr Sulewski, piotr.sulewski@apsl.edu.pl, Pomeranian University in Slupsk.
References
Extension of the information contained in Sulewski, P. (2021). Logarithmic Minimum Test for Independence in Three Way Con-tingency Table of Small Sizes, Journal of Statistical Computation and Simulation 91(13), 2780-2799
Examples
data = GenTab4(array(1/16, dim = c(2, 2, 2, 2)), 160)
Lms4.pvalue(Lms4.stat(data), 2, 2, 2, 2, 160, B=1e3)
Lms4.pvalue(Lms4.stat(table6), 2, 2, 2, 2, 160, B = 1e2)