I am running a logistic regression model with two binary categorical variables, their multiplicative interaction term, and a continuous variable. I am currently trying to get the differences in probabilities (along with respective confidence interval(CI)) for different combinations of independent variabls (e.g., for a strata) in an attempt to plot them with their CI. My goal is to generate graphs similar to those at the bottom of the following webpage: http://www.ats.ucla.edu/stat/stata/faq/logit2by2.htm My data is very similar to those in the STATA example, or what I mean is I have an X1, X2, X1*X2, and X3 (continuous variable). Using contrast statements in my proc logistic, I can get the probabilities for select groupings of my variables based on selected level of the continuous variable (see attached). However, I want to get the differences (and respective CI) of these based on the level of one of the categorical variables. The difference is basic subtraction, but I don't know how to get the CIs for them. Seems like something that can be done in a contrast statement, but I can't seem to get my code right, since based on simple subtraction, I know what the difference should be. I have tried things like "contrast X1 1 X1*X2 1", which are terms not in both contrast statements, to no avail. Thanks in advance for your time and help! proc logistic data=dataset; class X1 (ref='0') X2 (ref='0') / param=ref; model y(event='1') = X1 X2 X1*X2 X3 /*continuous*/ / link = logit expb clodds=wald; contrast 'X1 = 0 X2 = 1' X2 1 X3 11.23 intercept 1 /estimate = prob; /*11.23 mean of X3*/ contrast 'X1 = 1 X2 = 1' X1 1 X2 1 X3 11.23 intercept 1 X1*X2 1 /estimate = prob; contrast 'X1 = 0 X2 = 0' X3 11.23 intercept 1 /estimate = prob; contrast 'X1 = 1 X2 = 0' X1 1 X3 11.23 intercept 1 /estimate = prob; /*Want difference of first and second contrast plus confidence interval*/ /*Want difference of third and fourth contrast plus confidence interval*/ run;
... View more