Lately I have been experimenting with the great expss package. Somehow I can't reproduce the results of tb_last_sig_cpct when I use the underlying prop.test function.
The result of prop.test gives a significant difference and tab_last_sig_cpct gives no significant difference. Am I doing something wrong?
dataset %>%
tab_cells(X1, X2) %>%
tab_cols(total(), X3, X4) %>%
tab_stat_cases(label = "N", total_row_position = "above") %>%
tab_stat_cpct(label="%", total_statistic = "w_cpct", total_label = "#Total cases") %>%
tab_last_sig_cpct() %>%
tab_pivot(stat_position = "inside_columns") %>%
drop_empty_rows() %>%
drop_empty_columns()