Lms2.pvalue {PSIndependenceTest}R Documentation

Logarithmic Minimum Test for Independence in Two-Way Contingency Table

Description

Calculates the p-value of the logarithmic minimum test.

Usage

Lms2.pvalue(stat, nr, nc, n, B = 10000)

Arguments

stat

a logarithmic minimum statistic value

nr

a number of rows

nc

a number of columns

n

a sample size

B

an integer specifying the number of replicates used in the Monte Carlo test (optional)

Details

The p-value of the logarithmic minimum test for independence in r x c contingency table, data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAWElEQVR42mNgGPTAxsZmJsVqQApgmGw1yApwKcQiT7phRBuCzzCSDSHGMKINIeDNmWQlA2IigKJwIssQkHdINgxfmBBtGDEBS3KCxBc7pMQgMYE5c/AXPwAwSX4lV3pTWwAAAABJRU5ErkJggg==

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

Sulewski, P. (2019). The LMS for Testing Independence in Two-way Contingency Tables. Biometrical Letters 56(1), 17-43

Examples

Lms2.pvalue(Lms2.stat(table1), 2, 2, 40, B = 1e3)
Lms2.pvalue(Lms2.stat(table2), 2, 3, 60, B = 1e2)


[Package PSIndependenceTest version 0.0.1 Index]