- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am new to modeling interaction terms using proc surveylogistic. This is my original logistic regression without an interaction term. I am predicting odds of depression and my main predictors are the variables sexualminority (1= Sexual Minority 2=Not Sexual Minority and bingedrink (1=Yes binge drink currently 2=No).
proc surveylogistic data=survey.2017;
strata stratum;
cluster psu;
weight weight;
class gender (REF='2') sexualminority (ref='2') raceethnicity (ref='1') gradelevel (ref='1') bingedrink (ref='2')/param=ref;
model depression (ref='2')= gender sexualidentity raceethnicity gradelevel bingedrink / link=glogit rsquare;
I want to create an interaction term sexualminority*bingedrink but I am unsure if I have the right code. Do I need to create the interaction term in a data step first?
This is my code so far:
proc surveylogistic data=survey.2017;
strata stratum;
cluster psu;
weight weight;
class gender (REF='2') sexualminority (ref='2') raceethnicity (ref='1') gradelevel (ref='1') bingedrink (ref='2') sexualminority (ref='2') / param=glm;
model depression (REF='2') = sexualminority*bingedrink gender sexualminority raceethnicity gradelevel bingedrink;
lsmeans sexualminority*bingedrink /oddsratio cl diff;
slice sexualmionority*bingedrink/sliceby=bingedrink diff=control ('Sexual minority' 'Does not binge drink') oddsratio cl;
run;
Would this be the appropriate way to run a categorical by categorical interaction term in proc surveylogistic? Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
There is a topic where a person says that, while you can do that in proc logistic, proc surveylogistic does not support this syntax:
Therefore, @vcvarela had to dummy-code the interaction variables into proc surveylogictic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes the usual SAS modeling syntax of A*B on the MODEL statement also works in SURVEYLOGISTIC