
Last chance! 50% off unlimited learning
Sale ends in
Convert between Chi square, (
chisq_to_phi(chisq, n, nrow, ncol, ci = 0.95, adjust = FALSE, ...)chisq_to_cohens_w(chisq, n, nrow, ncol, ci = 0.95, adjust = FALSE, ...)
chisq_to_cramers_v(chisq, n, nrow, ncol, ci = 0.95, adjust = FALSE, ...)
phi_to_chisq(phi, n, ...)
The Chi-squared statistic.
Sample size.
The number of rows/columns in the contingency table (ignored for Phi when adjust=FALSE
and CI=NULL
).
Confidence Interval (CI) level
Should the effect size be bias-corrected? Defaults to FALSE
.
Arguments passed to or from other methods.
The Phi statistic.
A data frame with the effect size(s) between 0-1, and confidence interval(s).
These functions use the following formulae:
For adjusted versions, see Bergsma, 2013.
Confidence intervals are estimated using the Noncentrality parameter method;
These methods searches for a the best ncp
(non-central parameters) for of
the noncentral Chi-squared distribution for the desired tail-probabilities,
and then convert these ncp
s to the corresponding effect sizes.
Cumming, G., & Finch, S. (2001). A primer on the understanding, use, and calculation of confidence intervals that are based on central and noncentral distributions. Educational and Psychological Measurement, 61(4), 532-574.
Bergsma, W. (2013). A bias-correction for Cramer's V and Tschuprow's T. Journal of the Korean Statistical Society, 42(3), 323-328.
# NOT RUN {
contingency_table <- as.table(rbind(c(762, 327, 468), c(484, 239, 477), c(484, 239, 477)))
chisq.test(contingency_table)
#
# Pearson's Chi-squared test
#
# data: ctab
# X-squared = 41.234, df = 4, p-value = 2.405e-08
chisq_to_phi(41.234,
n = sum(contingency_table),
nrow = nrow(contingency_table),
ncol = ncol(contingency_table)
)
chisq_to_cramers_v(41.234,
n = sum(contingency_table),
nrow = nrow(contingency_table),
ncol = ncol(contingency_table)
)
# }
Run the code above in your browser using DataLab