A data frame with the results of the pairwise Chi-Square tests. Includes the groups, Chi-Square statistic, degrees of freedom, p-values, adjusted p-values, and significance stars.
Arguments
A
A factor with two or moew levels. The first variable.
B
A factor with two or more levels. The second variable.
p.adjust.method
A string specifying the method for adjusting p-values. Default is "bonferroni".
Details
This function creates all possible pairs of levels of factor B and performs a Chi-Square test for each pair of B on variable A. The p-values are adjusted according to the specified method.
#' This function is created for educational purposes only. For exact p-values, consider using reporttools::pairwise.fisher.test().