powered by
Compute Cramer's V and phi (\(\phi\)) from contingency tables.
phi(x, y = NULL, CI = 0.95, adjust = FALSE, ...)cramers_v(x, y = NULL, CI = 0.95, adjust = FALSE, ...)
cramers_v(x, y = NULL, CI = 0.95, adjust = FALSE, ...)
a numeric vector or matrix. x and y can also both be factors.
a numeric vector; ignored if x is a matrix. If x is a factor, y should be a factor of the same length.
Confidence Interval (CI) level
Should the effect size be bias-corrected? Defaults to FALSE.
FALSE
Ignored.
A data frame with the effect size(s) between 0-1, and confidence interval(s).
chisq_to_phi() for details regarding estimation and CIs.
chisq_to_phi()
# NOT RUN { contingency_table <- as.table(rbind(c(762, 327, 468), c(484, 239, 477), c(484, 239, 477))) phi(contingency_table) cramers_v(contingency_table) # }
Run the code above in your browser using DataLab