Hi Listers,
I am studying alcohol use (yes/no) in young people. I am interested in assessing whether there is an interaction between age (1 15-19 vs 20-24 vs 25-29) and sex (1 male vs. 2 female) .
I find the interaction term is significant
logistic alcohol_use i.sex##i.age
testparm i.sex#i.age
I would then like to estimate the ORs for females (vs. men) at each age group so I set the code as:
logistic alcohol_use i.sex#i.age i.age
The output makes sense; however, it does not produce the exact same output as when I run 3 separate logistic regressions for each age group:
logistic alcohol_use sex if age==1
logistic alcohol_use sex if age==2
logistic alcohol_use sex if age==3
I am assuming the difference is due to having more terms in: logistic alcohol_use i.sex#i.age i.age - is that correct?
I am just now unsure which one is the preferred approach.
Thanks in advance!
I am studying alcohol use (yes/no) in young people. I am interested in assessing whether there is an interaction between age (1 15-19 vs 20-24 vs 25-29) and sex (1 male vs. 2 female) .
I find the interaction term is significant
logistic alcohol_use i.sex##i.age
testparm i.sex#i.age
I would then like to estimate the ORs for females (vs. men) at each age group so I set the code as:
logistic alcohol_use i.sex#i.age i.age
The output makes sense; however, it does not produce the exact same output as when I run 3 separate logistic regressions for each age group:
logistic alcohol_use sex if age==1
logistic alcohol_use sex if age==2
logistic alcohol_use sex if age==3
I am assuming the difference is due to having more terms in: logistic alcohol_use i.sex#i.age i.age - is that correct?
I am just now unsure which one is the preferred approach.
Thanks in advance!
Comment