I have a question regarding the results that I have achieved from my analysis. I'm new to statistics and the understanding of epidemiology. Please, help me interpret this better. I know what a confounder is, but still, I don't know how to understand this. I have a big sample size with equal numbers of each gender. I have used logistic regression to understand the association (not prediction, but association!) between diabetes (dia) and a genetic mutation (GM). The outcome, Y is diabetes, and the X variable is a genetic mutation. I have been using R for this.
dia ~ GM
I get an OR = 2, and it is significant.
Then I add a confounder variable such as gender (GE) and gestational age (GA)
dia ~ GM + GA + GE
The OR is still 2 and significant. The confounders did nothing for the association.
Then I split my sample by gender, so I did this association for males and females separately.
dia ~ GM
In the female group, there was no significant association. The association is gone. But in the male group, the association was significant.
What exactly does this mean? Why did my OR not change when I added/adjusted for gender as a confounder, but when I did a gender-specific analysis, the results changed? How is this interpreted? I may have misunderstood the information about what a confounder is.
Thank you in advance!