turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Estimate statements for odds ratios for interactio...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-08-2016 03:51 PM

Greetings,

I am trying to request odds ratio estimates in proc logistic for interaction terms in a model using SAS v9.4.

In the model, the interaction is between two categorical dichotomous variables ("victimlgbta" and percschsafe"). For both variables, 0 is the reference group and 1 indicates "Yes" to the questions being measured. I have the following statement, but the results it produces are not consistent with other parts of the output (re: significance of the interaction terms):

**Proc** **logistic** data=secondyp.lgbq;

class race(ref="5" param=ref) sex(ref="1" param=ref) percschsafe(param=ref ref="0") victimlgbta(param=ref ref="0");

model SuicideAttemptA(event='1')=peervicadd race age sex grade percschsafe victimlgbta percschsafe*victimlgbta /clodds=wald lackfit expb;

estimate "LGBT Victimization: No" victimlgbta **0** **1** /exp cl;

estimate "LGBT Victimization: Yes" victimlgbta **1** **0** /exp cl;

estimate "Perception of School Safety: No" percschsafe **0** **1** /exp cl;

estimate "Perception of School Safety: Yes" percschsafe **1** **0** /exp cl;

Estimate "LGBTVict x PercSchSafe (Ever Afraid? No / LGBT Vic? No)" percschsafe **0** **1** victimlgbta **0** **1** percschsafe*victimlgbta **0** **1** **0** **1** /exp cl;

Estimate "LGBTVict x PercSchSafe (Ever Afraid? Yes / LGBT Vic? No)" percschsafe **1** **0** victimlgbta **0** **1** percschsafe*victimlgbta **1** **0** **0** **1** /exp cl;

Estimate "LGBTVict x PercSchSafe (Ever Afraid? No / LGBT Vic? Yes)" percschsafe **0** **1** victimlgbta **1** **0** percschsafe*victimlgbta **0** **1** **1** **0** /exp cl;

Estimate "LGBTVict x PercSchSafe (Ever Afraid? Yes / LGBT Vic? Yes)" percschsafe **1** **0** victimlgbta **1** **0** percschsafe*victimlgbta **1** **0** **1** **0** /exp cl;

I have had limited success finding guidance on how to write estimate statements in proc logistic. Any help or insight into what may be wrong with my statements would be greatly appreciated.

Thanks!

Andrew

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-08-2016 03:52 PM

Have you tried the ODDSRATIO statement instead? It's easier to structure IMO.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-08-2016 03:59 PM

Thank you for your reply! I had tried using that, but the results I obtained didn't make sense (i.e. the OR estimates looked significant (didn't cross 1) even though the p-value in the omnibus test was >0.05. Also, is it possible to pull SE estimates wit hthe ODDSRATIO statement? Thanks again, Andrew

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-09-2016 12:48 AM

Your going to have to show both code and results if you're having trouble with interpretation.

One thing to keep an eye on is what confidence intervals you use. If it differs from method to calculate P-value you can get results that misalign, but it's usually not by much.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-08-2016 10:48 PM

Your estimate statement compare the main effect , not interaction effect.

Maybe you should check ODDSRATIO + AT or SLICE statement .