Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- proc surveylogistic - how to get odds ratio of main effects for an int...

Options

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

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 06-27-2018 12:09 PM
(4011 views)

Hi Everyone,

I am working with large survey data and running a logistic regression using proc surveylogistic. I have to compare the odds between two groups for various variables, so for that I included an interaction term for each variable I want . For example, my model statement is:

model Var Y = A B A*B;

Surveylogistic doesn't give odds ratios for terms involved in interactions, but I am able to get odds for the interaction terms at various nestings using the sliceby statement. Is there any way to get the odds ratio and their 95% intervals for the main effects A, and B individually in this model? Basically I want to have a table that has the following odds ratios:

Var Odds CI

A 1.xx

B 1.xx

Various A*B slices

A1 by B 1.XX

A2 BY B

I have no problem getting the values for slices, but how do I get the values and their intervals for main effects A,B?

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I am using the latest edition of SAS UE.

Here is my code:

proc surveylogistic data = dataname nomcar ;

domain x;

class Age_Bucket (ref = '1')

Female (ref = '1')

Race (ref = '1')

A (ref = '3')

B(ref = '0')

/ param = glm;

strata nis_stratum;

cluster hosp_nis;

weight discharge_weight;

model cholecystectomy (event = '1') =

AGE_BUCKET

FEMALE

RACE

A

B

mortal_score

/* Interaction Terms */

A*B

/ clodds vadjust = none ;

slice A*B/ sliceby=A diff oddsratio cl adjust=bon ;

slice A*B/ sliceby=B diff oddsratio cl adjust=bon ;

run;

How do I get the individual main effect odds ratios of SNH and PAY1 individually?

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

You might show the existing code you are using. That might help someone provide suggestions.

And if you aren't running SAS 9.4 in some form you might indicate the version. There have been additions to the survey procs with each release.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I am using the latest edition of SAS UE.

Here is my code:

proc surveylogistic data = dataname nomcar ;

domain x;

class Age_Bucket (ref = '1')

Female (ref = '1')

Race (ref = '1')

A (ref = '3')

B(ref = '0')

/ param = glm;

strata nis_stratum;

cluster hosp_nis;

weight discharge_weight;

model cholecystectomy (event = '1') =

AGE_BUCKET

FEMALE

RACE

A

B

mortal_score

/* Interaction Terms */

A*B

/ clodds vadjust = none ;

slice A*B/ sliceby=A diff oddsratio cl adjust=bon ;

slice A*B/ sliceby=B diff oddsratio cl adjust=bon ;

run;

How do I get the individual main effect odds ratios of SNH and PAY1 individually?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I don't see those two variables actually listed in the model, but I assume you are asking about the variables A and B.

Using the LSMEANS statement with the SLICEBY and ODDSRATIO options should give you what you want. I think some of the confusion may be in the fact that with an interaction you are assuming that there are multiple odds ratios for each level of the second variable.

In other words, when you are looking at the odds ratio comparing A=1 vs A=2, there wil be a different odds ratio for each level of B. So you won't get a single odds ratio unless you remove the interaction.

This usage note might also be helpful for you as well.

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

What is ANOVA?

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.