Calcite | Level 5

How to get crude odds ratio for binary outcome variable and categorical (4 level) exposure variable

Hi!

I'm a novice with SAS - using SAS University Edition - and am trying to run an odds ratio using proc logistic. I'm looking to find the odds of a respondent experiencing mental health issues (a binary variable titled mentalhealth_2008, where '1' indicates experiencing mental health issues) by their insurance type (categorical with 4 categories: 1, 2, 3, 4). Here's the code I'm using:

proc surveylogistic data=work.nsduh082;
class insurancetype / param=ref;
model mentalhealth_2008 (event=first) = insurancetype / covb;
weight ANALWT_C;
run;

My results do show me the ORs, but they show me the OR of insurance type 1 vs. 4; 2 vs. 4; and 3 vs. 4. But I just want to know the crude odds of each insurance type.

Is there something wrong with my code? How can I get SAS to report the crude odds for each level of insurance variable?

6 REPLIES 6
Obsidian | Level 7

Re: How to get crude odds ratio for binary outcome variable and categorical (4 level) exposure varia

Hello,

What you have there are crude odds ratios. Since 'insurancetype' is a categorical variable with four levels, one level should be used as a reference. Otherwise, the computation of odds would be meaningless.

Hope it helps!

Thank you,

Rajesh.

Calcite | Level 5

Re: How to get crude odds ratio for binary outcome variable and categorical (4 level) exposure varia

Rajesh,

Thank you! That makes sense. I have a follow up question. I'd like to stratify my odds ratios by covariates, e.g. race (variable name: "race"). So I'd like to see what the ORs are for respondents with private insurance who are (1) white, (2) black/african american. etc. My code for looking at OR among respondents with private insurance looks like this:

proc surveylogistic data=work.nsduh082;
class insurance_private / param=ref;
model mentalhealth_2008 (event=first) = insurance_private / covb;
weight ANALWT_C;
run;

Is there some sort of statement I can use to tell SAS to stratify my odds by race? Thank you!

SAS Super FREQ

Re: How to get crude odds ratio for binary outcome variable and categorical (4 level) exposure varia

If you think that the odds ratios change according to race, then you are saying that you expect race to interact with insurance. So, specify this model and then use the ODDSRATIO statement:

model mentalhealth_2008 (event=first) = insurance_private race insurance_private*race ;

oddsratio  insurance_private;

SAS Employee

Re: How to get crude odds ratio for binary outcome variable and categorical (4 level) exposure varia

class insurance_private race / param=glm;
model mentalhealth_2008 (event=first) = insurance_private|race;

Then you could add the LSMEANS statement with the DIFF and OR option to get the odds ratios

This paper has a specific example that you can follow:

http://support.sas.com/resources/papers/proceedings14/SAS404-2014.pdf

SAS Super FREQ

Re: How to get crude odds ratio for binary outcome variable and categorical (4 level) exposure varia

As the name implies, an "odds ratio" is ratio of two odds. For a continuous predictor, the two odds differ by one unit. For a categorical (CLASS) predictor like yours, the two odds are for two levels of the predictor. PROC LOGISTIC (and PROC SURVEYLOGISTIC that you are using) uses the odds of the reference level (by default, the last level) in the denominator of the odds ratio. You can get the odds for each level of the predictor, but an odds ratio for each level does not make sense.

Pyrite | Level 9

Re: How to get crude odds ratio for binary outcome variable and categorical (4 level) exposure varia

@kwrigh28 wrote:

Hi!

I'm a novice with SAS - using SAS University Edition - and am trying to run an odds ratio using proc logistic. I'm looking to find the odds of a respondent experiencing mental health issues (a binary variable titled mentalhealth_2008, where '1' indicates experiencing mental health issues) by their insurance type (categorical with 4 categories: 1, 2, 3, 4). Here's the code I'm using:

proc surveylogistic data=work.nsduh082;
class insurancetype / param=ref;
model mentalhealth_2008 (event=first) = insurancetype / covb;
weight ANALWT_C;
run;

My results do show me the ORs, but they show me the OR of insurance type 1 vs. 4; 2 vs. 4; and 3 vs. 4. But I just want to know the crude odds of each insurance type.

Is there something wrong with my code? How can I get SAS to report the crude odds for each level of insurance variable?

You haven't specified any sampling strata or clusters which the NSDUH should provide. Was that intentional?

Discussion stats
• 6 replies
• 1741 views
• 0 likes
• 5 in conversation