main effect in logistic regression with the presence of interaction I just have a question about how to get the main effect in the presence of interaction effect.
I have two cohort: say cohort A and cohort B . For cohort A, I have this code as 1. Zero for cohort B. So the cohort variable is 0 for cohort B, and equal 1 for cohort A.
I have an interaction term (also binary), say gender (sex).  So sex=1 for Male and sex=0 for Female.
My model is :  Probability of smoking = beta0 + cohortbeta1 + sexbeta2 + cohortsexbeta3
I know that I cannot just take the coffecient of cohort (i.e. beta1) from say SAS to be the effect of "being in Cohort A vs cohort B" in modelling the probability of smoking.
For example if beta1 = 0.5, I know that I CANNOT just take exp(0.5) = 1.65 to say "Oh being in cohort A is 1.65 times more likely to smoke than cohort B".  
I know we need to take into consideration of being Male or Female at the same time. 
So my question is: 
from this interaction model (i.e. with the 4 betas there including the intercept term), is there anyway I can get or calculate the cohort effect? (say being in cohort A is XX times more likely to smoke than being in cohort B)  
or there is simply no way of calculating the cohort effect WITHOUT considering the sex effect at the same time?  (I mean the conclusion from this model has to be like this: Being Female in Cohort A is XX times more likely to smoke than being female in Cohort B)
What I am asking is: in this model, there is no way to make any interpretation of the cohort effect without ACCOUNTING for the sex effect? is that true?  like we always have to include "Being female", "Being Male" (i.e. the sex variable levels) at the same time ???
If there is a way of just saying "Being in Cohort A is XX times more likely to smoke than being in Cohort B without worrying about which sex the person is in", could you let me know how?  and specifically which software do you think can give me that value? I am using SAS, but I cannot figure out how to isolate the cohort effect without considering the SEX effect. Also the cohort*sex effect is significant.
thank you very much
 A: I understand you are trying to infer the effects of Cohort on smoking but are not as interested in the effects of sex on smoking. Thus you are using sex as a controlled variable. Furthermore, while the main effect of sex is not significant, the interaction of sex$\times$Cohort is. A similar question, about the interpretation of coefficients in a logistic regression with and without interaction was asked here Interpreting interaction terms in logit regression with categorical variables.
Suppose you collected data from 80 individuals, 20 for each cell (combination of factors) of which: 10% of males in Cohort A and 80% in Cohort B smoked, 30% of females in Cohort A and 60% of females in Cohort B smoked. The odds of smoking for each group are plotted below:
 
Assuming that the variable Cohort = 0 for Cohort A and 1 for Cohort B, the model, with Cohort only, is as follows
$\text{Logit($Pr$(Smoking | Cohort))}= \beta_0 + \beta_1 \text{Cohort}$
The parameters calculated on the sample data and their interpretation are as follows
$\exp(\beta_0) = 0.25$ there is 1 smoker to every 4 nonsmokers in the A Cohort
$\exp(\beta_1) = 9.33, p < 0.05$ the odds of smoking increase 9-fold if you are in the Cohort B rather than A, and this difference in odds between the two Cohorts is statistically significant
While this model is O.K. for descriptive purposes, it does not control for the fact that men can be more prone to smoking overall than woman. If this is true the differences in smoking behavior between Cohorts could be attributed to the difference in the number of males vs. females in Cohort A and B. To rule out this possibility we want to control for the effect of sex on smoking. Assuming that we code men = 0 and women = 1, the model with sex, but still without the interaction is as follows:
$\text{Logit($Pr$(Smoking | Cohort,sex))}= \beta_0 + \beta_1 \text{Cohort}+\beta_2\text{sex}$
The parameters calculated on the sample data and their interpretation are as follows
$\exp(\beta_0) = 0.25$ there is 1 male smoker to every 4 male nonsmokers in the A Cohort
$\exp(\beta_1) = 9.33, p < 0.05$ the odds of smoking increase 9-fold if you are in the Cohort B rather than A, and this difference in odds between the two Cohorts is statistically significant, and irrespective of sex.
$\exp(\beta_2) = 0, p>0.1$ females do not have lower odds of smoking than males.
While we controlled for the fact that the effect of Cohort on smoking is not due to different numbers of males and females in the Cohorts, the effect of Cohort on smoking can be different for males and for females. The final model is thus:
$\text{Logit($Pr$(Smoking | Cohort,sex))}= \beta_0 + \beta_1 \text{Cohort}+\beta_2\text{sex}+ \beta_3\text{Cohort}\times\text{Sex}$
The parameters calculated on the sample data and their interpretation are as follows
$\exp(\beta_0) = 0.11$ there approx. 1 male smoker to every 9 male nonsmokers in the A Cohort
$\exp(\beta_1) = 36.00, p < 0.05$ the odds of smoking increase 35-fold for males if you are in the Cohort B rather than A, and this difference in odds between the two Cohorts is statistically significant.
$\exp(\beta_2) = 3.86, p>0.1$ females have approx. 4 times higher odds of smoking than males in the A cohort.
$\exp(\beta_2) = 0.10, p<0.05$ females have an approx. The difference in the effect of Cohort on the odds of smoking is 10 times smaller for women than for men, and this difference in the effect of cohort is statistically significant.
Since you want to infer about the effect of Cohort on smoking, but the effects differ across sex, you should than probably follow this with analyzing the simple effects of smoking for the two genders separately (with the appropriate correction for multiple testing). To see if there is an effect of Cohort in both males and females, but only their magnitude differs, or maybe the difference in Cohort is due only to one gender. For the above data i did this by using the Bonferonni correction and analyzing the effect of cohort in the male and female groups separately. To do this I applied the model with only cohort (the first model) and got:
$\beta_1 = 6.00, p > .1 $ for females,
$\beta_1 = 20.10, p = .03 $ for males.
so I conclude that there is a significant effect of cohort on smoking, but only for males. If I would have gotten both betas significant, than I would conclude that the effect of Cohort on the odds of smoking is significant for both males and females, but stronger for males.
