BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
UcheOkoro
Lapis Lazuli | Level 10

Hello,

I am struggling with codes for  multinomial ordinal(4 levels) longitudinal regression and its interpretation. The outcome variable has 4 levels which are ordered.  I used proc GENMOD and Proc GEE and the results are very different. I also need help with the interpretation. Initially I was hoping to get the differences of least squares means for each level of the outcome and predictor variable but it does not appear to give such results or am I doing it wrong. Please, I need help.

Thank you

 

 

 


PROC GENMOD DATA=COVERED.Demographics ;

CLASS  complete_adherence2(ref='1')  record_id ethnicity (ref='1');

MODEL complete_adherence2 = ethnicity 
/ DIST=MULTINOMIAL LINK=CUMLOGIT;
REPEATED SUBJECT=record_id/ corr=indep;
lsmeans ethnicity/  ILINK diff e cl oddsratio ;
RUN;


PROC GEE DATA=COVERED.Demographics DESCENDING;
CLASS complete_adherence2(ref='1') week record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity/ DIST=MULTINOMIAL;
REPEATED SUBJECT=record_id / TYPE =indep WITHIN=week LOGOR=EXCH;
lsmeans ethnicity/  ILINK diff e cl oddsratio ;
RUN;

Result from PROC GENMOD

UcheOkoro_0-1652734950397.png

Result from PROC GEE

UcheOkoro_1-1652735068472.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
UcheOkoro
Lapis Lazuli | Level 10

I was able to get identical results with the following  code

 

PROC GENMOD DATA=COVERED.Demographics desc;
CLASS  complete_adherence2(ref='1')  record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity 
/ DIST=MULTINOMIAL LINK=cLOGIT;
REPEATED SUBJECT=record_id/ corr=indep;
lsmeans ethnicity/  ILINK diff e cl oddsratio ;
RUN;

PROC GEE DATA=COVERED.Demographics desc;
CLASS complete_adherence2(ref='1') record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity/ DIST=MULTINOMIAL LINK=CUMLOGIT;
REPEATED SUBJECT=record_id / TYPE =indep ;
lsmeans ethnicity/  ILINK diff e cl oddsratio ;
RUN;

View solution in original post

4 REPLIES 4
StatDave
SAS Super FREQ

I recommend that you start by making the code the same in both procs except for "GEE" vs "GENMOD". DESCENDING should be removed or used in both procs - it reverses the order of the response levels and will certainly change the results. You use the WITHIN= and LOGOR= options only in one of the two procs. With LOGOR, a very different model is fit, so only one of TYPE= or LOGOR= should be specified.

UcheOkoro
Lapis Lazuli | Level 10

Thank you for your response. I made the two models as identical as possible but it did not help.

The following is my code and the results.

 

Thank you.

PROC GENMOD DATA=COVERED.Demographics ;
CLASS  complete_adherence2(ref='1')  record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity 
/ DIST=MULTINOMIAL LINK=CUMLOGIT;
REPEATED SUBJECT=record_id/ corr=indep;
lsmeans ethnicity/  ILINK diff e cl oddsratio ;
RUN;

PROC GEE DATA=COVERED.Demographics ;
CLASS complete_adherence2(ref='1') record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity/ DIST=MULTINOMIAL LINK=CUMLOGIT;
REPEATED SUBJECT=record_id / TYPE =indep ;
lsmeans ethnicity/  ILINK diff e cl oddsratio ;
RUN;

The result from PROC GENMOD

UcheOkoro_1-1652756154483.png

 

The result from PROC GEE

UcheOkoro_0-1652756103564.png

 

 

SAS_Rob
SAS Employee

Could you post both the LOG and the full output from the two procedures?

UcheOkoro
Lapis Lazuli | Level 10

I was able to get identical results with the following  code

 

PROC GENMOD DATA=COVERED.Demographics desc;
CLASS  complete_adherence2(ref='1')  record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity 
/ DIST=MULTINOMIAL LINK=cLOGIT;
REPEATED SUBJECT=record_id/ corr=indep;
lsmeans ethnicity/  ILINK diff e cl oddsratio ;
RUN;

PROC GEE DATA=COVERED.Demographics desc;
CLASS complete_adherence2(ref='1') record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity/ DIST=MULTINOMIAL LINK=CUMLOGIT;
REPEATED SUBJECT=record_id / TYPE =indep ;
lsmeans ethnicity/  ILINK diff e cl oddsratio ;
RUN;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 787 views
  • 1 like
  • 3 in conversation