ChiSquaredTools v1.0.0 – Comprehensive Chi-Squared Testing, Post-Hoc Analysis & Association Measures
Posted: Thu Nov 20, 2025 3:59 pm
Hello everyone,
Following on from my earlier post (viewtopic.php?t=4082) where I shared a preliminary version of the ChiSquaredTools module, I wanted to update the community on its development.
The module has expanded considerably beyond the initial post-hoc facility, and I would welcome feedback from anyone willing to test it.
Current Facilities
The module now provides three fully integrated analysis components:
1. Chi-Squared Testing Facility (chisqtest)
- Traditional χ² test
- (N-1)/N adjusted test (Williams' correction)
- Permutation test with (optional) distribution visualisation
- Monte Carlo test with (optional) distribution visualisation
- Automated method selection guidance based on table characteristics (grand total, minimum expected frequencies, table dimensions)
- Supports both long-format (case-level) and wide-format (aggregated with counts variable) data[/list]
2. Post-Hoc Analysis Facility (chisqposthoc)
-Standardised residuals
-Moment-corrected standardised residuals (Garcia-Perez & Nunez-Anton 2003)
-Adjusted standardised residuals (Haberman 1973)
-Quetelet Index (Mirkin 2001, 2023)
-IJ Association Factor (Good 1956; Agresti 2013)
-PEM (Percentage of Maximum deviation) with bootstrap confidence intervals (Cibois 1993; Lefèvre & Champely 2009)
-Standardised median polish residuals
-Adjusted standardised median polish residuals
-Optional Šidák correction for multiple comparisons with dynamically calculated thresholds
-Colour-coded significance indicators (red for positive associations, blue for negative)
-Individual interpretive guidance for each measure with threshold explanations and references
3. Association Measures Facility (chisqassoc)
Chi-squared-based measures:
-φ coefficient (phi) with signed and corrected versions
-Contingency coefficient C with adjusted and corrected versions
-Cramér's V with confidence intervals (Smithson 2003)
-Cramér's V corrected (Berry et al. 2018)
-Cramér's V standardised (Smith 1976; Reynold 1977)
-Cramér's V bias-corrected (Bergsma 2013)
-Cohen's w
-χ²-max table calculation and display with ratio interpretations
Distance-based measures:
-W-hat coefficient (Ŵ) with bootstrap confidence intervals (Kvålseth 2018)
Margin-free measures (2×2 tables):
-Yule's Q with confidence intervals and p-values
-Yule's Y with confidence intervals and p-values
-Odds Ratio with confidence intervals and p-values
-Pairwise comparisons for all 2×2 sub-tables in larger tables
Proportional Reduction in Error (PRE) measures:
-Goodman-Kruskal Lambda (rows dependent, columns dependent, symmetric) with confidence intervals
-Lambda corrected versions
-Goodman-Kruskal Tau (rows dependent, columns dependent) with confidence intervals
Supplementary displays:
-Standardised contingency table (rescaled to average marginal totals)
-Chi-squared-maximising table for understanding upper bounds
-Effect size thresholds table with two-tier interpretation system (Cohen 1988; Olivier-Bell 2013)
Educational Orientation
The module has been designed specifically with pedagogical aims. All three facilities include optional comprehensive method explanations that can be toggled on/off by the user, including (but not limited to):
Detailed method descriptions for each coefficient/measure explaining:
What the measure calculates and why
Its range and interpretation
When it is appropriate or problematic
How corrections address specific limitations
Appropriate use cases
Effect size interpretation guidance:
Two-tier threshold system accounting for table dimensions and marginal configurations
Specific references for each threshold (Cohen 1988, Ferguson 2009, empirical guidelines from literature)
Clear magnitude labels (Small, Medium, Large)
Academic references provided for every statistical method, properly formatted with author-year citations
I remain grateful to those who downloaded and presumably tested earlier versions (253+ downloads).
For anyone interested in testing, the updated (zipped) .jmo file is attached.
Best regards,
Gianmarco
Following on from my earlier post (viewtopic.php?t=4082) where I shared a preliminary version of the ChiSquaredTools module, I wanted to update the community on its development.
The module has expanded considerably beyond the initial post-hoc facility, and I would welcome feedback from anyone willing to test it.
Current Facilities
The module now provides three fully integrated analysis components:
1. Chi-Squared Testing Facility (chisqtest)
- Traditional χ² test
- (N-1)/N adjusted test (Williams' correction)
- Permutation test with (optional) distribution visualisation
- Monte Carlo test with (optional) distribution visualisation
- Automated method selection guidance based on table characteristics (grand total, minimum expected frequencies, table dimensions)
- Supports both long-format (case-level) and wide-format (aggregated with counts variable) data[/list]
2. Post-Hoc Analysis Facility (chisqposthoc)
-Standardised residuals
-Moment-corrected standardised residuals (Garcia-Perez & Nunez-Anton 2003)
-Adjusted standardised residuals (Haberman 1973)
-Quetelet Index (Mirkin 2001, 2023)
-IJ Association Factor (Good 1956; Agresti 2013)
-PEM (Percentage of Maximum deviation) with bootstrap confidence intervals (Cibois 1993; Lefèvre & Champely 2009)
-Standardised median polish residuals
-Adjusted standardised median polish residuals
-Optional Šidák correction for multiple comparisons with dynamically calculated thresholds
-Colour-coded significance indicators (red for positive associations, blue for negative)
-Individual interpretive guidance for each measure with threshold explanations and references
3. Association Measures Facility (chisqassoc)
Chi-squared-based measures:
-φ coefficient (phi) with signed and corrected versions
-Contingency coefficient C with adjusted and corrected versions
-Cramér's V with confidence intervals (Smithson 2003)
-Cramér's V corrected (Berry et al. 2018)
-Cramér's V standardised (Smith 1976; Reynold 1977)
-Cramér's V bias-corrected (Bergsma 2013)
-Cohen's w
-χ²-max table calculation and display with ratio interpretations
Distance-based measures:
-W-hat coefficient (Ŵ) with bootstrap confidence intervals (Kvålseth 2018)
Margin-free measures (2×2 tables):
-Yule's Q with confidence intervals and p-values
-Yule's Y with confidence intervals and p-values
-Odds Ratio with confidence intervals and p-values
-Pairwise comparisons for all 2×2 sub-tables in larger tables
Proportional Reduction in Error (PRE) measures:
-Goodman-Kruskal Lambda (rows dependent, columns dependent, symmetric) with confidence intervals
-Lambda corrected versions
-Goodman-Kruskal Tau (rows dependent, columns dependent) with confidence intervals
Supplementary displays:
-Standardised contingency table (rescaled to average marginal totals)
-Chi-squared-maximising table for understanding upper bounds
-Effect size thresholds table with two-tier interpretation system (Cohen 1988; Olivier-Bell 2013)
Educational Orientation
The module has been designed specifically with pedagogical aims. All three facilities include optional comprehensive method explanations that can be toggled on/off by the user, including (but not limited to):
Detailed method descriptions for each coefficient/measure explaining:
What the measure calculates and why
Its range and interpretation
When it is appropriate or problematic
How corrections address specific limitations
Appropriate use cases
Effect size interpretation guidance:
Two-tier threshold system accounting for table dimensions and marginal configurations
Specific references for each threshold (Cohen 1988, Ferguson 2009, empirical guidelines from literature)
Clear magnitude labels (Small, Medium, Large)
Academic references provided for every statistical method, properly formatted with author-year citations
I remain grateful to those who downloaded and presumably tested earlier versions (253+ downloads).
For anyone interested in testing, the updated (zipped) .jmo file is attached.
Best regards,
Gianmarco