A comprehensive jamovi module for chi-squared analysis of contingency tables, designed as an educational resource for undergraduate students learning categorical data analysis.
ChiSquaredTools provides a point-and-click interface for contingency table analysis, addressing the challenge students face when learning both statistical concepts and software simultaneously. The module includes extensive pedagogical scaffolding with toggleable method explanations, academic citations, and interpretation guidance.
The module includes nine analytical facilities accessible from the Chi² Tools menu in jamovi:
Chi-squared test of independence with multiple testing methods:
- Traditional Pearson chi-squared test
- (N−1)/N adjusted chi-squared test (for small samples)
- Permutation-based exact test
- Monte Carlo test with Phipson & Smyth (2010) p-value computation
- M test (maximum adjusted residual method)
Cell-level diagnostic metrics including:
- Standardised and adjusted standardised residuals
- Moment-corrected standardised residuals
- Quetelet Index and IJ association factor
- Backwards-stepping outlier detection
- PEM (Percentage of Maximum Deviation) with bootstrap confidence intervals
- Median polish residuals (standardised and adjusted)
- Goodman-Kruskal residuals
- Difference in Estimated Proportions (DEP)
Over 20 association measures organised by statistical foundation:
- Chi-squared-based measures: Phi (with signed and corrected variants), Cole's C7, Zysno's Phi, Contingency Coefficient C (with adjusted and corrected variants), Cramér's V (with corrected, standardised, and bias-corrected variants), Cohen's w
- Distance-based measures: Ŵ (W-hat) and Sakoda's D (with corrected variants and local cell-level values)
- Margin-free measures (2×2 tables): Odds Ratio, Yule's Q, Yule's Y
- Proportional Reduction in Error (PRE) measures: Goodman-Kruskal Lambda (row, column, symmetric; with corrected variants), Goodman-Kruskal Tau (row, column)
- Bootstrap confidence intervals for selected measures
Statistical power tools for study planning:
- A priori sample size determination
- Post-hoc power calculation
- Sensitivity analysis
Simultaneous Reduction of Dimension for sparse contingency tables using the Orton & Tyers (1991) method:
- Systematic merging of statistically indistinguishable rows and columns
- Chi-squared distance-based similarity assessment with significance testing
- Optional pruning of categories too small to contribute meaningful information
- Step-by-step merge history with p-values for each decision
- Progressive output showing row-grouped, column-grouped, and final reduced tables
- Chi-squared retention statistics to assess information preservation
Hierarchical clustering analysis using:
- Ward's method with (A) chi-squared distance (Greenacre, 2017), or (B) Inertia Gain Ratio (Husson et al., 2017)
- Dendrogram visualisation
Correspondence Analysis (CA) for visualising association structure in contingency tables:
- Multiple visualisation options: Symmetric CA Plot, Geometric Interpretation Plot (Borg & Groenen, 2005; Yelland, 2010), and Contribution Biplot (Greenacre, 2017)
- Distance metrics: Pearson residuals (χ² distance) or Freeman-Tukey residuals (Hellinger distance; Beh, Lombardo & Alberti, 2018)
- Residual types: Standardised or adjusted standardised residuals for the Pearson framework
- Interpretive tables: Dimension definition, dimension summary (poles), correlations with dimensions, and interpretation summary
- Diagnostics: Malinvaud's test for dimensionality, overdispersion diagnostic plot, SRD-based clustering of interpreted categories
- Output options: Inertia decomposition, category profiles, cell contributions, scree plot
For 2×2 tables across K strata:
- Cochran-Mantel-Haenszel test for conditional independence
- Mantel-Haenszel pooled odds ratio with confidence intervals
- Breslow-Day and Tarone tests for homogeneity of odds ratios
- Stratum-specific statistics and forest plots
For general R×C tables across K strata:
- Generalised Cochran-Mantel-Haenszel test
- Log-linear homogeneity test
- Stratum-specific chi-squared statistics
- Trajectory plots
Each facility includes:
- Method explanations: Toggleable descriptions with rationale, formulas, and usage guidance
- Automatic highlighting: Significant or noteworthy results are colour-coded for easy identification
- Diagnostic decision trees: Guidance for choosing appropriate methods
- Academic citations: Proper references to statistical literature throughout
- Interpretation guidance: Decision support for effect size interpretation
- In jamovi, go to Modules → jamovi library
- Search for "ChiSquaredTools"
- Click Install
The jamovi library provides pre-built versions for all supported platforms (Windows, macOS Intel, macOS Apple Silicon, and Linux).
For the latest development version or to build from source:
- Ensure you have R and the
jmvtoolspackage installed:
install.packages('jmvtools', repos = c('https://repo.jamovi.org', 'https://cran.r-project.org'))- Clone or download this repository
- Open R in the repository directory and run:
jmvtools::install()This will compile the module for your specific platform and install it into your local jamovi installation.
- jamovi 2.6 or later
- R 4.4.1 or later (bundled with jamovi; required only if building from source)
Gianmarco Alberti
University of Malta
Email: gianmarco.alberti@um.edu.mt
If you use this module in your research or teaching, please cite:
Alberti, G. (2025). ChiSquaredTools: Chi-Squared Analysis Tools [jamovi module]. https://github.com/gianmarcoalberti/ChiSquaredTools
- chisquare: The author's CRAN package providing many of the underlying statistical functions
- stratastats: The author's CRAN package providing many of the underlying statistical functions
- From Data to Insights: A Beginner's Guide to Cross-Tabulation Analysis (Chapman & Hall, 2024. ISBN 9781032720388)
This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.