I have a study design with one independent, categorical, variable with 5 conditions, and a binary outcome (0,1). When I run the chi square test, I see no overall effect of condition for the binary outcome. However, if I run a logistic regression I get a significant difference between condition A and Condition E, but none of the other condition comparisons are significant.
Each condition has around 20 participants, so some of the cells don't meet the n > 15 requirement. Is this a reason why I don't see the global significant effect with chi square? If I run a chi square with only the two conditions which showed a difference, it is significant. If so, which test should I report?
# test for chi square
CrossTable(dat$condition, dat$binary_outcome, chisq = TRUE, digits = 2, sresid = TRUE, expected = TRUE, format = "SPSS", fisher = TRUE)
# test for logistic regression
model_1 <- glm(binary_outcome ~ condition, family = "binomial", data = dat)
summary(model_1)
# Chi-Square with only 2 conditions
dat_filtered <- dat %>%
filter(condition == "condition_A" | condition == "condition_E")
CrossTable(dat_filtered$condition, dat_filtered$binary_outcome, chisq = TRUE, digits = 2, sresid = TRUE, expected = TRUE, format = "SPSS", fisher = TRUE)