# 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