Pattern Analysis Across Contingency Tables
Overview
Statistical hypothesis testing of pattern heterogeneity via differences in underlying distributions across multiple contingency tables. Five tests are included: the comparative chi-squared test (Song et al. 2014) doi:10.1093/nar/gku086 (Zhang et al. 2015) doi:10.1093/nar/gkv358, the Sharma-Song test (Sharma et al. 2021) doi:10.1093/bioinformatics/btab240, the heterogeneity test, the marginal-change test (Sharma et al. 2020) doi:10.1145/3388440.3412485, and the strength test (Sharma et al. 2020) doi:10.1145/3388440.3412485. Under the null hypothesis that row and column variables are statistically independent and joint distributions are equal, their test statistics all follow an asymptotically chi-squared distribution. A comprehensive type analysis categorizes the relation among the contingency tables into type null, 0, 1, and 2 (Sharma et al. 2020) doi:10.1145/3388440.3412485. They can identify heterogeneous patterns that differ in either the first order (marginal) or the second order (differential departure from independence). Second-order differences reveal more fundamental changes than first-order differences across heterogeneous patterns.
2021-05-14
1. Updated user manuals, README, DESCRIPTION, and the vignette.
2021-04-28
1. Added the citation to the Bioinformatics paper describing
Sharma-Song test with observed null table marginals in
DESCRIPTION, CITATION, REFERENCES.bib, and README.md files.
2. Introduced a boolean parameter to compensate the issue of Cochran's
condition of samples value less than 5 in any cell.
2020-12-24
1. Updated DESCRIPTION
2. Introduced null.table.marginal parameter to use the
sharma.song.test with observed and uniform marginal null
Show all changes in 0.1.3Hide the rest of the changes in 0.1.3
population.
3. No longer using the correction of normalized frequency table A
inside function get.e.mat()
4. Added test cases for the uniform marginal null tables.
5. Added test cases for parameter compensated parameter.
6. Updated the user manual for sharma.song.test() function.
7. Added full citation information and DOI number for the
first-order marginal change test ACM paper (Sharma et al, 2020)
in DESCRIPTION, CITATION, REFERENCES.bib, and README.md files.
8. stats::chisq.test() is no longer called inside function
chisq.test.stat(). This reduce the overhead in chisq.test(), as we
only need to compute the Pearson chi-squared test statistic.
2020-12-16
1. Created version 0.1.3 from 0.1.2
From NEWS in the release
Install
Health
NOTERd filesr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
checkRd: (-1) simulate_diff_tables.Rd:72: Lost braces; missing escapes or markup?
72 | {The Sharma-Song test} {\code{\link[DiffXTables]{sharma.song.test}}}
| ^
checkRd: (-1) simulate_diff_tables.Rd:74: Lost braces; missing escapes or markup?
74 | {The comparative chi-squared test} {\code{\link[DiffXTables]{cp.chisq.test}}}
| ^
checkRd: (-1) simulate_diff_tables.Rd:76: Lost braces; missing escapes or markup?
76 | {The heterogeneity test} {\code{\link[DiffXTables]{heterogeneity.test}}}
| ^- NOTE13 NOTENow
- NOTE14 NOTE2026-03-10
Documentation
- Help pages
- 7
- Examples that run
- 100%7 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 86% with a bibliography file
Downloads
Dependencies
Installing DiffXTables adds 5 packages (4 with compiled code, 3.9 MB of source tarballs). Heaviest: Rcpp 1.8 MB, rbibutils 1.1 MB, pander 387 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.1.3Latest
- 0.1.1
- RR 4.0.0 released · 2020-04-24
- 0.1.0
- 0.0.22019-11-12 · diff ↗
- 0.0.12019-11-04
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2019-11-04
- Total releases
- 5 / 7 yrs
- License
- LGPL (>= 3) OSI
- Minimum R
- ≥ 3.0
- Download size
- 126 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("DiffXTables")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1093/nar/gku086, 10.1093/nar/gkv358, 10.1145/3388440.3412485, 10.1093/bioinformatics/btab240.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.