Include the interaction, but you'll need to use the LSMEANS statement to get the odds ratios comparing combinations of the predictor levels. For example, these statements give all of the odds ratios comparing the combinations of the predictor levels.
proc logistic;
class a b/param=glm;
model y(event="1")=a|b;
lsmeans a*b/ ilink diff oddsratio cl;
run;
Fit the interaction term. Then use the ODDSRATIO command in PROC LOGISTIC to look at the effect at specific values of your x-variables.
Include the interaction, but you'll need to use the LSMEANS statement to get the odds ratios comparing combinations of the predictor levels. For example, these statements give all of the odds ratios comparing the combinations of the predictor levels.
proc logistic;
class a b/param=glm;
model y(event="1")=a|b;
lsmeans a*b/ ilink diff oddsratio cl;
run;
Assuming that migraine is another categorical predictor, then yes, you can try to add it in the model interacting with the other variables: model y(event="1")=a|b|c; Note that the a|b|c syntax is shorthand for all three main effects, all three two-way interactions, and the three-way interaction. But if you already have separation problems, then adding another categorical predictor will make it worse. Separation is caused when one or more combinations of levels of the predictors does not have any of one level of the response making the data sparse. This causes some of the model parameters to be infinite, making proper convergence of the iterative fitting algorithm impossible. Adding another predictor creates more combinations for the same amount response information to be spread over - increasing the sparseness. In some cases, you can use the FIRTH option in the MODEL statement to produce results in spite of the separation problem. The Firth method is a modification of the fitting algorithm to use a penalized likelihood function.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.