Same structure as cramer_v(): a scalar when
detail = FALSE, a named vector when detail = TRUE.
The p-value tests H0: tau-c = 0 (Wald z-test).
Arguments
x
A contingency table (of class table).
detail
Logical. If FALSE (default), return the estimate
as a numeric scalar. If TRUE, return a named numeric vector
including confidence interval and p-value.
conf_level
A number between 0 and 1 giving the confidence
level (default 0.95). Only used when detail = TRUE. Set
to NULL to omit the confidence interval.
digits
Number of decimal places used when printing the
result (default 3). Only affects the detail = TRUE output.
.include_se
Internal parameter; do not use.
Details
Stuart's Tau-c is computed as
\(\tau_c = 2m(C - D) / (n^2(m - 1))\), where
\(m = \min(r, c)\). It is appropriate for rectangular
tables and is not restricted to the range \([-1, 1]\) only for
square tables.
Standard error formulas follow the DescTools implementations
(Signorell et al., 2024); see cramer_v() for full references.