powered by
Chi squared is calculated using stats::chisq.test. If any cell contains less than 5 observations, the exact-parameter is set.
stats::chisq.test
effect_counts_one_grouped(data, col, cross, clean = TRUE, ...)
A volker tibble.
A tibble.
The column holding factor values.
The column holding groups to compare.
Prepare data by data_clean.
Placeholder to allow calling the method with unused parameters from effect_counts.
Phi is derived from the Chi squared value by sqrt(fit$statistic / n). Cramer's V is derived by phi / sqrt(min(dim(contingency)[1], dim(contingency)[1]) - 1).
sqrt(fit$statistic / n)
phi / sqrt(min(dim(contingency)[1], dim(contingency)[1]) - 1)
library(volker) data <- volker::chatgpt effect_counts_one_grouped(data, adopter, sd_gender)
Run the code above in your browser using DataLab