BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
varatt90
Obsidian | Level 7

Hi,

 

I'm running proc gee for a multinominal outcome (0 1 2 3 4, with ref = 0). I would like to find the odds ratio for a continuous predictor using the Estimate statement (please see code below). 

 

However, in my estimates table, I notice that I do get an estimate but the outcome column shows "0" instead of 1, 2,3, or 4. 

 

Could someone verify if my code is written correctly?

 

Thanks in advance!

 

Proc GEE Data = Test;
Class =schoolid outcome year (ref = "0");
Model outcome (ref = "0") = year age;
Repeated subject = schoolid  / type = ind;
Estimate "1 vs 0"  Age 1 / exp cl;
Estimate "2 vs 0"  Age 2 / exp cl;
Estimate "3 vs 0"  Age 3 / exp cl;
Estimate "4 vs 0"  Age 4 / exp cl;
LSMEANS Year /diff oddsratio cl ; 
Run;

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

See this note that discusses and illustrates the use of the CATEGORY= option with multinomial models. The example shows the model fit by PROC LOGISTIC, but should apply to your GEE model.

View solution in original post

7 REPLIES 7
SAS_Rob
SAS Employee

Could you post the output you are unclear about?

varatt90
Obsidian | Level 7

Here's the output:

Screenshot 2024-09-09 at 10.43.53 AM.png

Also, I realized in the log, it says "Note: Results for ESTIMATE statements without a CATEGORY= option apply to the response level '0' ".

 

How does the category option work?

StatDave
SAS Super FREQ

See this note that discusses and illustrates the use of the CATEGORY= option with multinomial models. The example shows the model fit by PROC LOGISTIC, but should apply to your GEE model.

varatt90
Obsidian | Level 7

Great! Thank you! Just to be clear, the only difference between Category = Separate and Category = Joint is how the output is presented. The separate statement presents each comparison in its own table vs the joint table puts it all together. Is that correct? 

ballardw
Super User

It may not hurt to show the LOG with the code actually submitted and any notes.

I would expect an ERROR message and no output generated because of the = in the CLASS statement.

Modifying one of the GEE example to show what happens when an equal sign is present on the CLASS statement:

540  proc gee data=Resp descend;
541     class= ID Treatment Center Sex Baseline;
        -----
        180
ERROR 180-322: Statement is not valid or it is used out of proper order.

542     model Outcome=Treatment Center Sex Age Baseline /
543           dist=bin link=logit;
544     repeated subject=ID(Center) / corr=exch corrw;
545  run;

WARNING: No MODEL statement has been specified. No analysis will be done.

So make sure the code you share is actually what generates the output.

 


@varatt90 wrote:

Hi,

 

I'm running proc gee for a multinominal outcome (0 1 2 3 4, with ref = 0). I would like to find the odds ratio for a continuous predictor using the Estimate statement (please see code below). 

 

However, in my estimates table, I notice that I do get an estimate but the outcome column shows "0" instead of 1, 2,3, or 4. 

 

Could someone verify if my code is written correctly?

 

Thanks in advance!

 

Proc GEE Data = Test;
Class =schoolid outcome year (ref = "0");
Model outcome (ref = "0") = year age;
Repeated subject = schoolid  / type = ind;
Estimate "1 vs 0"  Age 1 / exp cl;
Estimate "2 vs 0"  Age 2 / exp cl;
Estimate "3 vs 0"  Age 3 / exp cl;
Estimate "4 vs 0"  Age 4 / exp cl;
LSMEANS Year /diff oddsratio cl ; 
Run;

 

 

 


 

varatt90
Obsidian | Level 7
Thanks for catching that error! I did write it as CLASS schoolid (without the equal sign) in SAS.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

Discussion stats
  • 7 replies
  • 962 views
  • 0 likes
  • 4 in conversation