Hi Koen,
Yes, this is what I'm looking for!
Also, additional questions:
1) Is the "Differences of drug least squares means" table showing the odds of using drug A vs. Drug B?
2) Using your previous example, I added another categorical variable with response options as Yes or No and an interaction term.
data drug;
input drug$ x r n catvar$ @@;
datalines;
A .1 1 10 Yes A .23 2 12 No A .67 1 9 Yes
B .2 3 13 Yes B .3 4 15 Yes B .45 5 16 No B .78 5 13 Yes
C .04 0 10 Yes C .15 0 11 No C .56 1 12 Yes C .7 2 12 No
D .34 5 10 Yes D .6 5 9 Yes D .7 8 10 No
E .2 12 20 Yes E .34 15 20 No E .56 13 15 No E .8 17 20 No
;
run;
proc genmod data=drug;
class drug catvar;
model r/n = x drug catvar drug*catvar/ dist = bin link = logit lrci;
lsmeans drug*catvar / DIFF MEANS ADJUST=BON
oddsratio CL EXP ;
run;
/* end of program */
For this output: I see the interaction effects of using Drug A (vs. Drug E) * Yes (vs. No). Is that correct?
As you can see, the estimates highlighted in purple box do not match. I was wondering why that is. When I compared the values in your previous example (without interaction) the values match. Please see output below.
Thanks!