strength.test {DiffXTables} | R Documentation |
Strength Test for Association in Multiple Contingency Tables
Description
The test determines the total strength of association in multiple contingency tables.
Usage
strength.test(tables)
Arguments
tables |
a list of at least two non-negative matrices or data frames representing contingency tables. |
Details
The strength test determines total amount of association in multiple input contingency tables. Its test statistic asymptotically follows the chi-squared distribution under the null hypothesis of each table having independent row and column variables (Sharma et al. 2020).
The test statistic is minimized to zero if and only if row and column variables are empirically independent of each other in every table.
This test is considered a zeroth-order test in the function type.analysis
that characterizes the difference across multiple contingency tables.
Value
A list with class "htest
" containing the following components:
statistic |
the strength test statistic. |
parameter |
the degrees of freedom of null chi-squared distribution. |
p.value |
the p-value for the test, computed using the null chi-squared distribution. |
Author(s)
Ruby Sharma and Joe Song
References
Sharma R, Luo X, Kumar S, Song M (2020). “Three Co-Expression Pattern Types across Microbial Transcriptional Networks of Plankton in Two Oceanic Waters.” In Proceedings of the 11th ACM International Conference on Bioinformatics, Computational Biology and Health Informatics, BCB '20. ISBN 9781450379649, doi: 10.1145/3388440.3412485, https://doi.org/10.1145/3388440.3412485.
See Also
A second-order different test sharma.song.test
. A first-order difference test marginal.change.test
. The comparative type of differences across contingency tables type.analysis
.
Examples
# Both tables have strong association:
tables <- list(
matrix(c(30,0,0,
0,10,0,
0,0,20), nrow=3),
matrix(c(10,0,0,
0,20,0,
0,0,30), nrow=3)
)
strength.test(tables)
# One table has strong association:
tables <- list(
matrix(c(4,0,0,
0,4,0,
0,0,4), nrow=3),
matrix(c(4,0,4,
8,4,8,
4,0,4), nrow=3)
)
strength.test(tables)
# Both tables has no association:
tables <- list(
matrix(c(4,0,4,
8,4,8,
4,0,4), nrow=3),
matrix(c(4,0,4,
8,4,8,
4,0,4), nrow=3)
)
strength.test(tables)